Created
June 8, 2012 14:02
-
-
Save stefanbirkner/2895764 to your computer and use it in GitHub Desktop.
Installing a Nexus server
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
#!/bin/bash | |
#install Java 7 | |
add-apt-repository -y ppa:webupd8team/java | |
apt-get -y update | |
apt-get -y install oracle-java7-installer | |
#install tomcat, which uses Java 7 | |
apt-get -y install tomcat7 | |
sed -i 's/#JAVA_HOME/JAVA_HOME/' /etc/default/tomcat7 | |
sed -i 's/openjdk-6-jdk/java-7-oracle/' /etc/default/tomcat7 | |
chown -R tomcat7:tomcat7 /usr/share/tomcat7 | |
#install nexus | |
mkdir -p /usr/share/nexus/nexus-2.0.5 | |
cd /usr/share/nexus/nexus-2.0.5 | |
wget http://www.sonatype.org/downloads/nexus-2.0.5.war | |
unzip nexus-2.0.5.war | |
rm nexus-2.0.5.war | |
chown -R tomcat7:tomcat7 /usr/share/nexus | |
echo '<Context path="/nexus" docBase="/usr/share/nexus/nexus-2.0.5"/>' | tee /etc/tomcat7/Catalina/localhost/nexus.xml | |
chown tomcat7:tomcat7 /etc/tomcat7/Catalina/localhost/nexus.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment