Posts Tagged ‘Ubuntu’

Ubuntu CheckInstall

Posted in General on April 3rd, 2010 by Simon Connah – Be the first to comment

This is primarily a note to myself so I don’t forget in the future or file away my notes into my filing system (aka the rubbish bin) and lose them.

You can use the checkinstall command like so:

sudo checkinstall

instead of the more traditional:

sudo make install

when installing self compiled packages. This will allow the Ubuntu packaging system to keep track of what was installed and allows easy removal in the future if you decide that you want to get rid of that particular item.

More information can be found in the Ubuntu Documentation:

Ubuntu CheckInstall

Getting Started with Glassfish 3 on Ubuntu Server 9.10

Posted in General on January 14th, 2010 by Simon Connah – 1 Comment

In this article I hope to introduce you to Glassfish 3 on Ubuntu Server 9.10.

The first thing you need to do is make sure that you have the Java Developer Kit installed on your server. There are two options available, the Sun JDK or OpenJDK. Not knowing if there is any advantage to using OpenJDK I personally opted to use the Sun JDK. If anyone has any information about any advantages that the OpenJDK offers then leave a comment and let me know! Simply install the JDK by running the following command:

sudo apt-get sun-java6-jdk

this will install all the needed dependencies for you as well.

Next you need to download Glassfish 3. Personally I find it best to download it as part of the Java EE 6 SDK which is available here. Make sure that you select Linux in the Platform drop down menu before you download it though. I also suggest you download the larger of the two choices (70MB at the time of writing), this means that you are getting Glassfish with all features enabled where as the web profile has some of the enterprise features left out for size reasons. Obviously if your requirements are met by the web profile then by all means use that. The installation process should be the same as described here.

Once you have downloaded the Java EE 6 SDK you will need to install it using silent mode as the standard install requires X11 which is not included in the standard Ubuntu Server installation. In order for this to work you need to create an answers file (standard text document) that specifies the installation parameters that you wish to use. You will need to add an administrator password to the file and potentially provide the location of your JDK 6 installation. The answer file will default to /usr/local, if you want it somewhere else you will also need to edit that line.

Then simply run the Glassfish installer by appending the -a ANSWER_FILE -s switches to the install command. Where ANSWER_FILE is your edited version of the answer file.

Hopefully that should get you going quickly.

Installing PostgreSQL and PostGIS on Ubuntu Server (or Client) 9.10

Posted in General on January 8th, 2010 by Simon Connah – 1 Comment

It took me quite awhile to work out which packages where required to get the source version of PostGIS to install correctly so I thought I would write a quick blog post so I didn’t forget. I hope you find it useful.

First of all we need to install PostgreSQL 8.4. Run the following command:

sudo apt-get install postgresql libpq-dev postgresql-server-dev-8.4 proj libgeos-dev libpgtypes3 postgresql-contrib postgresql-dev postgresql-server postgresql-client

Once that command has been run you should have the correct packages installed in order to run the PostGIS configure script.

This is the standard Unix installation method and if you are not familiar with it, now is a great time to get aquatinted.

Simply run the following commands:

./configure
 
make
 
sudo make install

The documentation that I originally saw said to run the last two commands as the postgres user but obviously that results in permission denied errors as the source distribution by default installs to system directories.

That will have installed PostGIS on your system. In order to test your installation you need to run the tests that are included with the source distribution. To do this you need to chown the PostGIS source directory to be owned by the postgres user in order to give it permission to run the needed tests.

Type the following commands (where VERSION_NUMBER is the version number suffixed to the source code directory):

cd ..
 
sudo chown -R postgres:postgres postgis-VERSION_NUMBER
 
sudo su postgres
 
cd postgis-VERSION_NUMBER
 
make check

That should complete with no failures. Simply type:

exit

to return to your normal user. PostGIS is now installed and ready to use on Ubuntu Server or Client 9.10.

Feel free to leave any comments below :) .