How to Install LAMP on Ubuntu Linux

LAMInstall Apache, MariaDB, PHP (LAMP stack) Install Apache, MariaDB, PHP (LAMP stack) P
Install Apache, MariaDB, PHP (LAMP stack)

Install LAMP on Ubuntu Linux, Before getting to know of how to installation LAMP on Ubuntu, I would really like to percentage a few basic statistics approximately it first. Before going to peer this academic, you need to recognise a way to deploy MySQL and Apache web server in Ubuntu Linux as it might be required in the subsequent system of putting in LAMP on Ubuntu. Ok, allow’s start with LAMP. This software program is a mixture of few open supply software program. It is generally established at a time for allowing a server to deal with net apps in addition to the dynamic website.

The aggregate of the LAMP is L-Linux working gadget, A-Apache web server, M-MySQL database, P-PHP. In Apache net server mounted in Linux operating system, MySQL database shops the website records, and PHP strategies dynamic content material. Here, I am going to reveal you how to set up LAMP on Ubuntu.

Basic Requirements

How to Install LAMP on Ubuntu Linux, Prior to going through the following steps, you need to have an man or woman a non-root user account having sudo privileges installation on the server to put in LAMP on Ubuntu server.

Installing Apache and Allowing in Firewall

In the arena of internet servers, Apache is the nice and maximum used one. For outstanding fastness, reliability, and safety it have become so dominant on this subject, and it’s far used on sixty seven% of all web servers. In the records of the web, Apache installed itself as the best choice to the customers. For extra information approximately installing the Apache internet server in Ubuntu, follow my educational to discover ways to do that.

Install LAMP on Ubuntu Linux,Installing MySQL

We have set up a web server, and it’s far now in going for walks circumstance. Now, MySQL is to be installed. It is a database control device so that it will arrange and allow get entry to to the database. Here, site facts may be stored. Please follow my academic on the way to deploy MySQL in Ubuntu Linux.

Install LAMP on Ubuntu Linux,Install PHP on Ubuntu

How to Install LAMP on Ubuntu Linux, PHP is the setup factor, and it’ll make code appropriate to display the dynamic content material. It is capable of acting a couple of capabilities like going for walks scripts, connecting to a MySQL database for collecting facts, and turning in the processed content material so that the web server can display it.

For putting in our additives, we can again leverage the “apt” system. Some extra helper applications may be hooked up to aid PHP code to run inside the Apache server and respond to the MySQL database.

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

This command will installation PHP. During requesting a directory, we will decide on the manner that Apache serves files. Apache will search for a document called “index.Html” when a consumer requests a directory. We want, our internet server will deliver priority to PHP documents. So, we can assign Apache to go looking an “index.Hypertext Preprocessor” report first.

To open “dir.Conf” document, type the subsequent in a text editor. While penning this maintain it in thoughts to do with root privileges.

sudo nano /etc/apache2/mods-enabled/dir.conf

It will appear to be this:

DirectoryIndex index.html index.cgi index.php index.xhtml index.htm

We need to update the index report (highlighted above) to the placement, instantaneous after DirectoryIndex specification, just like the following.

DirectoryIndex index.php index.html index.cgi index.xhtml index.htm

Now, press “Ctrl-X,” save and close the record. By typing, “Y” you need to confirm the saving. Then press Enter to make sure the file save location.

Then, restarting of the Apache web server is needed to apprehend the adjustments made. Use the subsequent command to try this.

sudo systemctl restart apache2

Using “systemctl,” the reputation of the “apache2″ carrier may be checked.

sudo systemctl status apache2

Install PHP Modules

For improving the capability of PHP, some extra modules can be installed, and it is completely optional. To use the to be had alternatives for PHP libraries and modules, the results of “apt-cache” search into “less” can be performed.

apt-cache search php- | less

Arrow keys help scroll up and down. Pressing q, you can go out.

The results are non-obligatory installable additives if you want to display a brief description of every.

libnet-libidn-perl - Perl bindings for GNU Libidn
php-all-dev - package depending on all supported PHP development packages
php-cgi - server-side, HTML-embedded scripting language (CGI binary) (default)
php-cli - command-line interpreter for the PHP scripting language (default)
php-common - Common files for PHP packages
php-curl - CURL module for PHP [default]
php-dev - Files for PHP module development (default)
php-gd - GD module for PHP [default]
php-gmp - GMP module for PHP [default]

How to Install LAMP on Ubuntu Linux, To reap greater facts approximately the feature of each module, you can search the net. Or, you could read the lengthy description of the package which may be observed with the following command:

apt-cache show package_name

“Description-en” could have a detail explanation regarding the functionality provided by using the module.

For example, using the following command, you could find out the characteristic of “php-cli“ module.

apt-cache show php-cli

Using the “apt-get deploy” command, you could install a package deal if you feel it is needed to be executed after getting to know. For example, to put in “php-cli,” use the subsequent command.

sudo apt-get install php-cli

If you need to put in more than one module, use the subsequent.

$ sudo apt-get install package1 package2 package3 ...

Now, your LAMP stack is set up. It is also configured.

Concluding Thoughts

I desire you can capable of set up the LAMP stack to your system. This platform will let you install and check diverse web software program and famous CMS to your nearby server that you have simply mounted the usage of the LAMP. I also wish that this piece of the educational on the way to deploy LAMP on Ubuntu is pretty beneficial? If so, please take time to proportion this content for your social media. And don’t neglect to share your proposal and stories in the remark phase.