Deploying Jenkins in CentOS
1. Download the software to "/usr/src" and Install Java JDK - jdk-6u30-linux-i586.rpm
$ rpm -ivh jdk-6u30-linux-i586.rpm
2. Download the software to "/usr/src" and Install Apache Tomcat
$ cd /usr/src
$ tar -xzvf apache-tomcat-6.0.35.tar.gz
$ mv apache-tomcat-6.0.35 tomcat
3. Download the software to "/usr/src" and Install grails-1.3.7.zip
$ cd /usr/src
$ unzip grails-1.3.7.zip
4. Edit "/etc/profile" and add the path below
$ nano /etc/profile
JAVA_HOME=/usr/java/jdk1.6.0_30
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
TOMCAT_HOME=/usr/src/tomcat
export TOMCAT_HOME
PATH=$TOMCAT_HOME/bin:$PATH
export PATH
CATALINA_HOME=/usr/src/tomcat
export CATALINA_HOME
PATH=$CATALINA_HOME/bin:$PATH
export PATH
GRAILS_HOME=/usr/src/grails-1.3.7
export GRAILS_HOME
PATH=$GRAILS_HOME/bin:$PATH
export PATH
To maximized java memory utiliztion, add the lines below in the "catalina.sh" file
Note. on 32bit Java (3gig is the max), on 64bit
$ nano /usr/src/tomcat/bin/catalina.sh
JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms2560m -Xmx2560m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:+DisableExplicitGC"
5. Create a Tomcat User
$ cd /usr/src/tomcat/conf
$ nano tomcat-users.xml
Add the lines below under
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="manager" password="manager" roles="manager"/>
</tomcat-users>
6. Download Jenkins .war file.
http://mirrors.jenkins-ci.org/war/latest/jenkins.war
7. Login to the server's webui, eg http://localhost:8080 and click Tomcat Manager
8. Under file to deploy, browse the downloaded jenkins.war, and click deploy.
Thant's it. . .
$ rpm -ivh jdk-6u30-linux-i586.rpm
2. Download the software to "/usr/src" and Install Apache Tomcat
$ cd /usr/src
$ tar -xzvf apache-tomcat-6.0.35.tar.gz
$ mv apache-tomcat-6.0.35 tomcat
3. Download the software to "/usr/src" and Install grails-1.3.7.zip
$ cd /usr/src
$ unzip grails-1.3.7.zip
4. Edit "/etc/profile" and add the path below
$ nano /etc/profile
JAVA_HOME=/usr/java/jdk1.6.0_30
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
TOMCAT_HOME=/usr/src/tomcat
export TOMCAT_HOME
PATH=$TOMCAT_HOME/bin:$PATH
export PATH
CATALINA_HOME=/usr/src/tomcat
export CATALINA_HOME
PATH=$CATALINA_HOME/bin:$PATH
export PATH
GRAILS_HOME=/usr/src/grails-1.3.7
export GRAILS_HOME
PATH=$GRAILS_HOME/bin:$PATH
export PATH
To maximized java memory utiliztion, add the lines below in the "catalina.sh" file
Note. on 32bit Java (3gig is the max), on 64bit
$ nano /usr/src/tomcat/bin/catalina.sh
JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms2560m -Xmx2560m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:+DisableExplicitGC"
5. Create a Tomcat User
$ cd /usr/src/tomcat/conf
$ nano tomcat-users.xml
Add the lines below under
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="manager" password="manager" roles="manager"/>
</tomcat-users>
6. Download Jenkins .war file.
http://mirrors.jenkins-ci.org/war/latest/jenkins.war
7. Login to the server's webui, eg http://localhost:8080 and click Tomcat Manager
8. Under file to deploy, browse the downloaded jenkins.war, and click deploy.
Thant's it. . .
Comments
Post a Comment