Monday, January 24, 2011

Installing Ubuntu from Windows.

Installing Ubuntu from Windows.

1. Go to Ubuntu Website and search for Wubi installer (Install Ubuntu from windows)
2. Once Installed Ubuntu will be installed on Windows as file of size 16Gb or so root.dsk under C:/ubuntu folder.
3. Once you restart login to ubuntu with the username and password you set up while installing Wubi.
4. Go to System->Synaptic Package Manager and you will be able to install different packages for Ubuntu.
5. Most of the packages can be installed from terminal (Press Cntr T) a black window will appear and you can install different packages
   using apt command eg apt intsall mysql this will install mysql

Setting up Liferay on Ubuntu 10.04


Setting up Liferay on Ubuntu 10.04

  1. From the application>accessories>terminal root# type the command
    add-apt-repository "deb http://archive.canonical.com/ lucid partner"
  2. Then type in the command
    sudo apt-get install sun-java6-jdk
    This will install jdk at /usr/lib/jvm location.
  3. Install other candidates sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
  4. To setup sun jdk as default type in the below command
    sudo update-java-alternatives -s java-6-sun
Installation on my system were like this ;
eg: root@ubuntu:/# sudo update-java-alternatives -l
java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk
java-6-sun 63 /usr/lib/jvm/java-6-sun
  1. Add the following line to etc/jvm file. If the file is not present create a jvm file and add the following to the top of the file /usr/lib/jvm/java-6-sun
  2. Check the version of the java from command prompt>java -version
    Other commands :
    root@ubuntu:/home/localadmin# echo $JAVA_HOME
/usr/lib/jvm/sun-6-java
root@ubuntu:/home/localadmin# whereis javac
javac: /usr/bin/javac /usr/share/man/man1/javac.1.gz

. only can run cmd line jedit
Set JAVA_HOME
sudo nano /etc/bash.bashrc
and add
JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_HOME

2. support gui jedit
sudo vim /etc/environment
and add
JAVA_HOME="/usr/lib/jvm/java-6-sun"
  1. Download eclipse from the eclipse website. Extract the eclipse zip and double click on the eclipse autorun icon.
  2. Install mysql using the command.
    sudo apt-get install mysql-server
  3. Check if mysql is running properly
    opt/lib/mysql/bin>mysql -p -u root
  4. Set up the lportal database
drop database if exists lportal;
create database lportal character set utf8;
use lportal;
    create user lportal;
    set password for 'lportal'@'localhost' = password('lportal');

grant all on lportal.* to 'lportal'@'localhost' identified by 'lportal';
Grant all on lportal.* to 'lportal'@'localhost.localdomain' identified by 'lportal'

  1. Download the bundled liferay and Tomcat and uzip at the location desired.
  2. Create new set-env.sh file in bin folder of tomcat. Add the following
JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8 -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m "

  1. Create a portal-ext.properties at the liferay root ie besides tomcat folder and license , data and deploy folder. Add the below commands and there you are done

##MySql
jdbc.default.driverClassName=com.mysql.jdbc.Driver

jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false

jdbc.default.username=lportal

jdbc.default.password=lportal
  1. From termnial go to tomcat bin and $ ./startup.bat && tail -f ../logs/catalina.out
  2. Done liferay should start at http://localhost:8080/web/guest.