tomcat.apache.org/download-90…
apache
終端輸入 vim ~/.bash_profile 若是沒有bash_profile則須要先建立vim
添加Tomcat環境變量配置瀏覽器
#tomcat配置
CATALINA_BASE=/Users/xxx/Library/apache-tomcat-9.0.8
CATALINA_HOME=/Users/xxx/Library/apache-tomcat-9.0.8
export PATH=$PATH:/Users/xxx/Library/apache-tomcat-9.0.8/bin
export CATALINA_BASE CATALINA_HOME
複製代碼
須要進入Tomcat下的bin目錄進行運行,即便配置了環境變量仍然會報一下錯誤tomcat
xxxxxx@bogon:~|⇒ sh startup.sh
Cannot find ./catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program
xxxxxx@bogon:~|⇒
複製代碼
終端進入/Users/xxx/Library/apache-tomcat-9.0.8/bin目錄,輸入sh startup.sh啓動Tomcatbash
此時在瀏覽器中輸入 http://loacalhost:8080ui
終端 xxx/bin 目錄下,輸入sh shutdown.sh 關閉Tomcatthis