===== Centos - domyślna konfiguracja nowego serwera ===== ==== Konfiguracja sieci ==== vi /etc/sysconfig/network vi /etc/hosts vi /etc/sysconfig/network-scripts/ifcfg-eth0 hostname nazwa-serwera ==== Instalacja podstawowych paczek ==== yum install mc subversion telnet zip unzip tcpdump man nano mailx chkconfig wget ntpdate git rsync mkdir install cd install/ wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el6.rf.`uname -m`.rpm wget http://pkgs.repoforge.org/p7zip/p7zip-plugins-9.20.1-1.el6.rf.`uname -m`.rpm rpm -i ./p7zip-* cd .. ==== Konfiguracja czasu ==== echo "2 * * * * root ntpdate -u pool.ntp.org > /dev/null" >> /etc/crontab /etc/init.d/crond reload ==== Wyłączenie SELinux ==== cat /etc/selinux/config | sed "s/SELINUX=.*/SELINUX=disabled/g" > /etc/selinux/config.new && mv /etc/selinux/config.new /etc/selinux/config && reboot ==== Repo Nginx ==== echo '[nginx] name=nginx repo' >> /etc/yum.repos.d/nginx.repo echo "baseurl=http://nginx.org/packages/centos/6/`uname -m`/" >> /etc/yum.repos.d/nginx.repo echo 'gpgcheck=0 enabled=1' >> /etc/yum.repos.d/nginx.repo ==== Firewall off ==== /etc/init.d/iptables stop chkconfig iptables off