安裝Tomcat與Jenkins war檔
安裝Tomcat
將tomcat zip file copy到 /opt
$cd ~/Downloads/ $cp apache-tomcat-8.5.11.zip /opt/解開tomcat zip file並且重新更名
$cd /opt/ $unzip apache-tomcat-8.5.11.zip $unzip apache-tomcat-8.5.11.zip $mv apache-tomcat-8.5.11 tomcat8 $rm apache-tomcat-8.5.11.zip
現在目錄長這樣:

修改Tomcat的執行腳本
$cd /opt/tomcat8/bin/ $chmod +x *.sh放置jenkins war file 並確認首頁能顯示
- copy jenkins war file to tomcat
 
  $cd ~/Downloads/
  $cp jenkins.war /opt/tomcat8/webapps/
  $cd /opt/tomcat8/bin/
  $./startup.sh
這時tomcat 就成功啟動了
部署war檔與設定
- 在瀏覽器上輸入網址: http://your ip:8080/jenkins/
 
如下圖所示

- 輸人administrator password
 
$cd /root/.jenkins/secrets/
$vim initialAdminPassword

- copy 上圖的password, past到web page
 

- 選擇安裝plugins的方式, 我是選擇左邊的 「install suggested plugins」
 

- 開始安裝plugins
 

- plugins安裝完成後顯示建立admin user的畫面
 

- 輸入admin user資料後, 按 「Save and Finish」後顯示完成畫面
 

- 再按「Start using Jenkins」則顯示「Welcome to Jenkins」的畫面, 看到這個畫面表示成功安裝Jenkins
 
