Bringing Linux to Windows – part 3

Part 3 of 3.

(back-link to part 1, or part 2)

…and the final bit of configuration is to install phpMyAdmin.

phpMyAdmin is a clever package which allows for remote administration of the MySQL database server via a web-browser interface. In this instance, getting it to work also proves that all necessary components of the VM-based server have been installed and are working properly.

From the command-line:

sudo apt-get install phpmyadmin

will start the ball rolling, but there are several questions to answer.

First up, tell the installer which web server to change:

phpMyAdmin installation
Select apache webserver

Next, select the database for operating phpMyAdmin – it needs its own database for running things! It’s best to choose the dbconfig-common option.

dbconfig-common select
Go with the default

Next, you’ll need to provide the password for the ‘root’ user (administrator) for MySQL: (yep, the one you picked earlier)

phpMyAdmin config
Enter the MySQL root user password

…and after a bit more work, it should all be done.

The acid test – use your web browser to connect to phpMyAdmin:

phpMyAdmin in browser
It works!!

…and now you’re the proud owner of a Linux server running in a virtual machine!

One final note: to shut down your VM, go to a command prompt and issue this:

sudo shutdown -h now

which will politely end all tasks and power down your VM.

Addendum – of interest to my students.

In order for your VM to work identically to the classroom lab system, you’ll need to modify the operation of the Apache server. You’ll need to sign in, and from the command line issue this:

sudo a2enmod userdir

which, decoded is “super user do” “apache 2 enable module” “userdir module” – and userdir is the mod which instructs apache to serve content from a user’s “public_html” directory.

–>Important additional step to make this work (added 03/28/2014):

Due to a change in how Ubuntu server is being distributed, you’ll have to change one more file in order for PHP to work properly in conjunction with the ‘userdir’ module.

cd /etc/apache2/mods-available
sudo vi php5.conf

(or whichever editor you’re comfortable with); and comment out (add a # to the start) of the lines indicated in the php5.conf file, and save it back.

Next, you need to restart apache:

sudo service apache restart

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.