Last active
August 29, 2015 14:08
-
-
Save nabe256/03fc60de7025d9744bde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tomcat | |
``` | |
$ sudo apt-get install lamp-server^ | |
$ sudo apt-get install tomcat7 tomcat7-admin tomcat7-user | |
$ sudoedit /etc/default/tomcat7 | |
JAVA_HOME=/usr/lib/jvm/default-java | |
$ sudoedit /etc/tomcat7/tomcat-users.xml | |
<tomcat-users> | |
<user username="admin" password="pass" roles="manager-gui,admin-gui"/> | |
</tomcat-users> | |
$ sudo chown -R tomcat7:tomcat7 /usr/share/tomcat7 | |
$ sudo service tomcat7 restart | |
$ sudoedit /etc/apache2/sites-available/tomcat.conf | |
<Location /manager/> | |
ProxyPass ajp://localhost:8009/manager/ | |
ProxyPassReverse ajp://localhost:8009/manager/ | |
</Location> | |
<Location /host-manager/> | |
ProxyPass ajp://localhost:8009/host-manager/ | |
ProxyPassReverse ajp://localhost:8009/host-manager/ | |
</Location> | |
``` | |
# GitBucket | |
``` | |
$ wget https://github.com/takezoe/gitbucket/releases/download/2.4.1/gitbucket.war | |
$ sudo cp gitbucket.war /var/lib/tomcat7/webapps/gitbucket##241.war | |
$ sudoedit /etc/apache2/sites-available/gitbucket.conf | |
<Location /gitbucket/> | |
ProxyPass ajp://localhost:8009/gitbucket/ | |
ProxyPassReverse ajp://localhost:8009/gitbucket/ | |
</Location> | |
$ sudo a2ensite gitbucket | |
``` | |
# Apache | |
``` | |
$ sudoedit /etc/tomcat7/server.xml | |
<!-- | |
<Connector port="8080" protocol="HTTP/1.1" | |
connectionTimeout="20000" | |
URIEncoding="UTF-8" | |
redirectPort="8443" /> | |
--> | |
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" /> | |
$ sudo a2enmod proxy proxy_http proxy_ajp | |
$ sudo service tomcat7 restart | |
$ sudo service apache2 restart | |
``` | |
# Jenkins | |
``` | |
$ wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war | |
$ sudo cp jenkins.war /var/lib/tomcat7/webapps/jenkins##1587.war | |
$ sudoedit /etc/apache2/sites-available/jenkins.conf | |
AllowEncodedSlashes NoDecode | |
<Location /jenkins/> | |
ProxyPass ajp://127.0.0.1:8009/jenkins/ nocanon | |
ProxyPassReverse ajp://127.0.0.1:8009/jenkins/ | |
Require all granted | |
</Location> | |
$ sudo a2ensite jenkins | |
$ sudo service apache2 restart | |
$ sudoedit /usr/share/tomcat7/setenv.sh | |
JENKINS_ARGS="--prefix=/jenkins" | |
export JENKINS_ARGS | |
$ sudo service tomcat7 restart | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment