Step By Step Ubuntu 18.04 (Bionic Beaver) LAMP Server

Step By Step Ubuntu 18.04 (Bionic Beaver) LAMP Server Setup

Posted on May 17, 2018 by ruchi1 Comment

Sponsored Link

In around 15 minutes, the time it takes to install Ubuntu Server Edition, you can have a LAMP (Linux, Apache, MySQL and PHP) server up and ready to go. This feature, exclusive to Ubuntu Server Edition, is available at the time of installation.The LAMP option means you don’t have to install and integrate each of the four separate LAMP components, a process which can take hours and requires someone who is skilled in the installation and configuration of the individual applications. Instead, you get increased security, reduced time-to-install, and reduced risk of misconfiguration, all of which results in a lower cost of ownership.Currently this installation provide PostgreSQL database, Mail Server, Open SSH Server,Samba File Server, Print Server, LAMP and DNS options for pre-configured installations, easing the deployment of common server configurations.

Ubuntu 18.04 LAMP server Install the following Versions

Ubuntu 18.04 (Bionic Beaver)
Apache 2.4.29
Mysql 5.7.21
PHP 7.2.3

First you need to download server version of Ubuntu from here after that create a CD and start booting with the CD Once it starts booting you should see the following screen in this you need to select your language and press enter

Now you need to select “Install Ubuntu Server” and press enter

Select your language and press enter

Select your location and press enter

If you want to try to have your keyboard layout detected by pressing a series of keys you need to select yes option.If you want to choose from a list click no

Select Origin of keyboard and press enter

Select keyboard layout and press enter

Detecting hardware to find CD-ROM Drivers in progress

Loading additional components in progress

Configures the network with DHCP if there is a DHCP server in your network

Enter your server Hostname

You need enter the Full name of the user you want to create for your server in this example i have created ubuntu user select continue and press enter

Enter your user account name here

Entered the password for test user select continue and press enter

Confirm password for test user

If you want to configure encrypted private directory select yes otherwise no and press enter

Configuring clock option

Detecting disks and all other hardware

You have to partition your hard disk in this example i have selected use entire disk option.If you want to do manually you can choose manual option and press enter.Make sure you have swap partition in place

Warning message about data lost on your hard disk

Guided Partitioning

Write the changes to disk here you need to select yes and press enter

Creating ext4 file system in progress

Installing system in progress

Configuring the package manager select continue and press enter

Configuring package mirror this will be related to your country option

Select and install software in progress

Select how do you want to configure automatic update press enter

Now it will start Installing software and here you need to select the server options here i have selected as openssh server and LAMP server installation.

At the time of software installation it will prompt for mysql server root password enter root password of your choice and select continue

Confirm mysql server root password and select continue

Software installation is in progress

Installing GRUB Boot loader in progress

Finishing installation in Progress

Installation complete message here you need to remove your CD select continue and press enter it will reboot your server

After rebooting your server it will prompt for username and password once you logged in you should see similar to the following screen

This will complete the Ubuntu 18.04 ubuntu LAMP Server Installation and your server is ready for installing applications which supports Apache2,Mysql and PHP7.

Configuring Static ip address in Ubuntu 18.04 server

Ubuntu installer has configured our system to get its network settings via DHCP, Now we will change that to a static IP address for this you need to edit

Edit /etc/netplan/01-netcfg.yaml and enter your ip address details (in this example setup I will use the IP address 192.168.56.10):

sudo nano /etc/netplan/01-netcfg.yaml

and enter the following save the file and exit (In vi, ESC, then ZZ to save and exit)

enp0s3:
dhcp4: no
dhcp6: no
addresses: [192.168.56.10/24]
gateway4: 192.168.56.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]

Note:- enp0s3 is network interface name

Now you need to apply the config using netplan

sudo netplan apply

You need to setup manually DNS servers in resolv.conf file when you are not using DHCP.

sudo nano /etc/resolv.conf

You need to add look something like this
search domain.com
nameserver xxx.xxx.xxx.xxx

Sponsored Link

Related posts

One thought on “Step By Step Ubuntu 18.04 (Bionic Beaver) LAMP Server Setup”

  1. Coreigh Utegaard on May 21, 2018 at 5:47 pm said:I had a great deal of trouble with MySQL and PHPMyAdmin on 18.04. Every time I installed PHPMyAdmin I would become blocked out of MySQL. No user is able to access MySQL from localhost. I finally had to create a new user AND grant user@% for all databases in order to be able to complete the PHPMyAdmin installation and still be able to access MySQL. I am aware this is not secure on a publicly available server.Another note; The MSSQL drivers from Microsoft are not available for 18.04 and PHP7.2.x yet.