The official documentation is at: http://docs.alfresco.com
To Install Alfresco with MySQL on openSUSE 10.3
- Download and install JDK 5 (From Sun Java) at http://java.sun.com/javase/downloads/index_jdk5.jsp
- Check MySQL and PHP are installed.
- Get alfresco.tar.gz
- Extract alfresco in the /opt/ directory. This means that in the /opt directory there should be an alfresco folder, in this folder there should be a number of files and directories including the alfresco.sh file (Which starts and stops Alfresco.)
- Edit the alfresco.sh file (eg â€œvi alfresco.shâ€ will do it.) Ensure that the variable APPSERVER is set to /opt/alfresco/tomcat
- Next step is to install Java Database Connector for MySQL. Download the MySQL Java Database Connector from http://dev.mysql.com/downloads/connector/j/ then copy the .JAR file into /opt/alfresco/tomcat/common/lib/mysql-connector-java-<version>-bin.jar
- Edit 2 different files that tell Alfresco to use MySQL instead of HSQL.
Comment out the HSQL connection lines using #
Uncomment the MySQL connection lines and adjust as appropriate
Comment out the HSQL line using #
Uncomment the MySQL line
- Create the MySQL Database
There are 2 ways to go here.
- If you are creating a new Alfresco installation then:
- Navigate to the '/opt/alfresco/extras/databases/mysql' folder.
- Setup the Alfresco database and user manually by loading the 'db_setup.sql' file into MySQL by running the command:
mysql -u root -p
- Obviously enter your root password for MySQL when it prompts you. (You can use any other user for MySQL that has the right permissions or alternatively you can create an Alfresco user)
- This creates the alfresco database as well as the username and password for Alfresco.
- Alfresco will now be able to start.
- To Start Alfresco go to /opt/alfresco/ and type ./alfresco.sh start
- Check if its running by going to a browser and typing http://localhost:8080/alfresco
- If its not running (or doesn't appear to be):
- Check the firewall! First try turning it off (In YaST, â€œSecurity and Usersâ€ - â€œFirewallâ€.....Turn the firewall off.....Restart Alfresco ./alfresco.sh restart. Then restart browser and check again.
- Check if MySQL is running....as root user run command â€œrcmysql statusâ€. If not then start it with command â€œrcmysql startâ€. Then Restart Alfresco and your browser and check again.
- Remember to restart firewall with port 8080 open.
- The other option is for restoring a backed up database. In which case:
Simply reinstate the backed up alfresco database. (Shit will (probably) hit the fan if you try and start Alfresco now without having replaced the base content store with the backed up one... DO NOT START ALFRESCO NOW!)
To BACKUP a running version of Alfresco on openSUSE 10.3.
- It is best, if you are doing a manual backup of Alfresco, to first stop the service. Go to the /opt/alfresco/ directory and type ./alfresco.sh stop .
- Backup the complete MySQL Alfresco Database.
- The easiest way to do this is to use MySQL Administrator. Open MySQL Administrator connect to your Alfresco server.
- On the Left hand side click on backup.
- On Right hand side click Alfresco then on the right arrow.
- Ensure you give the Project a Name at the top and click on â€œStart Backupâ€.
- Enter the file name and where to save it. (Obviously remember this!)
- Back up the Content Store of the system.
- The content store is simply the whole /opt/alfresco/alf_data directory.
- The best way (In my opinion) to make a backup of this directory is to use TAR
- Use the command â€œtar czf alfrescobackup.tgz /opt/alfresco/alf_dataâ€
- This will tar the entire directory and call it alfrescobackup.tgz (it may take a minute or two)
- The two files, the SQL file and the .tgz file are the backed up Alfresco. Save them some place safe! Remember to restart Alfresco!
To RESTORE Alfresco from a backup as described above on openSUSE 10.3.
- Install Alfresco as per instructions at beginning of this document. Do Not Start Alfresco!
- Extract the MySQL file to the database you have created.
- Extract the .tgz file to the directory /opt/alfresco/
Use the command â€œtar xzf alfrescobackup.tgzâ€
- NB. TAR will automatically overwrite files with the same name.
- Start Alfresco and check it has worked.
Troy Heland â€“ 12 March 2008