Linux lnmt的部署

文章目录

    • 1.Java环境安装
    • 2.tomcat部署
      • 下载
    • 生成一个页面
    • 启动tomcat
    • 在浏览器上查看
    • 下载jenkins

nginx和mysql的部署在之前的博客里
lnmp的部署
这里搭建tomcat

1.Java环境安装

[root@localhost ~]# yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel
安装过程略...

[root@localhost yum.repos.d]# java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)

2.tomcat部署

下载

tomcat下载链接

[root@localhost src]# ls
apache-tomcat-9.0.30.tar.gz  debug  kernels
[root@localhost src]# tar xf apache-tomcat-9.0.30.tar.gz -C /usr/local/
[root@localhost src]# cd /usr/local/
[root@localhost local]# ln -s apache-tomcat-9.0.30/ tomcat

生成一个页面

[root@localhost ~]# vim index.jsp
[root@localhost ~]# cat index.jsp 


	test


	<%
	    out.println("good morning");
	%>


[root@localhost ~]# mkdir /usr/local/tomcat/webapps/plunk
[root@localhost ~]# cp index.jsp /usr/local/tomcat/webapps/plunk/
[root@localhost ~]# ll /usr/local/tomcat/webapps/plunk/
总用量 4
-rw-r--r--. 1 root root 108 1月   8 09:53 index.jsp

启动tomcat

[root@localhost ~]# /usr/local/tomcat/bin/catalina.sh start
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
[root@localhost ~]# ps -ef|grep tomcat
root      12185      1 10 09:54 pts/0    00:00:03 /usr/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      12233  11777  0 09:55 pts/0    00:00:00 grep --color=auto tomcat
[root@localhost ~]# ss -antl
State      Recv-Q Send-Q Local Address:Port               Peer Address:Port              
LISTEN     0      128     *:22                  *:*                  
LISTEN     0      100    127.0.0.1:25                  *:*                  
LISTEN     0      100    :::8080               :::*                  
LISTEN     0      128    :::22                 :::*                  
LISTEN     0      100       ::1:25                 :::*                  
LISTEN     0      1        ::ffff:127.0.0.1:8005               :::*                  
LISTEN     0      100    :::8009               :::*       

在浏览器上查看

Linux lnmt的部署_第1张图片
Linux lnmt的部署_第2张图片

下载jenkins

jenkins官网

[root@localhost ~]# cd /usr/local/tomcat/webapps/
[root@localhost webapps]# ls
docs      host-manager  jenkins.war  plunk  test
examples  jenkins       manager      ROOT

Linux lnmt的部署_第3张图片

你可能感兴趣的:(Linux lnmt的部署)