122 lines
4.5 KiB
Plaintext
122 lines
4.5 KiB
Plaintext
To Upgrade from prev version backup the db !
|
|
|
|
$> mysqldump -aCceQx --hex-blob --routines --triggers -u root -p -r /tmp/openemm-db.sql openemm
|
|
$> mysqldump -aCceQx --hex-blob --routines --triggers -u root -p -r /tmp/openemm_cms-db.sql openemm-cms
|
|
|
|
|
|
To integrate the OpenEMM 2015 to the installed Tomcat add this
|
|
chunk to the server.xml of Tomcat:
|
|
TOMCAT_HOME= %%PREFIX%%/apache-tomcat-8.5/lib/
|
|
|
|
vi TOMCAT_HOME/conf/server.xml
|
|
|
|
<Engine>
|
|
.....
|
|
<!-- add this part START -->
|
|
<Host name="OpenEMM" appBase="webapps-empty" autoDeploy="true" unpackWARs="false" xmlValidation="false" xmlNamespaceAware="false">
|
|
<Alias>localhost</Alias>
|
|
<Valve className="org.apache.catalina.valves.AccessLogValve"
|
|
resolveHosts="false" directory="${catalina.base}/logs/access/" rotatable="true" buffered="true"
|
|
prefix="" suffix="-access_openemm.log" fileDateFormat="yyyyMMdd"
|
|
pattern='%a %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' />
|
|
<Context cookies="false" docBase="%%APP_HOME%%/webapps/openemm" path="/openemm" reloadable="true" >
|
|
<JarScanner scanAllDirectories="true" scanBootstrapClassPath="true"/>
|
|
</Context>
|
|
<Context cookies="false" docBase="%%APP_HOME%%/webapps/openemm-ws" path="/openemm-ws2" reloadable="true" />
|
|
<Context docBase="%%APP_HOME%%/webapps/manual" path="/manual" allowLinking="true" />
|
|
</Host>
|
|
<!-- add this part END -->
|
|
</Engine>
|
|
|
|
Change the Engine name="Catalina" to point to defaultHost="OpenEMM"
|
|
Don't forget securing tomcat, or add a httpd in front secured
|
|
|
|
additional for the jndi database connect:
|
|
|
|
vi TOMCAT_HOME/conf/context.xml
|
|
|
|
<Context>
|
|
....
|
|
<Resource
|
|
name="jdbc/openemm_db"
|
|
driverClassName="com.mysql.cj.jdbc.Driver"
|
|
type="javax.sql.DataSource"
|
|
maxTotal="30"
|
|
auth="Container"
|
|
username="agnitas"
|
|
password="openemm"
|
|
url="jdbc:mysql://localhost/openemm?useUnicode=yes&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&zeroDateTimeBehavior=convertToNull"
|
|
/>
|
|
|
|
<Resource
|
|
name="jdbc/openemm_cms_db"
|
|
driverClassName="com.mysql.cj.jdbc.Driver"
|
|
type="javax.sql.DataSource"
|
|
maxTotal="30"
|
|
auth="Container"
|
|
username="agnitas"
|
|
password="openemm"
|
|
url="jdbc:mysql://localhost/openemm_cms?useUnicode=yes&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&zeroDateTimeBehavior=convertToNull
|
|
/>
|
|
</Context>
|
|
|
|
If database not running on localhost, replace according in the url.
|
|
|
|
# IMPORTANT sendmail is completly controlled from OpenEMM!
|
|
# It stops and starts sendmail
|
|
# check if sendmail is enabled
|
|
sendmail_enable="YES"
|
|
|
|
# check also if you have a symlink to sendmail
|
|
ln -s /etc/rc.d/sendmail /etc/rc.d/
|
|
|
|
# update the read right on the maillog file
|
|
chmod 644 /var/log/maillog
|
|
|
|
# to keep this change permanent change cron info in /etc/newsyslog.conf
|
|
# change line /var/log/maillog 644 7 * @T00 JC
|
|
|
|
#if not change tracking of mail sending / bounces is not working correct
|
|
|
|
# don't forget to add the link for mysql driver jar to tomcat
|
|
# if not already installed add: pkg install mysql-connector-java
|
|
ln -s %%PREFIX%%/share/java/classes/mysql-connector-java.jar TOMCAT_HOME/lib
|
|
chown -h www TOMCAT_HOME/lib/mysql-connector-java.jar
|
|
|
|
# setup the database scripts
|
|
#in the installed mysql add 2 databases
|
|
|
|
create database openemm;
|
|
create database openemm_cms;
|
|
|
|
#grant the privileges for the 2 db's from where you want to access
|
|
grant all privileges on openemm.* to agnitas@'X.Y.%' identified by 'openemm';
|
|
grant all privileges on openemm_cms.* to agnitas@'X.Y.%' identified by 'openemm';
|
|
|
|
flush privileges;
|
|
|
|
# import the inital data
|
|
mysql -u root -p openemm < %%PREFIX%%/share/doc/openemm2015/openemm-2015.sql
|
|
mysql -u root -p openemm_cms < %%PREFIX%%/share/doc/openemm2015/openemm_cms-2015.sql
|
|
|
|
#additional config for db acces can be done
|
|
%%PREFIX%%/openemm2015/webapps/openemm/WEB-INF/classes/emm.properties
|
|
or
|
|
%%PREFIX%%/openemm2015/webapps/openemm/WEB-INF/classes/cms.properties
|
|
|
|
# startup config for tomcat and OpenEMM
|
|
add to /etc/rc.conf
|
|
# Tomcat85 Server startup with initial config params for OpenEMM
|
|
tomcat85_enable="YES"
|
|
tomcat85_java_opts="-server -Djava.awt.headless=true -Xms256m -Xmx512m -Xss256k"
|
|
|
|
# Openemm 2015
|
|
openemm2015_enable="YES"
|
|
|
|
#NOW you are ready to start the tomcat and OpenEMM
|
|
|
|
service tomcat85 start
|
|
service openemm2015 start
|
|
or
|
|
%%PREFIX%%/etc/rc.d/openemm2015 start
|