centos 5.6 linux安装系统后的基本优化
来源:互联网 发布:股市公式怎么编程 编辑:程序博客网 时间:2024/04/30 01:29
1.关闭不必要的服务器
#ntsysv
保留
crond
Linux计划任务服务
irqbalance
用于优化中断分配,以充分利用CPU 多核
network
sshd
syslog
Linux 日志系统(重要)
2关闭iptables
#services iptables stop && chkconfig iptables off
关闭SELinux
#vim /etc/selinux/config
将文件中的selinux=""改为 disabled ,并重启
使用setenforce 0 可以不需要重启关闭SELinux 但是重启后失效
3.关闭不需要的tty
#vim /etc/inittab
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
注释掉后4 个控制台 并执行 init q 命令生效
4.停止打印服务
#/etc/init.d/cups stop
#chkconfig cups off
5.关闭ipv6
#vim /etc/modprobe.conf
添加内容
alias net-pf-10 off
alias ipv6 off
保存退出
#echo "IPV6INIT = no" >>/etc/sysconfig/network-scripts/ifcfg-eth0
#reboot 重启生效
6.调整Linux 的最大文件打开数
#vim /etc/rc.d/rc.local
添加内容
ulimit -SHn 65565
7关闭centos的写磁盘I/O功能
一个linux文件默认有3个时间
atime:对此文件的访问时间
ctime: 此文件的inode发生变化的时间
mtime: 此文件的修改时间
#vim /etc/fstab
/dev/sda2 /data ext3 noatime,nodiratime 0 0
8,优化Linux 下的内核tcp 参数以提高系统性能
#vim /etc/sysctl.config
添加内容
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
#sysctl -p 生效
- centos 5.6 linux安装系统后的基本优化
- centos 5.x linux 最小安装系统后的基本优化
- Linux系统安装后的基础优化-基于CentOS(5.8/6.4)
- Linux系统安装后的基础优化-基于CentOS(5.8/6.4)
- Linux系统安装后的基础优化-基于CentOS(5.8/6.4)
- Linux系统安装后的基础优化-基于CentOS(5.8/6.4)
- 安装linux系统后的基础优化
- CentOS安装系统后的基本调优
- centos7系统安装完成后一些基本的优化
- Linux运维学习笔记之四:安装后的基本调优及安全设置(系统基础优化)
- linux centos 系统安装一些基本流程
- 安装CentOS后的基本配置
- centos安装后的基本配置
- Ubuntu16.04系统安装后的基本设置以及系统优化
- Centos 7 安装后的必要设置 (将centos 7改造为LINUX桌面系统)
- Centos安装后基本配置
- centos安装后基本配置
- AIX安装后的基本系统设置
- 我学习编程的好的学习方法!
- Android学习笔记进阶16之BitmapShader
- 局域网内如何使用另一台终端访问开发环境下的Azure Emulator
- 给学习数据库开发的朋友们一点建议和忠告
- argc argv
- centos 5.6 linux安装系统后的基本优化
- iPhone开发之文件创建、删除、读取、写入
- 数字电路中关键路径的选取
- 移动IPv6技术的研究及其在Linux环境下的实现
- Linux命令:killall - 杀死指定名字的进程
- C#设计模式之4——单件模式
- create an process with administrator privilege from service in Vista
- 百度面试题
- 系统调用