How to Install LAMP, phpMyAdmin and Collabtive on Ubuntu 10.04 Server

Whether you are a small contractor, an employee of a large company or just want to stay on top of your tasks and projects, Collabtive has a lot to offer. Collabtive is a great open-source tool that allows you to assign task and projects to individuals with completion dates. This can be used to keep track of your own personal projects, share responsibilities with a group or just use it to track time.

Collabtive is an easy to use web-based application that can be configured to allow you access it from anywhere with web access.

In this example we are going to install Collabtive, MySQL, Apache and phpMyAdmin on Ubuntu Server 10.04 (LTS). Let's get started!

 

 

Collabtive Web Login  Collabtive Calendar

 

 

 

 

Quick Links

 

How To Install LAMP
How To Install phpMyAdmin
How To Creating A Database With phpMyAdmin
How To Install Unzip
How To Install Collabtive

 

 

 

 

 

 

 

 

Install Lamp:


Lamp stands for Linux, Apache, MySQL and PHP. These tools are very common for running many websites. In Ubuntu we can easily install Apache2, MySQL and PHP with one simple command.

sudo apt-get install lamp-server^

 

 

sudo apt-get install lamp-server^

 

 

Enter your Ubuntu password

 

 

Enter Your Ubuntu Password

 

 

Enter “Y” and hit Enter

 

 

Enter Y and Hit Enter

 

 

You should see your server downloading the needed Lamp Packages.

 

 

Example: Install Progress of Lamp-Server on Ubuntu

 

 

Create a secure MySQL password

 

 

Create MySQL Password - Ubuntu Apt-get Installer

 

 

Enter your new MySQL password one more time.

 

Enter your password one more time to confirm it.

 

We now have the web server setup.

 

Useful commands for managing apache:

Restart Apache  -  sudo /etc/init.d/apache2 restart

Stop Apache  -  sudo /etc/init.d/apache2 stop

Start Apache - sudo /etc/init.d/apache2 start

 

 

 

 

        

 

 

 

 

 

 

Install phpMyAdmin:


phpMyAdmin is a web interface to your MySQL databases. It really makes managing your database a breeze. For security reasons I recommend restricting access to phpMyAdmin from a specific IP address or internal rangeation about phpMyAdmin.

 

To install phpMyAdmin issue the following command on your web server:

sudo apt-get install phpmyadmin

 

 

sudo apt-get install phpmyadmin

 

 

Enter your Ubuntu password

 

 

Enter Your Ubuntu Password

 

 

Enter "Y" and hit Enter to confirm installing phpMyAdmin

 

 

input Y and hit Enter to confirm install PHPMYADMIN

 

 

PHPMYADMIN INSTALL PROGRESS

 

 

Select apache by hitting the space bar when apache is highlighted.

 

 

Select Apache for your webserver

 

 

Select Yes to configure phpMyAdmin database.

 

 

Select Yes

 

 

Enter MySQL password that was created in the steps above

(Note: MYSQL Data Base Root Password)

 

 

Enter Root Password for MySQL server

 

 

Create phpMyAdmin db password or you can leave it blank to have one created for you. I have always created one myself.

(Note: This password is something you will more then lickley never need to use.)

 

 

Create a password or leave it blank

 

 

Enter phpmyadmin db password again

 

 

Cofirm Password

 

We should now have phpMyAdmin installed.

 

Note: You can lock down phpMyAdmin access by defined IP addresses. For steps on how to do this, visit http://mixeduperic.com/ubuntu/how-to-restrict-phpmyadmin-ip-address.html

 

 

 

 

 

Creating a Database with phpMyAdmin:


Before we begin we need to know the IP address of the server. It is a good idea to set a static IP address on your server so it will not change on you. If you need some help on how to do this on an Ubuntu server take a look at the following article:

http://mixeduperic.com/ubuntu/how-to-set-a-static-ip-address-on-a-ubuntu-server.html

Type the following to find your IP address

ifconfig

 

 

Enter ifconfig (Lower case)

 

 

You can see one device has an IP address of 127.0.0.1. We can ignore that address because it is a loopback address. I can see that my internal IP address for device eth0 is 192.168.1.114. That is the address we will want to use when accessing the webserver from another machine.

 

 

ifconfig results - Note: eth0 inet addr:

 

 

So now that we know the IP address of are new web server we can open up a web browser on your desktop computer and navigate to the phpmyadmin login page.

(Note: Change YourServerIPaddress with the IP address of your web server.)

http://YourServerIPaddress/phpmyadmin

 

 

Enter http://ServerIpOrName/phpmyadmin

 

 

User name will be root

Enter your password (Will be the root password for the root user on the mysql database.)

 

 

Login To phpMyAdmin

 

 

Click on Privileges tab

 

 

Click On Privileges Tab

 

 

