LAMP is a term that stands for Linux, Apache, MySQL and Perl/PHP/Phyton. It is a free software package used to run a complete application.
Components from LAMP :
- Linux ▪ operating system
- Apache HTTP Server ▪ web server
- MariaDB or MySQL system database
- PHP or Perl or Python ▪ programming language to use
The following are easy ways of installing LAMP at CentOS :
- Login to your VPS/Server CentOS as ▪root or user with permission to install all Web Server needs (For login may be used Putty on Windows or enter terminal in Linux)
- If you've been on Terminal Linux CentOS, please do the yum function update first to facilitate the installation process LAMP by typing the following commands:
sudo apt-get update
- When finished with the update, it will display like this :
- Once you've updated the function apt-get completed, install next Apache2 as Web Server by entering the following command :
sudo apt-get install -y Apache2
- After installing Apache2, you can check through the browser by typing your VPS IP address. Example, if your VPS IP is 192.168.1.2, you can type http://192.168.1.2 on browser.
- If successful it will show like this :
- Next please you install MariaDB
MariaDB is a database platform created by Developer MySQL. Since MySQL was acquired by the Oracle, its developers then switched to create a new Database platform that has a lot more than MySQL. In addition, MariaDB is a further project created by the developer MySQL, then all the commands and syntax mySQL are fully compatible with MariaDB.
- To install MariaDB in Ubuntu, type the following command :
sudo apt-get install -y MariaDB-server MariaDB-client
- When installed MariaDB, please you run MariaDB by typing the following command :
sudo service mysql start
- Then, check the status MariaDB by typing the following command :
sudo service mysql status
- If successful it will show like this :
- Next to secure. MySQL, please type the following command :
sudo mysql_secure_installation
- If successful it will show like this :
- Next, install PHP7 in Ubuntu using the following command :
sudo apt-get install -y php libapache2-mod-php php-mcrypt php-mysql
- If finished, please restart on Apache by typing the following command :
sudo service Apache2 restart
- You have installed it successfully LAMP on your VPS/Server CentOS, and by default your website is on directory /var/www/html