Part 3 of 3.
…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:
Next, select the database for operating phpMyAdmin – it needs its own database for running things! It’s best to choose the dbconfig-common option.
Next, you’ll need to provide the password for the ‘root’ user (administrator) for MySQL: (yep, the one you picked earlier)
…and after a bit more work, it should all be done.
The acid test – use your web browser to connect to phpMyAdmin:
…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.
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