Created
October 19, 2011 21:28
-
-
Save zachbrowne/1299740 to your computer and use it in GitHub Desktop.
Liferay installation on Ubuntu 10.04 LTS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setting up Liferay on Ubuntu 10.04 | |
# Add java repository & install java | |
add-apt-repository "deb http://archive.canonical.com/ lucid partner" | |
apt-get update | |
apt-get install sun-java6-jdk | |
apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts | |
# Tell ubuntu to use java | |
update-java-alternatives -s java-6-sun | |
# Add to jvm | |
cat > /etc/jvm <<EOF | |
/usr/lib/jvm/java-6-sun | |
EOF | |
# Add to bash | |
cat > /etc/bash.bashrc <<EOF | |
JAVA_HOME=/usr/lib/jvm/java-6-sun | |
EOF | |
# Export new variable | |
export JAVA_HOME | |
# Add to environment if gui (can't hurt no matter) | |
cat > /etc/environment <<EOF | |
JAVA_HOME="/usr/lib/jvm/java-6-sun" | |
EOF | |
# Install and create liferay database | |
apt-get install mysql-server | |
mysql -uroot -ppassword # <-- your password in quotes if not alphanumeric | |
CREATE DATABASE lportal CHARACTER SET UTF8; | |
GRANT ALL ON lportal.* to lportal@'localhost' IDENTIFIED BY 'lportal'; | |
GRANT ALL ON lportal.* to lportal@'localhost.localdomain' IDENTIFIED BY 'lportal'; | |
FLUSH PRIVILEGES; | |
QUIT; | |
# Download liferay tomcat bundle | |
mkdir /etc/liferay | |
cd /etc/liferay | |
wget http://downloads.sourceforge.net/project/lportal/Liferay%20Portal/6.1.0%20B3/liferay-portal-tomcat-6.1.0-b3-20111014.zip?r=&ts=1319059233&use_mirror=superb-sea2 | |
mv l* liferay.zip | |
unzip l*.zip | |
rm liferay.zip | |
mv /etc/liferay/l*/* /etc/liferay | |
cd .. | |
rm -rf liferay | |
# Create java script | |
cat > /etc/liferay/set-env.sh <<EOF | |
JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8 -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m" | |
EOF | |
# Create this file in same directory as tomcat in the liferay download | |
cat > /etc/liferay/portal-ext.properties <<EOF | |
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 | |
EOF | |
# From termnial go to tomcat bin and run | |
./startup.sh && tail -f ../logs/catalina.out | |
# Liferay should start at http://localhost:8080/web/guest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment