This guide will show you how to install Apache, mySQL, and PHP from the Linux command line.
Log into your server using SSH
First, we'll install apache. Issue the following command to install apache:
[root@server] yum install httpd mysql-server php mysql php-mysql
Next, we need to make sure that the firewall is configured to save its settings when stopped or restarted:
Edit /etc/sysconfig/iptables-config and make sure following variables are set to “yes”:
IPTABLES_SAVE_ON_STOP = “yes”
IPTABLES_SAVE_ON_RESTART = “yes”
Finally, we need to add the firewall rules allowing access to the HTTP and HTTPS ports and set SELinux to be permissive:
[root@server] iptables -I INPUT -p tcp -m state --state NEW,ESTABLISHED --dport 80 -j ACCEPT
[root@server] iptables -I INPUT -p tcp -m state --state NEW,ESTABLISHED --dport 443 -j ACCEPT
[root@server] service iptables restart
[root@server] echo 0 >/selinux/enforce
The LAMP stack should now be fully functional and accessible on your server.
This article has been provided by Codero Hosting, the leading provider of reliable dedicated, managed and cloud hosting services. Need more information on this topic or to learn more about Codero’s hosting services please visit www.codero.com, chat with us online or give us a call at 866-2-CODERO.
- What mail server should I used for my Windows basic server?
- I have a dedicated server. How can I install my commercial SSL certificate on my server using Plesk?
- I have a dedicated server. How can I install my commercial SSL certificate on my server using plesk?
- How can I troubleshoot basic problems with my Dedicated Server?
- How do I install APC Advanced php caching on my linux server?