Swich the user to root user
$ sudo su
Install httpd service
$ sudo yum install httpd
Install mysql-server service
$ sudo yum install mysql-server
Install php & php-mysql
$ sudo yum install php php-mysql
Install phpmyadmin
$ sudo yum –enablerepo=epel install phpmyadmin
Edit the httpd.conf file
$ nano /etc/httpd/conf/httpd.conf
Create Symolic link in public directory for phpmyadmin
$ sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
Create Symolic link in home directory for public directory
$ sudo ln -s /var/www/html /home/user/public_html
$ sudo chown -R ec2-user /var/www/html
Check the httpd service status
$ service httpd status
Start the httpd service
$ service httpd start
Restart the httpd service
$ service httpd restart
Check the mysqld service status
$ service mysqld status
Start the mysqld service
$ service mysqld Start
Restart the mysqld service
$ service mysqld restart