环境:rhel-server-5.5-i386-dvd
#!/bin/bash
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
echo "kernel.shmmax = 2147483648" >> /etc/sysctl.conf
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "fs.file-max = 65536" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
echo "net.core.rmem_default = 1048576" >> /etc/sysctl.conf
echo "net.core.rmem_max = 1048576" >> /etc/sysctl.conf
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.wmem_max = 262144" >> /etc/sysctl.conf
/sbin/sysctl -p
echo ">>>>>>>>>>sysctl.conf updated successfully>>>>>>>>>limits.conf updated successfully>>>>>>>>>login updated successfully>>>>>>>>>profile updated successfully>>>>>>>>>user and group added successfully>>>>>>>>>directory added successfully>>>>>>>>>.bash_profile updated successfully