OpenKM Setup from Scratch on Ubuntu Server 14.04
OS Setup
OS Setup
Select “OpenSSH” only
/etc/network/interfaces
Iface eth0 inet static
address 188.4.72.198
network 255.255.255.0
gateway 188.4.72.231
/etc/resolvconf/resolv.conf.d/base
nameserver 188.4.72.16
nameserver 188.4.72.7
resolvconf -u
Brand New Server Setup
## Installing MySQL Server
apt-get install mysql-server
after that it will prompt you to input the Master password for MYSQL server (input and REMEMBER IT……)
## Step 2 Installing Tomcat7 Server
apt-get install libtcnative-1 libtomcat7-java tomcat7 tomcat7-admin tomcat7-common tomcat7-docs tomcat7-examples tomcat7-user
apt-get install unzip
wget http://liquidtelecom.dl.sourceforge.net/project/openkm/6.3/openkm-6.3.0-community-tomcat-bundle.zip
unzip openkm-6.3.0-community-tomcat-bundle.zip
Edit /etc/mysql/my.cnf and
under [mysqld] section in your ini file, add:
default-storage-engine = innodb
vi /etc/mysql/my.cnf
Check if your MySQL installation has InnoDB engine enabled:
$ service mysql restart
$ mysql -h localhost -u root -p
mysql> show engines;
DROP DATABASE IF EXISTS okmdb;
CREATE DATABASE okmdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER openkm@localhost IDENTIFIED BY 'okmtest123';
GRANT ALL ON okmdb.* TO openkm@localhost WITH GRANT OPTION;
## Step 3 Configurating Tomcat7 Server for OpenKM
##
## Step 3.1
ln -s /var/lib/tomcat7/repository /usr/share/tomcat7/repository
## Step 3.2 Preparing OpenKM.cfg
cp /home/kevinchui/tomcat/OpenKM.cfg /usr/share/tomcat7
##
##
## modify the line in file /usr/share/tomcat7/OpenKM.cfg
## hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
## hibernate.hbm2ddl=create
## this action has been automated with steam edit as below command
## Step 3.3 Preparing OpenKM.xml, PropertyGroups
##
cp /home/kevinchui/tomcat/OpenKM.xml /usr/share/tomcat7
cp /home/kevinchui/tomcat/PropertyGroups.xml /usr/share/tomcat7
## Step 3.4 Preparing setenv.sh (Environment Setting)
cp /home/kevinchui/tomcat/bin/setenv.sh /usr/share/tomcat7/bin
## remember to remark the line in file /usr/share/tomcat7/bin/setenv.sh
## #CATALINA_PID=$CATALINA_HOME/catalina.pid
## this action has been automated with stream edit as below command
## Step 3.5 Preparing lib for OpenKM
cp /home/kevinchui/tomcat/lib/javassist-*.jar /usr/share/tomcat7/lib
cp /home/kevinchui/tomcat/lib/jstl-1.2.jar /usr/share/tomcat7/lib
cp /home/kevinchui/tomcat/lib/jta-1.1.jar /usr/share/tomcat7/lib
cp /home/kevinchui/tomcat/lib/log4j-1.2.17.jar /usr/share/tomcat7/lib
cp /home/kevinchui/tomcat/lib/log4j-initializer.jar /usr/share/tomcat7/lib
cp /home/kevinchui/tomcat/lib/mail-1.*.jar /usr/share/tomcat7/lib
cp /home/kevinchui/tomcat/lib/mysql-connector-java-5.1.12-bin.jar /usr/share/tomcat7/lib
cp /home/kevinchui/tomcat/lib/tomcat-juli-adapters.jar /usr/share/tomcat7/lib
cp /home/kevinchui/tomcat/lib/unicode.ttf /usr/share/tomcat7/lib
cp /home/kevinchui/tomcat/lib/sigar /usr/share/tomcat7/lib/sigar -R
cp /home/kevinchui/tomcat/lib/hsqldb.jar /usr/share/tomcat7/lib/
## Step 3.6 Configurating log4j
ln -s /etc/tomcat7 /usr/share/tomcat7/conf
cp /home/kevinchui/tomcat/conf/log4j.properties /etc/tomcat7
ln -s /var/lib/tomcat7/common /usr/share/tomcat7/common
ln -s /var/lib/tomcat7/server /usr/share/tomcat7/server
## Cancelled: cp /home/kevinchui/tomcat/bin/tomcat-juli.jar /usr/share/tomcat7/bin
## Step 3.7 Configurating context.xml
## modify /etc/tomcat7/context.xml
## find the follwing line
## WEB-INF/web.xml
## and add the following lines after it
## Step 3.8 Configurating server.xml
## modify /etc/tomcat7/server.xml
## find the follwing line
## and add the following lines after it
##
##
## find the follwing line
##
## and add the following 7 lines after it
name="jdbc/OpenKMDS" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000" validationQuery="select 1"
username="openkm" password="okmtest123" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/okmdb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8"/>
mail.smtp.host="localhost" mail.from="testing@openkm.com"/>
##
##
## Modify the line
##
##
## and replace it with following
##
##
##
##
chown tomcat7.tomcat7 /usr/share/tomcat7 /var/lib/tomcat7 /etc/tomcat7/* -R
## Step 5 Deploying OpenKM.war
service tomcat7 stop
cp /home/kevinchui/tomcat/webapps/OpenKM.war /var/lib/tomcat7/webapps/
fixing upload with zip problem
ln -s /var/log/tomcat7 /usr/share/tomcat7/logs
apt-get install libreoffice
apt-get install imagemagick
apt-get install clamav
apt-get install clamav clamav-daemon
freshclam
SWFTOOLS SETUP
The following works for Ubuntu 14/12….
cp /home/kevinchui/tomcat/bin/pdf2swf /usr/bin
the following only works in Ubuntu 12
apt-get install add-apt-repository
apt-get install software-properties-common
apt-get install python3-software-properties
apt-get install python-software-properties
add-apt-repository ppa:guilhem-fr/swftools
apt-get update
apt-get install swftools
start TOMCAT server
service tomcat7 start
make sure start “OK”
tail /var/log/tomcat7/catalina.out –f
INFO: Server startup in 95604 ms
Means startup completed, we can go on
http://188.4.72.198:8080/OpenKM
okmAdmin/admin
system.openoffice.path
/usr/lib/libreoffice
system.imagemagick.convert
/usr/bin/convert
system.swftools.pdf2swf
/usr/bin/pdf2swf -f -T 9 -t -s storeallcharacters ${fileIn} -o ${fileOut}
system.webdav.fix
true
system.webdav.server
true
system.ghostscript.ps2pdf
/usr/bin/pdf2swf
system.antivir
/usr/bin/ clamscan
application.url
http://188.4.72.198:8080/OpenKM/index.jsp
Logout and restart tomcat server
service tomcat7 restart
No comments:
Post a Comment