Setting Up RMH Homebase 1.5

RMH Homebase exercise. Identifying “bad smells”.

Of course, the most challenging portion of this exercise was to install LAMP for RMH Homebase 1.5 on Ubuntu 11.10.

LAMP itself is widely used stack that supports three-tiered Web applications. LAMP includes (from the bottom level to the top):

  • Linux (or MacOS or Windows) – an operating system that manages all of the computer’s basic functions.
  • Next level up – Apache Web server. It is a free and open source server. Apache supports HTTP – a collection of rules that governs how Web pages are transported across the Internet.
  • On the same level – MySQL. It is a free and open source database management system. Most widely used database for Web applications.
  • Next and the last level – PHP scripts. PHP is a programming language for creating Web pages. PHP is a server – side scripting language because PHP is interpreted by the Apache Web server.

So we need to install web server and PHP on Linux in order to run RMH Homebase.

Install MySQL 5 (run this code):

$ sudo apt-get install mysql-server mysql-client

You will be asked to enter an admin password and then re-enter it for MySQL database

Install Apache 2 (run this code):

$ sudo apt-get install apache2

Go to the browser and open http://localhost/ . If everything goes fine you should see the message: “It works!This is the default web page for this server. The web server software is running but no content has been added, yet.

Now onto installing PHP 5 (run this command) :

$ sudo apt-get install php5 libapache2-mod-php5

Now, restart the Apache server:

$ sudo /etc/init.d/apache2 restart

Correction, do NOT restart the server, RELOAD the server!

$ sudo service apache2 reload

So.. so far we installed MySQL 5, Apache 2, PHP 5 and re-installed Apache 2 server…

After running the last command the following message pops up in the terminal:

… waiting apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName ”

It Is possible and OK because we are running on a local host and there is no remote access.

Now we need to test how well our PHP runs… create the test file.

Enter the text and save:

<?php phpinfo();

?>

Now, go to http://localhost/info.php . It should display the page with a header: PHP Version 5.3.6-13ubuntu3.6 and info on this page.

Now we will install MySQL Modules in PHP 5. The code Is a little bit tedious..

$  sudo apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

You only know that module is installed when terminal runs a setup process for about a minute. If it shows any errors or cannot find something, make sure to go and check the syntacsis… I spelled some portion of the code incorrectly so it could not locate some packages.

Run restart Apache script:

$  sudo /etc/init.d/apache2 restart

Reload instead of restart.

Reload the page and see the modules that should have been installed into the PHP server.

Now.. the fun part.. getting RMH Homebase 1.5 itself.

Download the code from: http://sourceforge.net/projects/rmhhomebase/files/latest/download

Unzip the folder and run this command to copy this folder into your webroot:

$ cd ~/Downloads/RMHHomebase1.5

$ cp -R ./rmh15 /var/www/

If you reload the page you should be able to see the login screen. But the last portion gives me an error for some reason. No such file or directory even if I created it and I am referring to it.

I did consult with the blog of Scott Rosenbrook. To be honest I was a little discourages by the exercise because I did not have a previous experience setting up LAMP structure. His blog made terminal commands more clear.

Installing PHP MyAdmin

$ sudo apt-get install php myadmin

When the window pops up configure with Apache2 then check “no” for the next question. Create a link between your webroot and PHPMyAdmin.

$ sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadminMake sure there is a space between phpmyadmin and /var/ – these are different instances!!!

Now go to http://localhost/phpmyadmin/index.phpYou should be able to see login screen.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment