Configure Linux Server

  • [email protected]:~ vi /etc/selinux/conf ; SELINUX=disable
  • [email protected]:~ vi /etc/sysconf/network-script/ifc-eth0 ; ONBOOT = "yes"
  • [email protected]:~ yum update
  • [email protected]:~ mkdir setup ; [email protected]:~ cd setup ; [email protected]:~ wget http://layer1.cpanel.net/latest ; [email protected]:~ sh ./latest
  • [email protected]:~ yum install httpd ; [email protected]:~ chkconfig --levels 235 httpd on ; [email protected]:~ /etc/init.d/httpd start ; Note: This is typically installed with CentOS by default
  • [email protected]:~ yum install php ;
  • [email protected]:~ /etc/init.d/httpd restart
  • ; you have to add a firewall exception: ...first turn it off: # service iptables stop # nano /etc/sysconfig/iptables ...need to add rule: -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT ...then start firewall again #service iptables start ...if you want to remotely access MySQL as well (I do) you also add: -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
  • SELINUX=permissive
  • [email protected]:~ yum install mysql mysql-server ;
  • [email protected]:~ chkconfig --levels 235 mysqld on ; [email protected]:~ /etc/init.d/mysqld start
  • [email protected]:~ mysql_secure_installation

Tips

Basic server configuration