RSS

Monthly Archives: March 2010

ATG 9.1 on Mac OS X 10.6

Using the instructions from Ronald Pulleman (which focus on ATG 2007.1), I tried installing ATG 9.1 on Mac OS X 10.6.2. Below are the instructions for reproducing what worked for me.

Make sure you know what is officially supported by ATG, since Mac OS X is not. Also make sure you have the Installation Guide handy, part of the ATG 9.1 documentation set.

Below I refer to the .profile file for adjusting environment variables. Make sure you apply these environment variable changes each time. If you do not use bash, then replace .profile with whatever your shell reads on startup.

Install and configure MySQL

  • Have MySQL installed; I picked MySQL 5.1.45 (64-bit), but 5.1.32 would have been supported.
  • Add this your .profile:

    export MYSQL_HOME=/usr/local/mysql-5.1.45-osx10.6-x86_64
    export PATH=$MYSQL_HOME/bin:$PATH

  • In your System Preferences application, start MySQL and make it start automatically at boot.
  • Change the password of the root user, for obvious reasons:

    mysqladmin -p -u root PASSWORD newpass

  • Make MySQL use the InnoDB engine by default, this is required for ATG: Create the file /etc/mysql/my.cnf with the following contents:

    [mysqld]
    default-storage-engine=innodb
    sql-mode=TRADITIONAL

Install and configure JBoss

  • Install JBoss; I used JBoss 4.2.3-GA (community edition), while the (paid) JBoss EAP 4.2.0 CP05 would be the ATG-supported version.
  • Add this to your .profile:

    export JBOSS_HOME=$HOME/jboss-4.2.3.GA
    export PATH=$JBOSS_HOME/bin:$PATH

  • Modify the JVM arguments in the startup script, if you want to comply with the ATG recommendations for JVM parameters. Edit the bin/run.sh file and modify the JAVA_OPTS setting as follows:

    JAVA_OPTS="-server -Xms2048m -Xmx3072m -XX:MaxPermSize=768m -XX:MaxNewSize=768m -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.rmi.client.gcInterval=3600000"

Integrate MySQL with JBoss

  • Download the MySQL JDBC driver Connector/J, I got version 5.1.12.
  • Copy the Connector/J JAR file to the server/atg/lib directory under the JBoss home directory:

    cp ~/Downloads/mysql-connector-java-5.1.12/mysql-connector-java-5.1.12-bin.jar $JBOSS_HOME/server/atg/lib/

Install and configure ATG

  • Download ATG 9.1 from the ATG support site, this is a JAR file.
  • Unpack it and then execute the contained .bin file:

    unzip ATG9.1.jar
    sh ATG9.1.bin

    Choose JBoss as the application server. I suggest you make sure there is no space in the name of the destination director (I chose ~/atg-9.1).

  • Put your license keys in the home/localconfig/ directory (below the ATG installation directory).
  • Create the file home/bin/dasEnv.sh with just one line in it:

    export ATGJRE=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Commands/java

  • Create the file home/localconfig/atg/dynamo/service/jdbc/JTDataSource.properties with the following contents:

    JNDIName=java:/MySqlDS
    $class=atg.nucleus.JNDIReference

Initialize the ATG database

  • Under the JBoss directory, create the file server/atg/deploy/mysql-ds.xml with the following contents:

    <datasources>
    <local-tx-datasource>
    <jndi-name>MySqlDS</jndi-name>
    <connection-url>jdbc:mysql://127.0.0.1:3306/atg000</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>atg</user-name>
    <password>atgpass</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
    <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
    <metadata>
    <type-mapping>mySQL</type-mapping>
    </metadata>
    </local-tx-datasource>
    </datasources>

  • Log in to the MySQL command line client mysql:

    mysql -p -u root

  • Create a database user for ATG:

    USE mysql
    INSERT INTO user (host, user, password) VALUES ('%', 'atg', PASSWORD('atgpass'));

  • Create a database for ATG:

    CREATE DATABASE atg000;

  • Allow the atg user all access privileges on the atg000 database:

    GRANT ALL PRIVILEGES ON atg000.* TO atg;
    FLUSH PRIVILEGES;

  • Exit the mysql client (you can use Ctrl-D).
  • Create the ATG data structures in the database by executing the DDL scripts on MySQL (this typically takes less than a minute):

    cat DAS/sql/install/mysql/das_ddl.sql DPS/sql/install/mysql/dps_ddl.sql DSS/sql/install/mysql/dss_ddl.sql DCS/sql/install/mysql/dcs_ddl.sql | mysql -D atg000 -u atg -patgpass

Run ATG

  • Deploy an ATG application to JBoss.
  • Start JBoss: Go to the JBoss directory and execute:

    bin/run.sh -c atg

  • Using a browser visit http://127.0.0.1:8080/dyn/admin/ to see the DynAdmin tool.
Advertisements
 
10 Comments

Posted by on 30 March 2010 in atg, darwin, jboss, mac, macos, macosx, mysql