Install Apache MySQL PHP and PHPmyadmin

Apache Installation
Install Apache MySQL PHP and PHPmyadmin.Apache is the most widely user webserver over 50% of total world servers.
Ok.Let’s start the installation.

sudo apt-get update
sudo apt-get install apache2

To Test Go to

http://your_server_IP_address or 127.0.0.1

If you can see the default Apache Web page, installation is success.

Note: The apache document folder is located in /var/www/html
You can put HTML files inside it and test server.
To test just goto http://127.0.0.1/file_name.html

Since, PHP is not installed, at this point PHP files will not execute.

Install MySQL

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
sudo mysql_install_db
sudo mysql_secure_installation

The command prompt will ask for password. Set appropriate passwords.

PHP Installation

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

To test php is working, create a php file in the apache’s root folder,
create a file name info.php and paste the following code:

<? php phpinfo(); ?>

 

You can execute this php script using:

http://your_server_IP_address/info.php or http://127.0.0.1/info.php

If success, it will show a page with default informations about php.
The info() function will give you information about your server.

Apache Commands

Restart Apache Webserver

sudo service apache2 restart

Stop Apache Webserver

sudo service apache2 stop

Start Apache Webserver

sudo service apache2 start

Find Status of Webserver

sudo service apache2 status

phpMyAdmin

phpMyAdmin installation :

sudo apt-get update
sudo apt-get install phpmyadmin

Note:
Choose apache2 as your server
choose yes for dbconfig-common to set up the database
Enter mysql password when prompted
Confirm the password again

Next, we have to enable the mcrypt extension in the php.ini.
You can manually edit php.ini or just type the command

sudo php5enmod mcrypt

Last step, restart your web server to load the new configurations.

sudo service apache2 restart

To goto phpMyAdmin

http://your_address/phpmyadmin or http://127.0.0.1/phpmyadmin

I hope you like this article Install Apache MySQL PHP and PHPmyadmin, Thanks for reading

Information about Git,SSH and many more can be found at: www.metaspaceuniverse.com

To Install Apache MySQL PHP and PHPmyadmin Arch Linux, follow this link : Install Apache MySQL PHP and PHPmyadmin Arch Linux