Ubuntu 16.04 LTS Server,LAMP is an acronym for Linux (Ubuntu), Apache2, MySQL (MariaDB) and PHP… It’s a stack of open source packages commonly set up collectively to create dynamic and powerful websites… WordPress, Drupal and few other content management systems use LAMP…
With PHP 7.1 now conveniently available and supported, you could now use the LAMP stack to enhance your web sites and blogs… For people who are new and want to discover ways to deploy LAMP with Ubuntu 16.04 LTS server, the stairs beneath must be a top notch place to begin.
This quick educational is going to show students and new customers a way to install Ubuntu sixteen.04 LT with Apache2, MariaDB and PHP 7.1 guide, or the LAMP Stack.
To get began with installing LAMP, comply with the steps below:
Ubuntu 16.04 LTS Server,Step 1: Install HTTP Server
Apache2 HTTP Server is the most famous web server in use these days and member of the LAMP stack.. So, move and set up Apache2 on Ubuntu by using jogging the instructions underneath:
sudo apt deploy apache2
Next, run the commands under to forestall, begin and enable Apache2 service to always start up with the server boots.
Sudo systemctl stop apache2.Service
sudo systemctl begin apache2.Provider
sudo systemctl enable apache2.Service
After putting in Apache2, open your browser and read to the server name or IP cope with…
You must see Apache2 default check web page.
MariaDB database server is a extraordinary area to begin when looking at open supply database server… Although MySQL changed into initially the default database server, MariaDB has taken over.. To installation it run the instructions underneath.
Sudo apt-get set up mariadb-server mariadb-patron
After putting in, the commands under may be used to stop, start and permit MariaDB carrier to always begin up while the server boots.
Sudo systemctl prevent mysql.Service
sudo systemctl start mysql.Service
sudo systemctl allow mysql.Service
After that, run the instructions below to cozy MariaDB server through growing a root password and disallowing far off root get admission to.
When brought about, answer the questions under by using following the guide.
- Enter modern password for root (enter for none): Just press the Enter
- Set root password? [Y/n]: Y
- New password: Enter password
- Re-input new password: Repeat password
- Remove anonymous users? [Y/n]: Y
- Disallow root login remotely? [Y/n]: Y
- Remove test database and access to it? [Y/n]: Y
- Reload privilege tables now? [Y/n]: Y
Restart MariaDB server
sudo systemctl restart mysql.Carrier
To take a look at if MariaDB is installed, kind the commands beneath to logon to MariaDB server
sudo mysql -u root -p
Then type the password you created above to join up… if a hit, you ought to see MariaDB welcome message
Step 3: Install PHP 7.1 and Related Modules
PHP 7.1 isn’t to be had on Ubuntu default repositories… in an effort to deploy it, you may have to get it from 1/3-party repositories.
Run the commands below to feature the beneath 1/3 birthday celebration repository to improve to PHP 7.1
sudo apt-get deploy software-homes-not unusual
sudo add-apt-repository ppa:ondrej/php
Then update and upgrade to PHP 7.1
sudo apt replace
Run the commands under to install PHP 7.1 and related modules.
Sudo apt install php7.1 libapache2-mod-php7.1 php7.1-commonplace php7.1-mbstring php7.1-xmlrpc php7.1-cleaning soap php7.1-gd php7.1-xml php7.1-intl php7.1-mysql php7.1-cli php7.1-mcrypt php7.1-zip php7.1-curl
After install PHP 7.1, run the instructions beneath to open Apache2 PHP default file.
Sudo nano /and so forth/Hypertext Preprocessor/7.1/apache2/Hypertext Preprocessor.Ini
Then make the changes on the subsequent strains under inside the document and keep. The value below are exquisite settings to use for your environments.
File_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.Timezone = America/Chicago
After making the alternate above, save the report and near out.
To check, create a phpinfo.Personal home page document in Apache2 root listing with the aid of strolling the commands underneath
sudo nano /var/www/html/phpinfo.Hypertext Preprocessor
Then type the content beneath and save the report.
Save the record.. Then browse for your server hostname followed by phpinfo.Php
You should see PHP default check web page…
This is how to install LAMP with Ubuntu 16.04 LTS Server