一、安裝tomcat和jenkins
1、下載jenkins
https://jenkins.io
2、下載tomcat
https://tomcat.apache.org/
3、在linux上面新建目錄,如 root/tomcat,把之前下載的tomcat文件放入tomcat目錄下面
執行解壓命令tar -vxf 文件名,把jenkins放入tomcat/webapps下面
4、在瀏覽器輸入 服務器ip:8080,如 192.168.1.110:8080
jenkins也可以單獨安裝運行,下載之後,運行java -jar jenkins就可以了,然後在瀏覽器輸入http://ip:8080,就好了
應用部署服務器準備
ifconfig 查看ip地址,瀏覽器輸入的地址
查看sshf服務是否啓動
netstat -anp|grep :22
啓動ssh服務
service sshd start
查看防火牆狀態
service iptables status
關閉防火牆
service iptables stop
或者參照此博客
https://blog.csdn.net/datouniao1/article/details/91945501
二、安裝git
第一步:yum install git
第二步:設置用戶名和郵箱
git config --golbal user.name ‘hopelv’
git config --global user.email ‘[email protected]’
第三步:新建一個目錄,初始化倉庫
mkdir testgit
cd testgit
git init
最後就是測試linux服務器和github的連接了,參考本人如下博客
https://mp.csdn.net/mdeditor/102523708#
三、安裝maven
1、下載maven
http://maven.apache.org/download.cgi
2、上傳linux服務器並壓縮
unizp 文件名
3、設置到配置文件
vi /etc/profile後面加上
export MAVEN_HOME=/root/apache-maven-3.6.2#實際的路徑
export PATH=$MAVEN_HOME/bin:$PATH
保存之後運行 . /etc/profile
4、驗證是否安裝成功
mvn -version
四、配置節點將linux服務註冊到jenkins上面