您好,登錄后才能下訂單哦!
1.Tomcat安裝部署
2.虛擬主機配置
3.Tomcat優化
1.免費的、開放源代碼的Web應用服務器
2.Apache軟件基金會(Apache Software Foundation)Jakarta項目中的- -個核心項目
3.由Apache、 Sun和一些公司及個人共同開發而成
4.深受Java愛好者的喜愛,并得到部分軟件開發商的認可
5.目前比較流行的Web應用服務器
1.下載并安裝jdk
2.安裝并啟動Tomcat
3.配置虛擬主機
1.編輯/etc/profile文件:
export JAVA_HOME=/usr/java/jdk1.8.0_171-amd64
export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt,jar
export PATH=$JAVA_HOME/bin:$PATH
2.使環境變量生效的命令:
[root@localhost~]#source /etc/profile
3.查看jdk版本的命令:
[root@localhost~]#java -version
1.下載安裝包:
[root@localhost ~]# wget http://mirrors. shu.edu.cn/apache/tomcat/tomcat-9/v9.0.8/bin/apache-tomcat-9.0.8.tar.gz
2.將安裝包移動到/usr/local下重命名:
[root@localhost ~]# mv apache-tomcat-9.0.8 /usr/ocal/tomcat
3.啟動Tomcat:
[root@localhost ~]# /usr/local/tomcat/bin/startup.sh
1.縮短啟動時間的命令
/usr/java/jdk1.8.0_171-amd64/je/lib/security/java.security文件
securerandom.source=file:/dev/random改為urandom
[root@localhost ~]# mkdir /aaa
[root@localhost ~]# mount.cifs //192.168.10.139/rpm /aaa
Password for root@//192.168.10.139/rpm:
[root@localhost ~]# cd /aaa
[root@localhost aaa]# ls
amoeba-mysql-binary-2.2.0.tar.gz lf.jpg
apr-1.6.2.tar.gz mysql-5.5.24.tar.gz
apr-util-1.6.0.tar.gz mysql-5.6.26.tar.gz
httpd-2.4.29.tar.bz2 TC
[root@localhost aaa]# cd TC/
[root@localhost TC]# ls
apache-jmeter-5.1
apache-jmeter-5.1.zip
apache-tomcat-9.0.16.tar.gz
jdk-8u201-linux-x64.rpm
[root@localhost TC]# rpm -ivh jdk-8u201-linux-x64.rpm
[root@localhost TC]# cd /usr/java/
[root@localhost java]# ls
default jdk1.8.0_201-amd64 latest
[root@localhost java]# cd jdk1.8.0_201-amd64/
[root@localhost jdk1.8.0_201-amd64]# ls
bin man
COPYRIGHT README.html
include release
javafx-src.zip src.zip
jre THIRDPARTYLICENSEREADME-JAVAFX.txt
lib THIRDPARTYLICENSEREADME.txt
LICENSE
//設置環境變量:
[root@localhost jdk1.8.0_201-amd64]# vim /etc/profile
按大寫字母G到末行,按小寫字母o在下行插入以下內容:
export JAVA_HOME=/usr/java/jdk1.8.0_201-amd64
export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export PATH=$JAVA_HOME/bin:$PATH
//修改完成后,按Esc退出插入模式,輸入:wq保存退出
[root@localhost jdk1.8.0_201-amd64]# source /etc/profile
[root@localhost jdk1.8.0_201-amd64]# java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
[root@localhost jdk1.8.0_201-amd64]# cd /aaa
[root@localhost aaa]# ls
Discuz_X3.4_SC_UTF8.zip nginx-1.12.2.tar.gz
error.png php-7.1.10.tar.bz2
extundelete-0.2.4.tar.bz2 php-7.1.20.tar.gz
httpd-2.4.29.tar.bz2 TC
[root@localhost aaa]# cd TC/
[root@localhost TC]# ls
apache-jmeter-5.1
apache-jmeter-5.1.zip
apache-tomcat-9.0.16.tar.gz
jdk-8u201-linux-x64.rpm
[root@localhost TC]# tar zxvf apache-tomcat-9.0.16.tar.gz -C /usr/local/
[root@localhost TC]# cd /usr/local/
[root@localhost local]# ls
apache-tomcat-9.0.16 etc include lib64 sbin src
bin games lib libexec share
//為方便后面查找,修改文件夾名
[root@localhost local]# mv apache-tomcat-9.0.16/ tomcat
[root@localhost local]# ls
bin games lib libexec share tomcat
etc include lib64 sbin src
[root@localhost local]# cd tomcat/
[root@localhost tomcat]# cd bin/
[root@localhost bin]# ls
bootstrap.jar makebase.sh
catalina.bat setclasspath.bat
catalina.sh setclasspath.sh
catalina-tasks.xml shutdown.bat
ciphers.bat shutdown.sh
ciphers.sh startup.bat
commons-daemon.jar startup.sh
commons-daemon-native.tar.gz tomcat-juli.jar
configtest.bat tomcat-native.tar.gz
configtest.sh tool-wrapper.bat
daemon.sh tool-wrapper.sh
digest.bat version.bat
digest.sh version.sh
makebase.bat
[root@localhost bin]# ln -s /usr/local/tomcat/bin/startup.sh /usr/bin/
[root@localhost bin]# ln -s /usr/local/tomcat/bin/shutdown.sh /usr/bin/
[root@localhost bin]# systemctl stop firewalld.service
[root@localhost bin]# setenforce 0
[root@localhost 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/java/jdk1.8.0_201-amd64
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。