Saturday, February 21, 2015

Server installation notes

Install needed software
 yum install httpd  
 yum install mariadb-server  
 yum install php-ldap php-mysql php-mbstring  

Configure service startup and start them
 systemctl enable httpd  
 systemctl start httpd
 systemctl enable mariadb  
 systemctl start mariadb  

Configure mariadb(mysql)
 mysql_secure_installation  

Setup fully qualified host name
Edit /etc/hosts and add this line:
<ip> <FQHN>
example: 10.0.0.27  srv.khodemoon.com
It's not necessary for the specified name to be valid. Take it easy with naming.

Configure Apache
Edit /etc/httpd/conf/httpd.conf:
If you want apache to listen only on one network interface change Listen:80 directive (around line 130)
Change mail address for server owner: around line 235: ServerAdmin root@localhost
Change server name: directly below the server owner email: ServerName

Start Apache
 systemctl restart httpd

Open ports
firewall-cmd --add-port --permanent 80/tcp
firewall-cmd --add-port 80/tcp
firewall-cmd --add-port --permanent 443/tcp
firewall-cmd --add-port 443/tcp