yum update -y
yum install -y zip unzip wget nano
Install and start Apache.
yum install -y httpd
service httpd start
Now go to your web browser and navigate to http://your_server_ip, if all if well, it will connect with an apache test page. If it times out, you may need to add proper firewall rules to allow port 80 access, try using the command below.
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
service iptables save
Now we can install the MySQL server and PHP. To install the newest versions we will be using the webtatic RPM.
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
Now lets install both and remove the old MySQL libs:
yum remove mysql-libs* -y
yum install -y mysql55w-server
yum install -y php56w php56w-mbstring php56w-mysql php56w-sqlite php56w-gd php56w-xml php56w-cli
Now start MySQL and run the secure installation, with this you can set a root password and change a few options.
service mysqld start
You should get the following output:
Enter current password for root (enter for none): **Press enter here then enter in your desired root password and press enter again**
Remove anonymous users? [Y/n] y
Disable root lo gin remotely? [Y/n] y
Remove test database and access to it? [Y/n] yReload privilege tables now? [Y/n]
Now we need to edit the httpd.conf to change "AllowOverride" option for our public web directory. This is optional but may help with scripts that use an .htaccess file. We will use nano to edit the file.
Now press CTRL + W to search the file, search for "AllowOverride", when it finds the first result, press CTRL + W again and search "AllowOverride" one more time. This will bring you to the /var/www/html section. Now change "AllowOverride None" to "AllowOverride All"
Now restart Apache to finalize the changes.
service httpd restart
Lets go ahead and make both run at boot.
chkconfig httpd on
chkconfig mysqld on
Lets setup PhpMyAdmin now. This can be done easily with a few commands.
rm -rf phpMyAdmin-4.5.2-english.zip
mv php* phpmyadmin
mv phpmyadmin /var/www/html/phpmyadmin
mv /var/www/html/phpmyadmin/config.sample.inc.php /var/www/html/phpmyadmin/config.inc.php
We also recommend disabling SELinux as it may cause permissions related issues with Apache. Run the following command:
Then edit the SELinux configuration file and change "SELINUX=permissive" to "SELINUX=disabled" and save the changes.
- 13 Users Found This Useful
We will be setting up ownCloud on a fresh CentOS 6.6 64-bit installation. ownCloud is an open...
PPTP Proxy is an easy to setup proxy server that can be used as an OpenVPN alternative, and many...
Install the desktop environment that we will use:yum groupinstall Desktop -yInstall the TigerVNC...
Run a Minecraft server? Multicraft is the most commonly used management control panel for...
If you run a gaming community, a Teamspeak 3 server is probably a popular choice for you to have...
Powered by WHMCompleteSolution