Alfresco Installation on Ubuntu 10.04
Steps that you need to follow to install Alfresco on Ubuntu 10.04-
Install Java 1.6.0.xx
Install Apache-Tomcat 6.0.xx
Install Mysq 5.1.xx
Create alfresco database.
Alfresco Installation
Note : xx – your application version.
Java Installation
To install Sun- Java you need to activate Lucid partner repository.
Follow path
Open Terminal and type the following command to update system packages.
sudo apt-get update
Open Synaptic Package Manager type sun-java in Quick Search textbox.
Select sun-java6-jre for installation, it will automatically select all the related packages.
Finally click on 'Apply' button to begin installation process.
To check the successful installation, open Terminal and type the following command , it will give the information of installed java version.
java -version
Tomcat Installation
Pre-installed java is neccessary for installing Tomcat.
To check java installation on your system type the command-
dpkg --get-selections | grep sun-java
if java is installed on your machine then it will give following output,otherwise you need to install Java as I have explained in previous section.
sun-java6-bin install
sun-java6-jdk install
sun-java6-jre install
sun-java6-plugin install
Now Extract it using Archive Manager or type following command at Terminal-
tar xvzf apache-tomcat-6.0.xx.tar.gz
Now move tomcat to permanent location. As example I have moved tomcat to /usr/local/tomcat you can choose some other location.
sudo mv apache-tomcat-6.0.xx/ /usr/local/tomcat
Note: Move command syntax is -- mv from_location to_location So either be on that location or use full path.
Tomcat requires setting the JAVA_HOME variable. The best way to edit .bashrc file.
gedit ~/.bashrc
Add the following line:
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.xx
Start tomcat by double clicking on startup.sh file or first cd into /usr/local/tomcat/bin and run the startup.sh as-
./startup.sh
Note : To run .sh file you must have execute permission on files to execute.
MySql Installation
Open Synaptic package manager type mysql-server in Quick search and select
mysql-server-5.1
For Mysql-query-browser find and select mysql-query-browser, click on Apply to install.
Create alfresco database
Open Terminal and type following commands-
mysql -u root -p
it will ask for root password, type root user password.
Run following commands-
create database alfresco default character set utf8 collate utf8_bin;
grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;
Check that database with name alfresco is created by using show commands-
show databases;
This will show the list of all the databases that are already created.
Alfresco Installation
Download alfresco-community-war-3.3g.tar.gz from alfresco site.
Extact it some location.
Copy following jars into tomcat/lib folder-
Copy war files at tomcat/webapps-
Create following folder structue inside tomcat-
tomcat/shared/classes/alfresco
Copy following folders form extracted alfresco-community-war-3.3g / extensions and paste them at tomcat/shared/classes/alfresco/
extension
messages
web-extension
Create folder alf_home at your home folder and copy and paste following files
alfresco.sh
alf_start.sh
alf_stop.sh
apply_amps.sh
virtual_alf.sh
virtual_start.sh
virtual_stop.sh
Copy bin folder from extracted folder's commands folder to alf_home.
alfresco.sh
Open alfresco.sh with gedit find 'ALF_HOME=' and put created alf_home folder path.
ALF_HOME=/home/meenakshi/alfresco_data/alf_home
For 'APPSERVER=' put the path of tomcat. For my case this would be-APPSERVER="/usr/local/tomcat"
For JAVA_HOME put path for java. For example-
export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.22"
save changes and close the file.
alf_start.sh
alf_stop.sh
Paste alfresco-global.properties at /usr/local/tomcat/shared/classes and modify some entries, I am giving sample entries; replace them with your original values.
dir.root=/home/meenakshi/alfresco_data/alf_data
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost:3306/alfresco
Lastly increase the memory block size in /etc/default/tomcat6. Open tomact6 file using gedit and search for
JAVA_OPTS="${JAVA_OPTS} -XX:+UseConcMarkSweepGC" and change it into
JAVA_OPTS="${JAVA_OPTS} -Xms512m -Xmx512m"
Now run script alf_start.sh.
Check log files that are craeted at tomcat/logs folder for any errors and starting process for alfresco.
Alfresco.log is created at your alf_home.
If everything goes fine and tomcat start and deployed alfresco without any error then type-
http://localhost:8080/alfresco