10-20-2011 04:33 AM
install
reboot
lang en_US.UTF-8
keyboard us
skipx
%include /tmp/network-with-hostname.sh
rootpw linux
firewall –disabled
selinux –disabled
authconfig –enableshadow –enablemd5
timezone –isUtc Asia/Shanghai
bootloader –location=mbr
services –enabled=mysqld
bootloader –location=mbr
clearpart –all –initlabel
part swap –size=500 –ondisk=vda
part / –fstype ext4 –grow –size=100 –ondisk=vda
%packages –excludedocs –instLangs=en
@core
-mdadm
curl
wget
gcc
make
openoffice.org-headless
ImageMagick
mysql-server
mysql
#swftools dependencies
gcc-c++
zlib-devel
libjpeg-devel
giflib-devel
freetype-devel
%end
%pre
#!/bin/sh
wget -O - http://office:90/flexshare/os/common/remove-firmware.sh | bash
wget -O - http://office:90/flexshare/os/common/set-hostname.sh | bash
%end
%post –log=/root/post.log
#!/bin/sh
export ALFRESCO=alfresco-community-4.0.a
service network restart
chkconfig crond off
chkconfig atd off
wget -O - http://office:90/flexshare/os/components/java/install.sh | bash
wget -O - http://office:90/flexshare/os/components/tomcat/install.sh | bash
. /etc/profile.d/tomcat.sh
echo "JAVA_OPTS=\"-Xms128m -Xmx1024m -Xss96k -XX:MaxPermSize=160m -Dalfresco.home=$CATALINA_HOME -Dcom.sun.management.jmxremote\"" >> /etc/profile.d/tomcat.sh
echo "TOMCAT6_SECURITY=no" >> /etc/profile.d/tomcat.sh
echo "setup mysql"
sed -i 's/\[mysqld\]/&\
default-storage-engine=InnoDB/' /etc/my.cnf
sed -i 's/\[mysqld\]/&\
default-character-set=utf8/' /etc/my.cnf
service mysqld restart
mysql -uroot -e "CREATE DATABASE IF NOT EXISTS alfresco;"
mysql -uroot -e "GRANT ALL PRIVILEGES ON alfresco.* TO alfresco@localhost IDENTIFIED BY 'alfresco';"
#TODO weird: but this seems necessary
mysqladmin -uroot password alfresco
echo "downloading alfresco"
mkdir /root/alfresco-down
cd /root/alfresco-down
wget -q http://office:90/flexshare/os/alfresco/$ALFRESCO.zip
unzip -q $ALFRESCO.zip
echo "copying and unpacking the wars"
cp /root/alfresco-down/web-server/webapps/*.war $CATALINA_HOME/webapps
cd $CATALINA_HOME/webapps
unzip -q share.war -d share
unzip -q alfresco.war -d alfresco
#TODO i don't think we need the war archives anymore, so delete them
#rm -f *.war
echo "copying alfresco files to $CATALINA_HOME"
cp /root/alfresco-down/bin/* $CATALINA_HOME/bin
rm -rf /root/alfresco-down
echo "config alfresco web apps"
mkdir -p $CATALINA_HOME/shared/classes
cd $CATALINA_HOME/shared/classes
wget -q http://office:90/flexshare/os/alfresco/alfresco-global.properties
cd $CATALINA_HOME/lib
wget -q http://office:90/flexshare/os/alfresco/mysql-connector-java-5.1.18-bin.jar
sed -i 's/shared.loader=/shared.loader=${catalina.home}\/shared\/classes/g' $CATALINA_HOME/conf/catalina.properties
chown -R tomcat.tomcat $CATALINA_HOME
mkdir -p /var/alfresco/alf_data
chown -R tomcat.tomcat /var/alfresco
#default logging traps into a permission problem, set the path
sed -i 's/alfresco.log/${catalina.home}\/logs\/alfresco-share.log/g' $CATALINA_HOME/webapps/share/WEB-INF/classes/log4j.properties
sed -i 's/alfresco.log/${catalina.home}\/logs\/alfresco-alfresco.log/g' $CATALINA_HOME/webapps/alfresco/WEB-INF/classes/log4j.properties
%end
15:47:27,046 WARN [org.alfresco.util.AbstractTriggerBean] Job ehCacheTracerJob is not active/enabled
15:47:36,402 ERROR [org.springframework.beans.factory.support.DefaultListableBeanFactory] Destroy method on bean with name 'replicationParams' threw an exception
java.lang.OutOfMemoryError: PermGen space
at java.lang.Class.getDeclaredConstructors0(Native Method)
16:06:25,327 WARN [hibernate.cfg.SettingsFactory] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
10-30-2011 01:30 PM
10-30-2011 02:47 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.