jdk+apache-tomcat+jenkins+maven搭建
環境redhat6.5
安裝包:
apache-maven-3.5.2-bin.tar.gz
apache-tomcat-9.0.1.tar.gz
jdk-9.0.1_linux-x64_bin.rpm
jenkins-2.88-1.1.noarch.rpm
下載地址:
http://maven.apache.org/download.cgi maven下載
https://pkg.jenkins.io/redhat/ jenkins下載
http://tomcat.apache.org/download-70.cgi tomcat下載
安裝JDK
[root@localhost ~]# rpm -ivh jdk-9.0.1_linux-x64_bin.rpm
[root@localhost ~]# tail /etc/profile
unset i
unset -f pathmunge
export JAVA_HOME=/usr/local/java
export JRE_HOME=/usr/local/java/jre
export PATH=$PATH:/usr/local/java/bin
export CLASSPATH=./:/usr/local/java/lib:/usr/local/java/jre/lib
查看Java信息
[root@localhost ~]#java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
安裝apache-tomcat
[root@localhost ~]tar -zxvf apache-tomcat-9.0.1.tar.gz -C /usr/local/tomcat
安裝jenkins
[root@localhost ~]tar -zxvf jenkins-2.88-1.1.noarch.rpm
安裝maven
[root@localhost ~]#apache-maven-3.5.2-bin.tar.gz
[root@localhost ~]#vim /etc/profile
加入以下內容:
export MAVEN_HOME=/tmp/python/apache-maven-3.5.2
export PATH=$MAVEN_HOME/bin:$PAT
重新加載環境變量
[root@localhost ~]#source /etc/profile
啟動tomcat
[root@localhost ~]#/usr/local/tomcat/bin/startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/java/jre
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
瀏覽器窗口輸入:http://192.168.112.119:8080/
可以訪問tomcat
關閉tomcat
[root@localhost ~]#/usr/local/tomcat/bin/shutdown.sh
[root@localhost ~]#service jenkins start
[root@localhost ~]#/usr/local/tomcat/bin/startup.sh
瀏覽器輸入http://192.168.112.119:8080/jenkins/
到這裏最基礎的搭建算是完成了,當然這個系統到這裏並沒完,後面還有很多需要配置的地方
本文出自 “12619984” 博客,請務必保留此出處http://12629984.blog.51cto.com/12619984/1980034
jdk+apache-tomcat+jenkins+maven搭建