I will show the command and configuration to install Apache, PHP, MYSQL and phpMyAdmin in Ubuntu
1. Installing Apache
- Open your terminal and type the bellow command
#sudo apt-get install apache2
- It will ask for your password, Type your ubuntu password and press enter key, it will ask for confirmation
- Type y and press enter key
- When installation is done, open your browser and type http://localhost/
- I will print it works into the browser
2. Installing PHP
- Open your terminal and type the bellow command
#sudo apt-get install php5 libapache2-mod-php5
- It will ask for your password, Type your ubuntu password and press enter key, it will ask for confirmation
- Type y and press enter key
- After the successful installation restart Apache using the below command
#sudo /etc/init.d/apache2 restart
- Open your /var/www/ directory and create a php file with any name like info.php file, write some php code into the file
- When installation is done and you have to created the php file into the /var/www/ directory, open your browser and type
- It will execute the file, which confirm that your apache and php installation was successful
3. Installing MYSQL
- Open your terminal and type the bellow command
#sudo apt-get install mysql-server
- It will ask for your password, Type your ubuntu password and press enter key, it will ask for confirmation
- Type y and press enter key
- During the installation you will be prompted for a password. Choose a secure and type the password and press enter. It will also ask to re enter password
4. Installing phpMyAdmin
- Open your terminal and type the bellow command
#sudo apt-get install phpmyadmin
- It will ask for your password, Type your ubuntu password and press enter key, it will ask for confirmation
- Type y and press enter key
- During the installation you will be prompted for a web server configuration. Select Apache and press Enter
- Now you will be prompted for phpmyadmin configuration, Select no
- In terminal Run the bellow command
#sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d
- Restart your apache server
#sudo /etc/init.d/apache2 restart
- Open your browser and type
Your Apache, PHP, MYSQL and phpMyAdmin is ready in Ubuntu, start your coding…..