Sunday, August 14, 2011

Installation of the latest eclipse Java EE IDE in (K)Ubuntu 11.04 x64

Prerequests
  • Java JRE (ubuntu packages sun-java6-jre or openjdk-6-jre).
  • Current Ubuntu repositories package (eclipse 3.5 (galileo)), which will be purged after installation/configuration of the latest eclipse. If it is not present install it using the command:
    sudo apt-get install eclipse
Download

Installation/Configuration
  • To (temporally) install the latest version (placed for example in ~/Downloads) at /usr/lib/eclipse_indigo/eclipse, open a terminal and give the commands:
    cd /usr/lib
    sudo mkdir eclipse_indigo
    cd eclipse_indigo
    sudo tar zxvf ~/Downloads/eclipse-jee-indigo-linux-gtk-x86_64.tar.gz
  • Keep the current (executable) script:
    sudo cp /usr/bin/eclipse /usr/bin/eclipse.curr
  • Purge ubuntu eclipse:
    sudo apt-get purge eclipse
    sudo apt-get autoremove
  • Move (as root) the latest eclipse from /usr/lib/eclipse_indigo/eclipse to /usr/lib:
    sudo rm -r /usr/lib/eclipse
    sudo mv /usr/lib/eclipse_indigo/eclipse /usr/lib
    sudo rmdir /usr/lib/eclipse_indigo
  • Move back (as root) the executable /usr/bin/eclipse:
    sudo mv /usr/bin/eclipse.curr /usr/bin/eclipse
  • Open as root the file /usr/bin/eclipse and change all occurrences of galileo to indigo.
  • Copy /usr/lib/eclipse/eclipse.ini to /etc
    sudo rm /etc/eclipse.ini
    sudo cp /usr/lib/eclipse/eclipse.ini /etc
  • As root create the file /usr/share/applications/eclipse.desktop to make a new (kde) menu entry:
    [Desktop Entry]
    Comment[en_US]=
    Comment=
    Exec=/usr/bin/eclipse
    GenericName[en_US]=Eclipse 3.7 (Indigo)
    GenericName=Eclipse 3.7 (Indigo)
    Icon=/usr/lib/eclipse/icon.xpm
    MimeType=
    Name[en_US]=eclipse
    Name=eclipse
    Path=
    StartupNotify=true
    Terminal=false
    TerminalOptions=
    Type=Application
    X-DBUS-ServiceName=
    X-DBUS-StartupType=
    X-KDE-SubstituteUID=false
    X-KDE-Username=
    X-Ubuntu-Gettext-Domain=desktop_kdebase
    If this entry is placed in "Lost & Found" menu category, move it to "Development", using the KDE Menu Editor.

Relevant Links

Installation of latest Liferay IDE (using eclipse-postgreSQL+postgis) in (K)ubuntu 11.04 x64

Prerequests

  • Java JRE (ubuntu packages sun-java6-jre or openjdk-6-jre).
  • Latest eclipse (click here for installation instructions)
  • PostgreSQL 9 (click here for installation instructions).

Downloads

Installation

Assuming that
  • liferay portal and plugins sdk will be installed in home directory and
  • downloded files are placed in ~/Downloads
open a terminal and give the commands:
cd
unzip Downloads/liferay-portal-tomcat-6.0.6-20110225.zip
mkdir liferay-plugins-sdk-6.0.6
cd liferay-plugins-sdk-6.0.6
unzip ../Downloads/liferay-plugins-sdk-6.0.6-20110225.zip

Problems

For eclipse/Liferay to be able to correctly locate PostgreSql/postgis jdbcs:
cp ~/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext/postgresql.jar ~/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext/postgresql.jar.1
cp ~/Downloads/postgresql-9.0-801.jdbc4.jar ~/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext/postgresql.jar
sudo cp /opt/PostgreSQL/9.0/PostGIS/java/jdbc/postgis* ~/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext

Next Steps

To set PostgreSQL as the default database of Liferay:
  • Extract the file create-minimal-postgresql.sql from the downloaded liferay-portal-sql-6.0.6-20110225.zip,
  • create database lportal using the command
  • psql -f create-minimal-postgresql.sql -U <user_name>
  • and follow the instructions of this link to configure Liferay.

Friday, August 12, 2011

Installation of the latest (postgis enabled) PostgreSQL in (K)Ubuntu 11.04 x64

Download
Latest version of  PostgreSQL Graphical Installer (for the time being is postgresql-9.0.4-1-linux-x64.bin)

Installation
  • To install  PostgreSQL at /opt directory, call the Graphical Installer:
  • sudo chmod 0755  postgresql-9.0.4-1-linux-x64.bin
    sudo ./postgresql-9.0.4-1-linux-x64.bin
  • Optionally, install  postgis-1.5, using the Application Stack Builder before closing Graphical Installer. Otherwise, you may install it later, by calling the Application Stack Builder entry in your (kde/gnome) menu (after resolving the corresponding problems (see below)).

Configuration
Edit ~/.profile and append the line

source /opt/PostgreSQL/9.0/pg_env.sh
at the end, to update $PATH and set other env variables (you have to logout/login, for this change to take effect).

Problems
  • Execution of
  • /opt/PostgreSQL/9.0/stackbuilder/bin/stackbuilder
    executable failed, with a number of messages for missing libraries. The following links to (installed) libraries had to be set:
    sudo ln -sf  /usr/lib/x86_64-linux-gnu/libtiff.so.4.3.3 /usr/lib/x86_64-linux-gnu/libtiff.so.3
    sudo ln -sf /lib/x86_64-linux-gnu/libexpat.so.1.5.2 /lib/x86_64-linux-gnu/libexpat.so.0
    Depending on your current installation, other links to libraries (or the libraries themselves) may be missing as well. You have to locate those libraries (and if they miss, to install them) and make the corresponding links.
  • To be able to run stackbuilder from the (kde) menu entry, edit (as root) the file
  • /usr/share/applications/pg-stackbuilder-9_0.desktop
    and change the line
    Exec=/opt/PostgreSQL/9.0/scripts/launchstackbuilder.sh
    to
    Exec=kdesudo /opt/PostgreSQL/9.0/scripts/runstackbuilder.sh
  • To correct the (postgis related) problem of "$libdir/postgis-1.5.so not found", execute the command:
  • sudo ln -sf /opt/PostgreSQL/9.0/lib/postgis-1.5.so /opt/PostgreSQL/9.0/lib/postgresql/postgis-1.5.so

Installation of MySQL(MariaDB) and phpMyAdmin on Ubuntu LTS focal (20.04)

Coming back again, "ten years after", trying to cope with this incredible mess that has resulted from the -admittedly- very good e...