This tip is valid for Linux and Windows and should be for Enterprise and Community as well. I have tried with last Enterprise build 4.2.0.3 on Ubuntu.
How to do an unattended installation of Alfresco with MySQL support with just one command, is as easy as running the command below (all in one line):
[bash]
sudo ./alfresco-enterprise-4.2.0.3-installer-linux-x64.bin –prefix /opt/alfresco \
–unattendedmodeui none –mode unattended –debuglevel 0 \
–enable-components javaalfresco,alfrescosharepoint,alfrescogoogledocs,libreofficecomponent \
–disable-components postgres \
–jdbc_url "jdbc:mysql://localhost/dbname?useUnicode=yes&characterEncoding=UTF-8" \
–jdbc_driver org.gjt.mm.mysql.Driver –jdbc_database dbname –jdbc_username dbuser \
–jdbc_password dbpassword –alfresco_ftp_port 2121 \
–alfresco_admin_password alfrescoadminpassword –baseunixservice_install_as_service 0 \
–alfrescocustomstack_services_startup demand
[/bash]
Change “dbname”, “dbuser”,”dbpassword”, “alfrescoadminpassword” with yours.
MySQL Note: In the example above I’m using MySQL, in this case you must have the DB already installed and when the command ends, copy the MySQL JDBC connector (mysql-connector-java-5.1.18-bin.jar) into the tomcat/lib directory.
Posgresql Note: If you want to install Posgresql it will be installed automatically using the installer but the command should be like this:
[bash]
sudo ./alfresco-enterprise-4.2.0.3-installer-linux-x64.bin –prefix /opt/alfresco \
–unattendedmodeui none –mode unattended –debuglevel 0 \
–enable-components javaalfresco,postgres,alfrescosharepoint,alfrescogoogledocs,libreofficecomponent \
–jdbc_url "jdbc:postgresql://localhost/dbname?useUnicode=yes&characterEncoding=UTF-8" \
–jdbc_driver org.postgresql.Driver –jdbc_database dbname –jdbc_username dbuser \
–jdbc_password dbpassword –alfresco_ftp_port 2121 \
–alfresco_admin_password alfrescoadminpassword –baseunixservice_install_as_service 0 \
–alfrescocustomstack_services_startup demand
[/bash]
In case of Postgresql none library has to be copied to tomcat/bin because is done by the installer.
Remember that it takes 1 or 2 minutes to finish the unattended installation, be patient.
More information and options? “–help” is your friend
./alfresco-enterprise-4.2.0.3-installer-linux-x64.bin –help
Hi Toni, very nice and useful tip again, in this case for quick installations, but why sudo ? (i think it is better with a user with no privileges). On the other hand, although you deactivated in this case, the service script can only be installed with sudo, and not in the case of a user with no privileges.
Regards.
–C.
Just for being able to create the /opt/alfresco/ directory and the init.d script but after that, you can run alfresco as non root user 😉