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!

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^

Enter your Ubuntu password

Enter “Y” and hit Enter

You should see your server downloading the needed Lamp Packages.

Create a secure MySQL password

Enter your new MySQL password one more time.

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

Enter your Ubuntu password

Enter "Y" and hit Enter to confirm installing phpMyAdmin


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

Select Yes to configure phpMyAdmin database.

Enter MySQL password that was created in the steps above
(Note: MYSQL Data Base Root Password)

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.)

Enter phpmyadmin db password again

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

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.

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

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

Click on Privileges tab

Click on Add a new user

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.

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

Scroll down and click Go
You should now see a message saying you have added a new user.

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

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:
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/

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....


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.

Unzip collabtive by using the following command
sudo unzip collabtive065.zip

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

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

sudo chmod 777 files

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.

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 the password you generated or created yourself using the phpmyadmin tool.

Create a admin user and password for Collabtive

You should now see that you have successfully installed Collabtive.

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


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

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

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

sudo rm install-readme*

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.
