Technical Articles


Installing OrangeHRM On Ubuntu Server 10.04 (LTS)

[Posted 21/07/2011]
Traduction française sur ubuntu-fr.org

First of all we will assume a few intial conditions:

  • a freshly installed Ubuntu 10.04 Server that has not been set up to do any roles yet (ie. LAMP, OpenSSH Server etc.)
  • the user on the machine is srvadmin and the password is srvP455w0rd (yes this is a horribly insecure password so set your own!)
  • the IP Address of the server is 10.0.0.107
  • the server will only be accessible on the internal network
Let's get started. First we will install the correct packages, the web server & database. At a terminal/ssh session type:

sudo apt-get install apache2 mysql-server php5 php5-mysql

The screen will turn blue and a dialogue message will appear asking you to set a password for the admin MySQL user "root".
We'll set the password to dbP455w0rd (again set this to something more complex on your own server).
Next we'll edit the default Apache configuration file to make it more secure. Open the config file in the nano editor like so:

sudo nano -wS /etc/apache2/sites-available/default

Edit the top most "Directory" sections from

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

to the following...

<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>
<Directory /var/www/>
    Options -Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

The changes are the addition of the "-" in front of the Indexes and the change from "None" to "All" in the AllowOverride. The dash in front of the Indexes disallows file listing in directories by default and the AllowOverride change enables .htaccess files contained within the OrangeHRM directory to enable special security features. Now we will restart the Apache server so the php module is loaded and our configuration changes take place. Do so at a terminal by:

sudo /etc/init.d/apache2 restart

Now we will commence the install of OrangeHRM. In a terminal we will download the latest version and place the directory in our Apache directory.

cd /tmp

The next command is all on one line, unfortunately sourceforge's links are quite long!

wget "http://sourceforge.net/projects/orangehrm/files/stable/2.6.5/orangehrm-2.6.5.tar.gz/download?use_mirror=heanet" -O orangehrm-2.6.5.tar.gz

Then un-tar the archive...

tar xfz orangehrm-2.6.5.tar.gz
sudo mv orangehrm-2.6.5 /var/www/orangehrm
cd /var/www/
sudo chown -R www-data:www-data orangehrm

Now point a browser to your server, in our case http://10.0.0.107/orangehrm.
This will bring up the initial install screen, click next and then accept the license agreement. Fill in the values in the form like the screenshot below.

Orange HRM

You can call the database whatever you want, we are using orangehrm_db for clarity. The "Privileged Database User Password" is the one we typed into the blue screen during the MySQL install, dbP455w0rd in this case. Make sure you un-tick "use the same database user for OrangeHRM" and create a new user instead, orangehrm, and give it a secure password, then also enable data encryption. Next it will ask what we want to call the administrator account (NOTE: it is case sensitive, so if you use "Admin", then "admin" will not work!) and a password. You can use whatever values you like, be careful to take a note of them and make sure to choose a strong password. When you have completed the steps in the web install go back to a terminal and finish the install by:

cd /var/www
sudo chown -R root:root orangehrm
cd orangehrm
sudo find -type d -exec chmod 755 {} \;
sudo find -type f -exec chmod 644 {} \;

Note the trailing \ and ; are both required and part of the command. By default the permissions are not set correctly on the files so need to be reset. And that's it, you should now have a fully running OrangeHRM system.

Need help installing OrangeHRM? Contact us.






Exporting a non-default Evolution addressbook

[Posted 12/07/2011]

Ubuntu's switch to Thunderbird is only a matter of time, so sooner or later we will be exporting our contacts and waving good-bye to Evolution. If like me you have more than one addressbook you might ask yourself... how do you export a non-default addressbook?
We assume that your system runs Evolution 2.30.3 on Ubuntu 10.10 64bit.

Step 1: List the addressbooks you currently have.

In a termnial type:

/usr/lib/evolution/2.30/evolution-addressbook-export -l

The output will be something like this:

couchdb://127.0.0.1","Ubuntu One",402 file:///home/myname/.evolution/addressbook/local/system","Personal",368

The first line shows my Ubuntu One addressbook, that is the one I have set as default. The second line shows the local addressbook, this is the one I want to export here.

Step 2: Add the addressbook path you obtained in step 1 to your export command

In this case we append everything from "file" to the last "/" of the directory where the .db file resides.

/usr/lib/evolution/2.30/evolution-addressbook-export --format=csv file:///home/myname/.evolution/addressbook/local/system/ >Desktop/contacts.csv

The addressbook has been exported to your desktop.

Need help with your email system? Contact us.