cancel
Showing results for 
Search instead for 
Did you mean: 
resplin
Elite Collaborator
Elite Collaborator

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



openSUSE
installation


To Install Alfresco with MySQL on openSUSE 10.3



  1. Download and install JDK 5 (From Sun Java) at http://java.sun.com/javase/downloads/index_jdk5.jsp

  2. Check MySQL and PHP are installed. 
  3. Get alfresco.tar.gz

  4. 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.)

  5. Edit the alfresco.sh file (eg “vi alfresco.sh” will do it.) Ensure that the variable APPSERVER is set to /opt/alfresco/tomcat

  6. 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
  7. Edit 2 different files that tell Alfresco to use MySQL instead of HSQL.


    • /opt/alfresco/tomcat/shared/classes/extension/custom-repository.properties
        
      Comment out the HSQL connection lines using #

      Uncomment the MySQL connection lines and adjust as appropriate

    • /opt/alfresco/tomcat/shared/classes/extension/custom-hibernate-dialect.properties

              Comment out the HSQL line using #
              Uncomment the MySQL line
  8. Create the MySQL Database
        There are 2 ways to go here.
       

         
    1. 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.
    2. 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.



    1. 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 .
    2. 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!)
    3. 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)
    4. 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.



    1. Install Alfresco as per instructions at beginning of this document. Do Not Start Alfresco!
    2. Extract the MySQL file to the database you have created.
    3. 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.
    4. Start Alfresco and check it has worked.

    Troy Heland – 12 March 2008