1.下载安装包

https://tomcat.apache.org

Tomcat:apache-tomcat-7.0.88.tar

http://www.oracle.com/technetwork/java/javase/downloads/index.html

JDK:jdk1.8.0_171

jdk1.8.0_171
jdk1.8.0_171

https://jenkins.io

Jenkins:

maven环境变量配置

export M3_HOME=/root/install/apache-maven-3.5.3

export PATH=${M3_HOME}/bin:${PATH}

2.安装

(1)安装tomcat

1.上传

 scp apache-tomcat-7.0.88.tar [email protected]:/root/install

2.解压

tar -xvf apache-tomcat-7.0.88.tar

3.配置UTF-8编码和部署包

cd apache-tomcat-7.0.88/conf

vi server.xml

<!-- A "Connector" represents an endpoint by which requests are received

         and responses are returned. Documentation at :

         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)

         Java AJP  Connector: /docs/config/ajp.html

         APR (HTTP/AJP) Connector: /docs/apr.html

         Define a non-SSL HTTP/1.1 Connector on port 8080

    -->

    <Connector port="8080" protocol="HTTP/1.1"

               connectionTimeout="20000"

               redirectPort="8443" URIEncoding="UTF-8" />

    <!-- A "Connector" using the shared thread pool-->

    <!--

    <Connector executor="tomcatThreadPool"

               port="8080" protocol="HTTP/1.1"

               connectionTimeout="20000"

               redirectPort="8443" URIEncoding="UTF-8" />

    -->

    <!-- Define a SSL HTTP/1.1 Connector on port 8443

         This connector uses the BIO implementation that requires the JSSE

         style configuration. When using the APR/native implementation, the

         OpenSSL style configuration is required as described in the APR/native

         documentation -->

    <!--

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"

               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"

               clientAuth="false" sslProtocol="TLS" URIEncoding="UTF-8" />

    -->


    <!-- Define an AJP 1.3 Connector on port 8009 -->

    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" />


<Host name="localhost"  appBase="webapps"

            unpackWARs="true" autoDeploy="true">


        <!-- SingleSignOn valve, share authentication between web applications

             Documentation at: /docs/config/valve.html -->

        <!--

        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />

        -->


        <!-- Access log processes all example.

             Documentation at: /docs/config/valve.html

             Note: The pattern used is equivalent to using pattern="common" -->

        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"

               prefix="localhost_access_log." suffix=".txt"

               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

      <context path="/" docBase="jenkins.war" debug="0" privileged="true" reloadable="true"/>

      </Host>

(2)安装JDK

(3)安装Jenkins

1.上传

scp jenkins.war [email protected]:/root/install

2.将Jenkins.war放置在tomcat的部署目录下

cp jenkins.war apache-tomcat-7.0.88/webapps/
cp jenkins.war apache-tomcat-7.0.88/webapps/

cp jenkins.war apache-tomcat-7.0.88/webapps/

3.启动tomcat

nohup ./startup.sh &

nohup ./startup.sh &

(4)http://部署主机:8080/jenkins

Linux下Jenkins安装

到根目录指定文件找到密码输入即可

Linux下Jenkins安装

相关文章: