Startertutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

Categories: Linux. No Comments on Bitnami LAMP Stack Installation and Configuration

In this article we will learn about Bitnami LAMP stack installation and configuration on a Linux machine. This covers how to establish a SSH connection to the LAMP server and accessing phpmyadmin running on the LAMP server.

 

Bitnami LAMP Stack Installation and Configuration

 

These instructions assume that the OS on the host machine (your computer) is Ubuntu 16.04.

 

Step 1: Install virtual box using the following commands:

sudo apt-get update
sudo apt-get install virtualbox

 

Step 2: Download LAMP stack virtual machine file (.OVA) from Bitnami website:

 

https://bitnami.com/stack/lamp/virtual-machine

 

Step 3: Extract the zip file and open the .OVA file using Virtualbox by going into File menu.

 

Step 4: Start the virtual machine. It will take some time (around 10-15 mins) since it is being started for first time. From next time on wards it will take around one minute to start.

 

When the server starts, it will ask for username and password. Give the following details:

 

Username: bitnami
Password: bitnami

 

After logging in, it will ask you to change the password. It is a good practice to change the default password (bitnami) to something else.

 

Step 5: Establishing a SSH connection

 

Now comes the irritating part (it is for me :p). We have to do some stuff for accessing our Bitnami LAMP stack server from another system. First let’s see what we have to do for establishing a SSH connection to the server (LAMP stack).

 

From here on wards, I am going to assume there is a host machine (with Ubuntu 16.04) on which Virtualbox was installed and there is a guest machine (downloaded from Bitnami website) running Debian Linux. Following IP addresses are assumed for host and guest machines.

 

Host machine IP: 10.0.40.83
Guest machine (server) IP: 10.0.40.86

 

Establishing a SSH connection from host machine to guest machine:

 

a) Enable SSH service on the server (guest machine). Do the following:

 

sudo rm -f /etc/ssh/sshd_not_to_be_run
sudo systemctl enable ssh
sudo systemctl start ssh

 

b) We have to generate public and private keys on the server (guest machine) using following command:

 

ssh-keygen

 

When asked for pass phrase, press enter so that no password will be used for using the generated keys. Now, two files will be created at the location /home/bitnami/.ssh:

 

id_rsa (this contains private key)
id_rsa.pub (this contains public key)

 

c) We have to rename or copy the private key file using the following command:

 

cd /home/bitnami/.ssh
cp id_rsa mykey.pem

 

Now, our private key file is mykey.pem

 

d) We have to copy mykey.pem file which on the server to the host machine from which we will establish an SSH connection to the server. We will use scp (secure copy) command for copying the key file. The command is as follows:

 

scp /home/bitnami/.ssh/mykey.pem [email protected]:destination-path

 

Don’t forget to change the username and destination-path in the above command.

 

e) On the host machine we have to install Open SSH server. To do that, use the following command:

 

sudo apt-get install openssh-server

 

f) Now we are ready to establish a SSH connection to the server. Use the following command from the host machine:

 

ssh -i mykey.pem [email protected]

 

Enter the server password when you are prompted for password.

 

That’s it! SSH connection is established to the server and you can access all the files on the server.

 

Step 6: Accessing phpmyadmin from remote system

 

To access MYSQL database through phpmyadmin running on the server, from the host machine, we have to establish a SSH tunnel using the following command:

 

ssh -N -L 8888:127.0.0.1:80 -i mykey.pem [email protected]

 

After running the above command, a tunnel will be established to the server and the console will not show any output.

 

Now, open a browser (on host machine) and go to the following address:

http://127.0.0.1:8888/phpmyadmin

 

Provide the following details to login to the phpmyadmin dashboard:

 

Username: root
Password: bitnami

 

That’s it! Now we can access the MYSQL database through phpmyadmin.

 

References:

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Suryateja Pericherla

Suryateja Pericherla, at present is a Research Scholar (full-time Ph.D.) in the Dept. of Computer Science & Systems Engineering at Andhra University, Visakhapatnam. Previously worked as an Associate Professor in the Dept. of CSE at Vishnu Institute of Technology, India.

He has 11+ years of teaching experience and is an individual researcher whose research interests are Cloud Computing, Internet of Things, Computer Security, Network Security and Blockchain.

He is a member of professional societies like IEEE, ACM, CSI and ISCA. He published several research papers which are indexed by SCIE, WoS, Scopus, Springer and others.

Leave a Reply

Your email address will not be published. Required fields are marked *