How to Install Linux, Apache, MySQL, PHP (LAMP) on Ubuntu?
Installing Default LAMP Package in Ubuntu
If the easiest way LAMP If you want to install it, just type the following codes in the terminal.
$ sudo apt-get update $ sudo apt-get install lamp-server^
Don't forget to write the "^" character, otherwise it will give an error.
Installing Linux, Apache, MySQL, PHP on Ubuntu
If you want to install them all separately, you're in the right place. It's a bit more involved, but it gives you better usability and the ability to install what you want.
Installing Apache
Apache To install, type the following codes in the terminal.
sudo apt-get update sudo apt-get install apache2
This much. Apache loaded. To check, open your web browser http://localhost enter the address and “It Works!” If you see "It's installed without any problems." If you're installing it on a VPS server, you should enter your VPS's IP address in your browser.
Installing MySQL
sudo apt-get install mysql-server
During the installation of both versions, you will be prompted to enter the MySQL root user password.
Installing PHP
PHP To install, type the following codes into the terminal.
sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
This much. PHP loaded.
Loading PHP Modules
To list PHP modules, type the following code into the terminal.
apt-cache search php5-
You can load the module you want by typing the following code into the terminal.
sudo apt-get module name sudo apt-get php5-cli