touch ~/.bash_profile; // 將目錄跳轉到.bash_profile這個文件夾
open -t ~/.bash_profile //打開.bash_profile文件
這時候會彈出一個新的窗口輸入
export PATH=$PATH:/Users/XXXXX/Applications/apache-tomcat-8.0.36/bin(Tomcat 路徑)
sudo su 申請權限
startup.sh 啟動tomacat
shutdown.sh 關閉