User Tools

Site Tools


computer_science:ci:jenkins:installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
computer_science:ci:jenkins:installation [2015/03/19 10:18]
kucuny [Package Repository]
computer_science:ci:jenkins:installation [2015/03/19 10:36] (current)
kucuny
Line 17: Line 17:
 </​code>​ </​code>​
  
-## Webserver+Installation 
 +## Standalone 
 +<code bash> 
 +export JENKINS_HOME=/​www/​jenkins/​data 
 + 
 +java -jar -Djava.awt.headless=true -XX:​PermSize=1024M -XX:​MaxPermSize=2048M -Xms1024m -Xmx2048m /​www/​jenkins/​war/​jenkins.war --httpPort=8888 --webroot=/​www/​jenkins/​web 
 +</​code>​ 
 + 
 +## Web Server 
 +### Basic Configuration 
 +  * Domain - ci.kucuny.com (Temporary) 
 +  * Owner - tomcat:​tomcat 
 +  * Jenkins Home - /​www/​jenkins/​web 
 +  * Jenkins Data - /​www/​jenkins/​data 
 +  * SSL Certification - /​etc/​nginx/​ssl/​(certification_files) 
 + 
 +### Install Packages 
 +<code bash> 
 +yum install -y java tomcat nginx 
 +</​code>​ 
 + 
 +### Tomcat Configuration 
 +**/​etc/​tomcat/​server.xml** 
 + 
 +<code xml> 
 +<Engine name="​Catalina"​ defaultHost="​localhost">​ 
 +  <Host name="​ci.kucuny.com"​ appBase="/​www/​jenkins/​web"​ unpackWARs="​true"​ autoDeploy="​true">​ 
 +    <Context path="/"​ docBase="/​www/​jenkins/​web"​ /> 
 +      <Valve className="​org.apache.catalina.valves.AccessLogValve"​ directory="​logs"​ 
 +        prefix="​jenkins_access_log."​ suffix="​.txt"​ 
 +        pattern="​%h %l %u %t &​quot;​%r&​quot;​ %s %b" /> 
 +  </​Host>​ 
 +</​Engine>​ 
 +</​code>​ 
 + 
 +**/​etc/​tomcat/​tomcat.conf (JENKINS_HOME)** 
 + 
 +<code ini> 
 +CATALINA_OPTS="​-DJENKINS_HOME=/​www/​jenkins/​data -XX:​PermSize=1024M -XX:​MaxPermSize=2048M -Xms1024m -Xmx2048m"​ 
 +</​code>​ 
 + 
 +### Nginx Configuration 
 +<​code>​ 
 +server { 
 +  listen 80; 
 +  return 301 https://​$host$request_uri;​ 
 +
 + 
 +server { 
 +  listen 443; 
 +  server_name ci.kucuny.com;​ 
 +  root /​www/​jenkins/​web;​ 
 +  ssl on; 
 +  ssl_certificate /​etc/​nginx/​ssl/​STAR.kucuny.com.crt;​ 
 +  ssl_certificate_key /​etc/​nginx/​ssl/​STAR.kucuny.com.key;​ 
 +  access_log /​var/​log/​nginx/​jenkins.access.log;​ 
 +  error_log /​var/​log/​nginx/​jenkins.error.log;​ 
 +  location / { 
 +    proxy_pass ​             http://​localhost:​8080;​ 
 +    proxy_set_header ​       Host $host; 
 +    proxy_set_header ​       X-Real-IP $remote_addr;​ 
 +    proxy_set_header ​       X-Forwarded-For $proxy_add_x_forwarded_for;​ 
 +    proxy_set_header ​       X-Forwarded-Proto $scheme; 
 +    proxy_redirect ​         http:// https://; 
 +  } 
 +
 +</​code>​ 
 + 
 +### Service enable and start 
 +<code bash> 
 +# Enable tomcat service 
 +systemctl enable tomcat.service 
 +# Enable nginx Service 
 +systemctl enable nginx.service 
 + 
 +# Start tomcat service 
 +systemctl start tomcat.service 
 +# Start nginx service 
 +systemctl start nginx.service 
 +</​code>​ 
 + 
 +### Connect 
 +https://​ci.kucuny.com
computer_science/ci/jenkins/installation.txt · Last modified: 2015/03/19 10:36 by kucuny