Jenkins_installation
Jenkins installation notes
Login:
use can use the usual
bhletech account to log into jenkins.
We install Jenkins through
apt-get.
Installation
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list
sudo aptitude update
sudo aptitude install jenkins
What does this package do?
- Jenkins will be launched as a daemon up on start. See /etc/init.d/jenkins for more details.
- The 'jenkins' user is created to run this service.
- Log file will be placed in /var/log/jenkins/jenkins.log. Check this file if you are troubleshooting Jenkins.
- /etc/default/jenkins will capture configuration parameters for the launch.
- By default, Jenkins listen on port 8082. Access this port with your browser to start configuration.
Setting up an Apache Proxy for port 80 -> 8082
This configuration will setup Apache2 to proxy port 80 to 8080 so that you can keep Jenkins on 8080.
sudo aptitude install apache2 (if we don't have apache installed)
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod vhost_alias
Running Jenkins behind Apache
mod_proxy
mod_proxy works by making Apache perform "reverse proxy" — when a request arrives for certain URLs, Apache becomes a proxy and further forward that request to Jenkins, then it forwards the response back to the client.
The following Apache modules must be installed :
a2enmod proxy
a2enmod proxy_http
We need to set up the proxy on bhle-dev-1
ProxyPass / http://bhl-mandible.nhm.ac.uk:8082/jenkins
ProxyPassReverse / http://bhl-mandible.nhm.ac.uk:8082/jenkins
ProxyRequests Off
# Local reverse proxy authorization override
# Most unix distribution deny proxy by default (ie /etc/apache2/mods-enabled/proxy.conf in Ubuntu)
<Proxy http://bhl-mandible.nhm.ac.uk:8081/jenkins*>
Order deny,allow
Allow from all
</Proxy>
This assumes that you run Jenkins on port 8082.
on NHM server, here is Jenkins:
http://bhle-dev-1.nhm.ac.uk/
Reference :
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache