Search This Blog

Wednesday, October 24, 2012

Download and Install GeoServer on Linux


In this post, we walk through the steps of installing GeoServer 2.2 on Tomcat 7 on Ubuntu 12.04.

First thing is to setup Tomcat 7 on Ubuntu as indicated in my previous blog (http://opendesignarch.blogspot.com/2012/10/how-to-install-tomcat-7-on-ubuntu-1204.html)

As part of the default install on Ubuntu, two Tomcat 7 locations are created. The first is /var/lib/tomcat7 and the second is /usr/share/tomcat7. While the first folder contains all the configuration folders, the second contains the runtime components.

Listing the contents of /var/lib/tomcat7, we see the folder contents that includes the webapp directory. This is the directory where we will install GeoServer.

> ls /var/lib/tomcat7



Now, lets download the Geoserver binaries. If we navigate to the GeoServer site, we shall see the following page by clicking the Download link.



We are interested in the Stable build. Also, get the Web Archive (.war) file.



Go ahead and download the web archive. I copied the installation zip to my local file.


Go ahead and extract the zip file. This will give you the .war file. You can delete the zip now.



Now open a terminal window and copy the extracted .war file from within the extracted folder to the tomcat7/webapps folder

For example, for me its the following

> sudo cp /home/arthgallo/Work/Servers/GeoServer/geoserver-2.2-war/geoserver.war /var/lib/tomcat7/webapps



Once the file is copied, Tomcat will automatically load it as a web application. We can test by entering the following url in a browser.

http://localhost:8080/geoserver



Enter the username password as “admin” and “geoserver” and click the login button to login.



Voila, we can access the administration console for Geoserver 2.2.



Take care...

Monday, October 22, 2012

Configuring administration on Tomcat 7


In a previous blog (http://opendesignarch.blogspot.ca/2012/10/how-to-install-tomcat-7-on-ubuntu-1204.html), I walked through the steps of installing Tomcat 7 on Ubuntu. In this post, I would like to enable administrator access to allow deployment of webapps or Web Archive (.war files). Lets go through the steps.

When you access the default Tomcat 7 Administration page on http://localhost:8080/manager  or similar, you will see a username password prompt. Cancelling it you will see a screen like below.


As indicated, we need to install tomcat7-admin page to access the manager webapp. As shown in the last step of our previous post, this is done as following...

We will also need to obtain the tomcat7-admin package by entering the following

> sudo apt-get install tomcat7-admin


If we now do a search for all folders in /usr/share prefixed with tomcat we should see the following

tomcat7
tomcat7-admin
tomcat7-root

> ls /usr/share/tomcat*



Also, if we browse the folder /var/lib/tomcat7, we should see the faimilar structure from previous generation Tomcat instances

> ls /var/lib/tomcat*



To configure administration, we need to enable the manager. Clicking on the link for manager in the Tomcat home page (http://localhost:8080/manager), will show the following screen with the steps to be followed.


As indicated, the conf folder is installed under /var/lib/tomcat7. Lets go there and open the tomcat-users.xml file for editing as follows

> cd /var/lib/tomcat7/conf
> ls
> sudo gedit tomcat-users.xml




This should open the file for editing. Add the following lines

<role rolename="manager-gui"/>
<user username="manager" password="manager" roles="manager-gui"/>



Save the file and exit

Next, restart the tomcat7 service from the command line as follows.

> sudo /etc/init.d/tomcat7 restart

The service should stop and restart.


Next access the page http://localhost:8080/manager

You will see a prompt to enter the username and password for the manager. Go ahead and enter the username/ password we just created. In my case it was manager/ manager.


Voila, we can see the Tomcat administration screen as shown below.


There you go!

Sunday, October 21, 2012

Download and Install Tomcat 7 on Ubuntu 12.04


In the blog, we will see how to install Tomcat 7 on Ubuntu 12.04. This follows the following steps

  1. Check you JRE version
  2. Install Tomcat Server

First step is easy. First check that you have the right version of Java runtime installed by typing

> java -version







On my machine, it seems I have the latest java version, that comes pre-installed with Ubuntu 12.04.


In case, you have multiple versions of Java and the version displayed is not the one you want, you can switch between versions easily. Just follow the steps on my blog post.

So, lets go ahead and install Tomcat 7. Installing it is easy.


The system prompts to download Tomcat 7 and install it. Go ahead and say Yes.


Now, the installation will continue and download and install the components.


The installation, downloads and sets up tomcat in /usr/share/tomcat7 location.

It also sets up the daemon process and starts it up.

Open up a browser and access http://localhost:8080/

You should see a page as following....


We will also need to obtain the tomcat7-admin package by entering the following

> sudo apt-get install tomcat7-admin


Now that Tomcat 7 is setup, we can set up additional components on top of it.

In my next blog, I show how to install the admin and manager components on top of Tomcat 7.

http://opendesignarch.blogspot.com/2012/10/configuring-administration-on-tomcat-7.html

Good luck.

Saturday, October 20, 2012

Installing Joomla 2.5.7 on Ubuntu 12.04


Installing Joomla 2.5.7 on Ubuntu 12.04

First check if the current user is in the sudoers file. If not, follow instructions in this article


The first step in installing Joomla is to install the Lamp server (Linux-Apache-MySql-php). We do that my doing a simple command line command

> sudo apt-get install lamp-server^

and Enter the sudo password


This will install all the components of the LAMP server stack one by one. Depending on your connection, it may take a little while to install the stack.



In middle of the installation, you will be asked to select a password for the root user in mysql. Enter a password accordingly..

The installation will prompt you to enter the password twice.


Once the installation is complete, you can verify by accessing http://localhost or similar on your browser. You should see a screen as shown below.
Next we need to setup Joomla CMS.

First thing we need to do is to go into the apache2 folder that got created as part of the installation.

Let's enter the following in the command prompt.

> cd /etc/apache2
Next we need to copy the default template site in Apache as Joomla by entering the following command.

> sudo cp sites-available/default sites-available/joomla

Now to install Joomla at the folder location.

> sudo a2ensite joomla


Next we need to restart the apache daemon service so that the service is restarted.

> sudo /etc/init.d/apache2 restart


Next we need to create a content database for Joomla. To do this, log into the mysql database as root.

> mysql -u root -p

Now we need to create a database called joomla

mysql> create database joomla;


Now create a user called joomla with password joomla .....

mysql > create user 'joomla'@'localhost' identified by 'joomla';



and give them access to the joomla database.

mysql > grant all privilges on joomla.* to 'joomla' identified by 'joomla';


Now, lets exit mysql prompt

mysql > exit



Now lets download Joomla (latest version is 2.5.7 as time of writing this blog) by entering the following command on the prompt.

> cd /tmp && wget -O Joomla_2.5.7-Stable.zip http://goo.gl/41TMS




Now that the Joomla installer is downloaded and unzipped, we can set up the remaining steps.

Create a folder where joomla will be ultimately installed.

> mkdir /var/www/joomla


Now we unzip the downloaded file into the newly created folder....

> sudo unzip Joomla_2.5.7-Stable.zip -d /var/www/joomla

This unzips the contents of the folder as shown below.


Next we need to allow the folder to be accessible by an anonymous user coming over the web as well as the web processes.


Now, access http://localhost/joomla on your machine. We need to setup the Joomla application on the browser.


Step 1: First step is to Choose the language.

Next step is to verify all the neccessary items are installed.

Step 3: Next step is to accept the license.


Step 4: Next enter the database connection parameters. We enter the joomla username, password and database that we defined earlier.



Step 5: You can optionally enter the FTP configuration information. I have skipped this step.



Step 6: Now enter a site name as well as username/ password and email address for the administrator.

Installing the Sample data is recommended and greys out the button when completed.

Step 7: Next step is to remove the installation files, which is highly recommended.

After removing the installation files, the software shows the button greyed out.



Final task is to hit the sample site and voila, everything is setup correctly.