Beruflich Dokumente
Kultur Dokumente
ii
Revision History
Revision Date Change Description Reason for Change
1.0
Feb 09
NA
2.1
23/02/2009 Updated backup script, share connections 24/02/2009 Added revision history & title page 27/02/2009 Updated spelling errors, tried to make step verbiage consistent
Share did not connect correctly after reboot, and backup script was not backing up file system correctly. To track revisions and what the document is for. Lots of spelling mistakes were noticed and verbiage varied to much.
2.2
2.3
iii
Table of Contents
1 2 3 4 Add Packages & Update Current Packages ............................................................................ 4 Enable Syntax Highlighting for VIM ..................................................................................... 4 Switch Java to Sun Java 6....................................................................................................... 4 Tomcat 6 Configuration.......................................................................................................... 4 Edit the default file for Tomcat 6................................................................................................ 4 Edit the tomcat-users.xml ........................................................................................................... 4 Configure SSL ............................................................................................................................ 5 Edit the server.xml ...................................................................................................................... 7 Restart Tomcat 6 Service ............................................................................................................ 8 5 Configure PostgreSQL............................................................................................................ 8 Configure Access ........................................................................................................................ 8 Change postgres User Password ............................................................................................. 8 Import Additional Schema...................................................................................................... 8 Edit the postgresql.conf .......................................................................................................... 8 Edit the pg_hba.conf ............................................................................................................... 9 Restart PostgreSQL..................................................................................................................... 9 Configure Database for Logicaldoc ............................................................................................ 9 6 Install Logicaldoc.................................................................................................................. 10 Upload WAR File ..................................................................................................................... 10 Upload Email Plugin................................................................................................................. 10 Create Directory for Logicaldoc Documents............................................................................ 11 Setup Logicaldoc ...................................................................................................................... 11 7 Configure Email Plugin ........................................................................................................ 15 8 Modify File Size for Uploads to Logicaldoc ........................................................................ 15 Modify the web.xml.................................................................................................................. 15 Restart Tomcat 6 Server............................................................................................................ 15 9 Configure Windows XP Workstations for Webdav.............................................................. 15 10 Configure Backups............................................................................................................ 19 Create Mount Directory and Verify Connectivity .................................................................... 19 Configure Share to Automatically Reconnect .......................................................................... 19 Create File with for the User Credentials ............................................................................. 19 Edit the fstab File .................................................................................................................. 19 Create Backup Script & Schedule Cron Job ............................................................................. 19 Create the Backup Script ...................................................................................................... 19 Add Script to cron.d.............................................................................................................. 20 11 Troubleshooting ................................................................................................................ 21 CIFS problems .......................................................................................................................... 21 Version of CIFS .................................................................................................................... 21 Enable Debug for CIFS......................................................................................................... 21
4 Tomcat 6 Configuration
Edit the default file for Tomcat 6
1. 2. 3. 4. 5. Type sudo vim etc/default/tomcat6, press Enter Press I to edit Remove the # to uncomment TOMCAT6_USER=tomcat6 Remove the # to uncomment JAVA_HOME=/usr/lib/jvm/openjdk-6-jdk Change JAVA_HOME=/usr/lib/jvm/openjdk-6-jdk to JAVA_HOME=/usr/lib/jvm/java-6-sun 6. Remove the # to uncomment CATALINA_BASE=/var/lib/tomcat6 7. Remove the # to uncomment JAVA_OPTS="-Djava.awt.headless=true Xmx128M" 8. Change Xmx128M to Xmx900M 9. Remove the # to uncomment TOMCAT6_SECURITY=yes 10. Change TOMCAT6_SECURITY=yes to TOMCAT6_SECURITY=no 11. Press Esc, then type :wq 12. Press Enter
Logicaldoc Install & Configuration on Ubuntu 8.10 4. Remove the comments <!-- and -->
5. Change the line <role rolename="role1"/> to <role rolename="admin"/>, press Enter 6. Type <role rolename="manager"/> 7. Change the line <user username="both" password="tomcat" roles="tomcat,role1"/> to <user username="ldocadmin" password="MyNewP@ssw-rd!" roles="admin"/> 8. Change the line <user username="role1" password="tomcat" roles="role1 "/> to <user username="ldocmanager" password="MyNewP@ssw0rd!" roles="manager"/> Note: Change the passwords to something other than the passwords used in this example! 9. Change the password for the tomcat user
Configure SSL
These steps will create a certificate request that can will either be a self signed certificate or use the certificate request and have it signed be another Certification Authority (CA). Notes will be mentioned for creating a certificate request that will be singed by an Entrust CA. 1. Type cd /etc/tomcat6, press Enter 2. Type sudo keytool -genkey -v -alias tomcat -keyalg RSA -keysize 2048 -keystore tomcat.jks -storepass logicaldoc -keypass logicaldoc 3. Press Enter 4. Type in the correct value for the prompts that follow.
Logicaldoc Install & Configuration on Ubuntu 8.10 6 Note: The first and last name needs to be the FQDN that will be used to access the server. Use the Entrust Reference number for the first & last name and leave the other fields blank if certificate request is going to be signed by an Entrust CA.
6. Type sudo keytool -certreq -alias tomcat -keyalg RSA -keystore tomcat.jks storepass logicaldoc -file tomcat-ssl-request.p10 7. Press Enter 8. To generate a self signed certificate type sudo keytool -selfcert -alias tomcat keystore tomcat.jks, press Enter. Otherwise take the tomcat-ssl-request.p10 to get signed by a CA. Note: The next steps are only if the certificate request was signed by a CA. It will be assumed that the signed certificate request and CA certificates have been uploaded to the server directory /etc/tomcat6 9. Type sudo keytool -trustcacerts -import -keystore tomcat.jks -storepass logicaldoc -alias SubCA -file subca.crt 10. Press Enter 11. Type sudo keytool -trustcacerts -import -keystore tomcat.jks -storepass logicaldoc -alias RootCA -file rootca.crt 12. Press Enter 13. Type sudo keytool -import -trustcacerts -alias tomcat -keystore tomcat.jks storepass logicaldoc -file logicaldoc.crt 14. Press Enter
6. Scroll down to <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" 7. Remove the comments <!-- and --> around the Connector section 8. Change port="8443" to port="443" 9. Amend to the end of the Connector section keystoreFile="/etc/tomcat6/tomcat.jks" keystorePass="logicaldoc"
10. Scroll down to <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> 11. Change redirectPort="8443" to redirectPort="443"
5 Configure PostgreSQL
Configure Access
Change postgres User Password
1. 2. 3. 4. 5. Type sudo -u postgres psql template1, press Enter Type ALTER USER postgres with encrypted password 'N3wP@ssw0rd!'; Press Enter Type \q Press Enter
Restart PostgreSQL
1. Type sudo /etc/init.d/postgresql-8.3 restart 2. Press Enter
Logicaldoc Install & Configuration on Ubuntu 8.10 10 10. Type ALTER USER logicaldocservice with encrypted password 'LogicaldocPassword'; 11. Press Enter 12. Type ALTER DATABASE logicaldocdb OWNER TO logicaldocgroup; 13. Press Enter 14. Type \q, press Enter
6 Install Logicaldoc
Upload WAR File
1. Open a web browser such as Firefox or Internet Explorer 2. Type https://logicaldoc.mydomain.com/manager/html, press Enter Note: Point to the server that hosts Logicaldoc using either the FQDN or the IP address. 3. Type ldocmanager for the username, then type in the password 4. Click OK 5. Scroll down to the Deploy section 6. Click Browse to select the WAR to upload 7. Browse to where logicaldoc.war is located, click Open 8. Click Deploy 9. Message: OK should be displayed up top
Logicaldoc Install & Configuration on Ubuntu 8.10 11 5. Type sudo chown tomcat6:tomcat6 /var/lib/tomcat6/webapps/logicaldoc/WEBINF/plugins/ logicaldoc-email-4.0.0-plugin.zip 6. Press Enter
Setup Logicaldoc
1. Open the web browser 2. Type Type https://logicaldoc.mydomain.com/logicaldoc/setup, press Enter Note: Point to the server that hosts Logicaldoc using either the FQDN or the IP address 3. Type ldocadmin for the user name and then type the password 4. Click OK 5. Type /opt/Logicaldoc, and then click Continue
12
6. Enable the radio button for External database management system, click Continue
13
7. Select PostgreSQL 8.x for the database type, fill in the information for the server, user name, password, and then click Continue
Logicaldoc Install & Configuration on Ubuntu 8.10 8. Type in the information for the mail server, click Continue
14
9. Click the Click here button to proceed with logging into Logicaldoc
15
16
5. Uncheck Repair all detected reinstall problems 6. Check the following: a. Force all files to be reinstalled, regardless of checksum or version b. Verify that required user registry entries are present c. Verify that required machine registry entries are present d. Validate shortcuts
17
10. Click Start Run 11. Type regedit, click OK 12. Naviagate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\ Parameters
13. Right click into the right field and choose New from the context-menu 14. Choose DWord-Value 15. Name the new value UseBasicAuth 16. Right click on UseBasicAuth and choose Modify 17. Change the value 0 (disabled) to 1 (enabled)
18
18. Click OK 19. Click File in the top left corner, select Exit to close the Registry 20. Click Start Shut Down 21. Select Restart, click OK 22. After the computer Reboots, login to the workstation 23. Double click on My Network Places 24. Double click on Add Network Place 25. A wizard will start, click Next 26. Select Choose another network location, click Next 27. Type https://logicaldoc.mydomain.com:443/logicaldoc/webdav/store, click Next Note: Point to the server that hosts Logicaldoc using either the FQDN or the IP address 28. Click Yes to proceed for the first Security Alert 29. Click Yes to proceed for the second Security Alert 30. Type in the username and password used for authenticating to Logicaldoc, click OK
31. Type Logicaldoc for the name of the network place, click Next 32. Click Finish 33. Click Yes to accept the first Security Alert 34. Click Yes to accept the second Security Alert 35. Type in the username and password used for authenticating to Logicaldoc, click OK
19
10 Configure Backups
It is assumed that a share has been created and a user account has been provided that will allow read/write access to the share. The share that will be used is called backups, and the user name/password is Logicaldoc/password1234!. An IP or FQDN can be used to connect to the share. At this point in time I have not been able to get the fstab function to correctly work as documented. My workaround is to skip 10.2.1 and use the following line in the fstab //10.60.50.10/backups /mnt/mountpoint cifs user=myuser,password=mypassword,auto 0 0. I have been successful with that edit to the fstab, and will hopefully figure out what is wrong!
Logicaldoc Install & Configuration on Ubuntu 8.10 20 FSBACKUP="logicaldocFS" DBBACKUP="logicaldocDB" DATABASE="logicaldocdb" PGUSER="postgres" DATE=`date '+%F'-'%H%M'` /usr/bin/pg_dump "-U" $PGUSER $DATABASE | gzip > $BACKUP_DIR/$DBBACKUP.$DATE.gz tar cpzf $BACKUP_DIR/$FSBACKUP.$DATE.tar.gz $LOGICALDOCFILES
4. Press Esc, then type :wq 5. Press Enter 6. Type sudo chmod +x /usr/local/bin/logicaldoc-backup.sh, press Enter
21
11 Troubleshooting
CIFS problems
Version of CIFS
To find out what version of CIFS is installed use the command below. 1. Type modinfo cifs 2. Press Enter