guide:Opt

From Dgiref
Jump to: navigation, search

Operating systems

Optimizing the configuration:


Use minimal operating system installation without firewall. To verify installed packages use the command

  • rpm -qa | grep package_name

Install the following additional packages:

  • yum -y install wget yum rpm make gcc gcc-c++ tar sed zlib openssl

After the installation is complete, turn off any unnecessary services (like gpm, sendmail, cups, haldaemon, messagebus, pcmcia, anacron, atd) with the following command:

  • chkconfig <SERVICE> off

Configure the following settings for the server:

  1.  
  2. #!/bin/sh
  3. # Cleanup services
  4.  
  5. lv=12345
  6. srvInstall="wget yum rpm make gcc gcc-c++ tar sed zlib openssl"
  7. srvRemove="smartmontools pcsc-lite bluez-utils cups gpm"
  8. srvOff="anacron atd auditd avahi-daemon cpuspeed cups gpm haldaemon ip6tables iptables \
  9. iscsi iscsid iscsid kudzu lm_sensors mcstrans mdmonitor messagebus pcscd readahead_early \
  10. resto recond rpcgssd rpcidmapd xfs yum-updatesd gpfs lvm2-monitor nfslock portmap firstboot \
  11. jexec restorecond sendmail setroubleshoot"
  12. srvStop="acpid apmd bluetooth cpuspeed gpm microcode_ctl pcscd smartd irqbalance mdmonitor"
  13.  
  14. function cleanup {
  15.     # $1 - list of services
  16.     # $2 - action
  17.     # $3 - param
  18.     for service in $1; do
  19.         case $2 in
  20.             srvOff)
  21.                 chkconfig --level $3 $service off;
  22.                 chkconfig --list $service;
  23.                 echo "Off the "$1
  24.             ;;
  25.             srvStop)                  
  26.                 chkconfig $svc off; 
  27.                 service $svc stop;
  28.                 echo "Stop the "$1
  29.             ;;
  30.             *)
  31.                 echo "Nothing to do"
  32.             ;;
  33.         esac
  34.     done
  35. }
  36.  
  37. cleanup $srvOff srvOff $lv
  38. cleanup $srvStop srvStop 
  39. echo "Remove the "$srvRemove
  40. yum -y remove $srvRemove
  41. echo "Install the "$srvInstall
  42. yum -y install $srvInstall
  43. # security updates
  44. yum update
  download administrator's script: note.sh
Personal tools