Click on Add a new user

 

 

Click Add a new User link

 

 

Create a username

Set the Host as localhost

Click Generate Password or create a password.

I will often use the generate password because you only need the password when you are setting things up and it generates very secure passwords. Make note of the password by coping it or writing it down.

 

 

Create a username, and password

 

 

Under the Database for user select the radio button next to Create database with the same name and grant all privileges.

 

 

Select  - Create datanase with same name and grant all privileges

 

 

Scroll down and click Go

You should now see a message saying you have added a new user.

 

 

User and database created

 

 

We have now created a new MySQL database and user!

 

 

 

 

 

Install Unzip:


The collabtive download is a zip file and by default Ubuntu does not have unzip installed by default.  Lets install this application by entering the following command:

sudo apt-get install unzip

 

 

sudo apt-get install unzip

 

 

Enter your Ubuntu password.

Enter "Y" and hit enter to confirm installing unzip.

If you don't recieve any errors and it completes you should now have unzip installed.

 

 

 

 

Install Collabtive:


http://collabtive.o-dyn.de/

We are going to install Collabtive in the root web directory on the Ubuntu Web server. By default this directory is /var/www/ .Lets change into the directory before we use wget to download the Collabtive zip file.

(Note: We are assuming this is being installed on a clean slate webserver (meaning no other websites are running on it. )If you have other websites running in this directroty you will want to place it in a sub dir. )

cd /var/www/

 

 

Change directory by using the following command:  cd /var/www/

 

 

We will now download Collabtive by using the wget command. We will need the sudo command in front because by default your user will not have write access to the web directories.

sudo wget http://superb-sea2.dl.sourceforge.net/project/collabtive/collabtive/0.6....

 

 

sudo wget http://superb-sea2.dl.sourceforge.net/project/collabtive/collabtive/0.6.5/collabtive065.zip

 

 

Wget Download Complete

 

 

If we use the ls command we can see what files are in the current directory (/var/www/). We can see the name of are collabtive zip file.

 

 

ls to view the zip file

 

 

Unzip collabtive by using the following command

sudo unzip collabtive065.zip

 

 

Unzip Collabtive zip file - Terminal Command

 

 

Since we have extracted all the files we no longer need the collabtive zip file. This will just take up extra space. Lets delete the zip file by using the rm command.

sudo rm collabtive065.zip

 

 

sudo rm *.zip

We will now need to change the permission on a few directories and files before we can start to use the web installer to finish things up for us. 

sudo chmod 777 templates_c

 

 

chmod 777 templates_c

 

 

sudo chmod 777 files

 

 

sudo chmod 777 files

 

 

sudo chmod 777 config/standard/config.php

 

 

sudo chmod 777 config/standard/config.php

 

 

Now open up a web browser on your desktop computer and type in the IP address of your server followed by /install.php

In my case it would be http://192.168.1.114/install.php replace 192.168.1.114 with the IP address of your servers IP.

Check to make sure all things are green and say OK. If not, you may need to go back and adjust the permissions of a few files or directories.

 

 

Check to make sure the status is set to OK for all the Requirements

 

 

Enter the database name and username that you created earlier in phpmyadmin. In my case the database was called projects as well as the username. If you followed the steps above your username and databse name should be the same. (This is the user and database we created in the phpMyAdmin section.)

 

 

Enter Database username and password

 

 

Enter the password you generated or created yourself using the phpmyadmin tool.

 

 

Enter you password that was created when using phpMyAdmin

 

 

Create a admin user and password for Collabtive

 

 

Create admin password

 

 

You should now see that you have successfully installed Collabtive.

 

 

Install Complete

 

 

Login to test that every thing is working. If you have trouble restart apache with the following command: sudo /etc/init.d/apache2 restart

 

 

Login to test things are working

 

Calendar Overview - Add Project

 

 

There are a few more things we should do to clean up space and apply some more security.

We will want to remove the default index.html file that is created when apache is installed. This will allows us to just have to type the ip address of the server and not http://192.168.1.114/index.php.

 

Go back to your server and make sure you are in /var/www/

cd /var/www/

sudo rm index.html

 

 

Remove the default index.html file from apache with the rm command

 

 

Once we know everything is working correct, we will also want to remove the Collabtive install file and update files for security reasons..

sudo rm install.php update.php

 

 

sudo rm install.php update.php

 

 

With the install files of collabtive it also comes with a bunch of install instructions in different languages. We can removes these as well.

 

 

To keep things clean we will want to remove all the install instruction files in the web dir

 

 

sudo rm install-readme*

 

 

sudo rm install-readme*  - Remove all the readme files from the web dir

 

 

Now its time for you to start entering your projects, task and users and getting the most out of this great open source tool.

If you enjoyed this post, please share it on your favorite social network by clicking on the “Share / Save” bar below.