Install Apache, MySql and PHP on Fedora 16 Server
This is an updated article with the changes that Fedora 16 brought in with regard to SystemD
To install a suite of Apache, MySql and PHP on a new instance of Fedora 16 on Rackspace cloud perform the following steps:
1. Using PuTTY log in as root using the password send to you via email when starting the server
2. Run the following command:
yum update
3. Once it has finished updating run the following:
yum install httpd mysql mysql-server php php-devel php-mysql
4. Once this has finished installing run the following:
systemctl start mysqld.service /usr/bin/mysql_secure_installation
5. When asked for current password just press enter. Then set a root password (make it secure), remove anonymous users, disallow root login remotely and remove the test database. Finally reload the privilege tables. Congratulations, you have secured MySql.
6. To make sure MySQL always loads on restart run the following:
systemctl enable mysqld.service
7. We also want to do similar for Apache so run the following:
systemctl start httpd.service systemctl enable httpd.service
This will start the web server, however if you go to the IP address of the server in your browser it will say there is a problem loading the page, what is happening is that the Rackspace images have a very restrictive firewall to start, we need to allow some traffic through. To do this perform the following commands:
iptables -I INPUT 1 -p tcp --dport http -j ACCEPT iptables -I INPUT 1 -p tcp --dport mysql -j ACCEPT iptables-save > /etc/sysconfig/iptables systemctl restart iptables.service
Once this has done you will be able to see the Apache welcome page on your server IP