View source | Discuss this page | Page history | Printable version   

Release Management/Configuring New Amazon Instance

Release Management/Internal

Index


Contents

Introduction

This wiki is to help configuring a new amazon instance and in this wiki I have taken example of builds.openbravo.com on gentoo system.

Process

To start with one should know the pre-requisites for any process. In this case they would be the packages required to set up the base system and configurations need to be copied from the old system (if any).

Installation & Configuration

System Initialization

env-update
source /etc/profile
export PS1="(<hostname>) $PS1"
passwd
cp /usr/share/zoneinfo/Europe/Madrid /etc/localtime

nano /etc/conf.d/clock
        CLOCK="UTC"
        TIMEZONE="Europe/Madrid"
        CLOCK_SYSTOHC="yes"
nano /etc/locale.gen
        en_US.UTF-8 UTF-8

nano /etc/env.d/02locale
        LANG=en_US.UTF-8
        LC_CTYPE="en_US.UTF-8"
        LC_NUMERIC="en_US.UTF-8"
        LC_TIME="en_US.UTF-8"
        LC_COLLATE="en_US.UTF-8"
        LC_MONETARY="en_US.UTF-8"
        LC_MESSAGES="en_US.UTF-8"
        LC_PAPER="en_US.UTF-8"
        LC_NAME="en_US.UTF-8"
        LC_ADDRESS="en_US.UTF-8"
        LC_TELEPHONE="en_US.UTF-8"
        LC_MEASUREMENT="en_US.UTF-8"
        LC_IDENTIFICATION="en_US.UTF-8"
        LC_ALL=en_US.UTF-8

nano /etc/make.conf
        CFLAGS="-O2 -pipe -march=i686 -mno-tls-direct-seg-refs"
        CXXFLAGS="${CFLAGS}"
        CHOST="i686-pc-linux-gnu"
        MAKEOPTS="-j2"
        USE="-ipv6 -gdbm -acl apache2 ldap vhosts"
        GENTOO_MIRRORS="http://ftp.heanet.ie/pub/gentoo/ "
        SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
emerge --sync
emerge -auDvN world
emerge -av syslog-ng
emerge -av vixie-cron
rc-update add vixie-cron default
rc-update add syslog-ng default
nano /etc/dispatch-conf.conf
dispatch-conf

Building system specific packages

As these are system specific I took packages required for builds.openbravo.com.

Porstgres

emerge -av emerge -av postgresql-server:8.3
emerge -av emerge -av postgresql-server:8.2
emerge --config postgresql-server:8.3
emerge --config postgresql-server:8.2
/etc/init.d/postgresql-8.3 start
/etc/init.d/postgresql-8.2 start
rc-update add postgresql-8.3 default
rc-update add postgresql-8.2 default
* Note before restarting edit /var/lib/postgresql/8.2/data/postgresql.conf file to listen to port 5433
psql -U postgres -p 5432
     alter role postgres with password 'new_password';
     \q
 sed -i 's/trust$/md5/' /var/lib/postgresql/8.3/data/pg_hba.conf
/etc/init.d/postgresql-8.3 reload
psql -U postgres -p 5433
     alter role postgres with password 'new_password';
     \q
 sed -i 's/trust$/md5/' /var/lib/postgresql/8.2/data/pg_hba.conf
/etc/init.d/postgresql-8.2 reload

Sun JDK

emerge -av sun-jdk
java-config -S sun-jdk-1.6

Tomcat

emerge -av tomcat
touch /etc/env.d/99tomcat
    echo 'CATALINA_HOME=/usr/share/tomcat-6' >> /etc/env.d/99tomcat
    echo 'CATALINA_BASE=/var/lib/tomcat-6' >> /etc/env.d/99tomcat
env-update && source /etc/profile
CATALINA_OPTS="-server -Xms384M -Xmx1024M -XX:MaxPermSize=256M"
mkdir /var/lib/tomcat-6/lib/
cp $JAVA_HOME/lib/tools.jar /var/lib/tomcat-6/lib/
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
      <role rolename="manager"/>
      <role rolename="admin"/>
      <user username="admin" password="admin" roles="admin,manager"/>
    </tomcat-users>
/etc/init.d/tomcat-6 restart

ANT

emerge -av dev-java/ant-core
echo 'ANT_OPTS="-Xmx1024M"' > /etc/env.d/99ant
env-update && source /etc/profile

Mercurial

emerge -av mercurial

Mod_JK

emerge -av www-apache/mod_jk
# Pass on mount optionsl globally to all vhosts/contexts
JkMountCopy all
JkUnMount /japi* ajp13
JkUnMount /pos* ajp13
JkMount /* ajp13

Retrieved from "http://wiki.openbravo.com/wiki/Release_Management/Configuring_New_Amazon_Instance"

This page has been accessed 5,104 times. This page was last modified on 2 February 2010, at 07:32. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.