Search This Blog

Wednesday, February 25, 2015

Installing LibreOffice SDK on Ubuntu

I needed to write some small applications to export data from a spreadsheet into a script. Since I was using LibreOffice Calc, I started looking for a SDK. The information on the SDK can be found on this site.

http://api.libreoffice.org

which provides documentation and tutorials on the SDK.



However, there is a simpler way to install the SDK on your Ubuntu environment. That is using our familiar command sudo apt-get install ...

$ sudo apt-get install libreoffice-dev



This installs LibreOffice SDK on your machine. Next step was to configure everything. To do so, I had to first locate the installation, which can be done by searching for the following file (setsdkenv_unix.sh).

$ locate setsdkenv_unix.sh



Having found the location on your machine, you need to execute this as a source file using the syntax below.

$ . /usr/lib/libreoffice/sdk/setsdkenv_unix.sh

or

$ source /usr/lib/libreoffice/sdk/setsdkenv_unix.sh

This executes the environment to setup the application.


Now we are ready to run our programs.

Tuesday, February 17, 2015

Installing GeoServer 1.6.2 on Tomcat on Ubuntu

In this post, we will deploy GeoServer latest release on Tomcat on Ubuntu. The first thing to do is to download the installer by accessing the GeoServer website at http://www.geoserver.org/download/


Here we can choose to download the version we want. To deploy on Tomcat on my machine, I need to download the Web Archive (.war) version. Click on the link that says Web Archive. In case you also need to install Tomcat on your machine follow the steps in my earlier post on Installing Tomcat 7 on Ubuntu.



This downloads a zip file containing the .war file. Having downloaded it, we need to copy it to a place where we can extract it to unzip the contents.


On my machine the default Tomcat instance is deployed at /usr/share/tomcat7 and accessible at http://localhost:8080. We can launch a browser to verify its working.


Next I need to go to the Tomcat bin directory to check the Tomcat version. For that enter the following command

cd /usr/share/tomcat7/bin/

Then execute the following command

./version.sh

to check the version.



Next we need to copy the .war file from the place you extracted the zip file into the Tomcat 7 webapp folder. If you installed Tomcat using Ubuntu apt-get command, the webapps folder would be under /var/lib/tomvat7/webapps.

If you extracted the files at /tmp the command would be as follows

sudo cp /tmp/geoserver-2.6.1-war/geoserver.war /var/lib/tomcat7/webapps



You may be prompted for your password.



This deploys GeoServer on your local Tomcat instance that can be accessed by entering the following url on your machine

http://localhost:8080/geoserver



That's it. Thanks!