$ wget http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.rpm
複製代碼
$ rpm -ivh jdk-10.0.2_linux-x64_bin.rpm
複製代碼
$ vi /etc/profile
複製代碼
添加以下內容:前端
JAVA_HOME=/usr/java/jdk-10.0.2_linux-x64_bin
JAVA_BIN=/usr/lib/jdk-10.0.2_linux-x64_bin/bin
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
複製代碼
讓修改生效:java
$ source /etc/profile
複製代碼
$ java -version
複製代碼
$ sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
複製代碼
$ sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
複製代碼
$ yum install jenkins
複製代碼
$ // 查找jenkins安裝路徑
$ rpm -ql jenkins
複製代碼
jenkins相關目錄:node
/etc/init.d/jenkins
/etc/logrotate.d/jenkins
/etc/sysconfig/jenkins // jenkins配置文件,「端口」,「JENKINS_HOME」等均可以在這裏配置。
/usr/lib/jenkins // jenkins安裝目錄,war包會放在這裏。
/usr/lib/jenkins/jenkins.war
/usr/sbin/rcjenkins
/var/cache/jenkins
/var/lib/jenkins // 默認的JENKINS_HOME。
/var/log/jenkins // jenkins日誌文件。
複製代碼
修改端口linux
$ vi /etc/sysconfig/jenkins // 默認爲8080
複製代碼
$ service jenkins start
Starting Jenkins [ OK ]
複製代碼
$ curl http://localhost:8080
複製代碼
OLD_BUILD_ID=$BUILD_ID
echo $OLD_BUILD_ID
BUILD_ID=dontKillMe
./run.sh restart
#改回原來的BUILD_ID值
BUILD_ID=$OLD_BUILD_ID
echo $BUILD_ID
複製代碼
若有侵權,請發郵箱至wk_daxiangmubu@163.com 或留言,本人會在第一時間與您聯繫,謝謝!! shell
長按二維碼關注咱們,瞭解最新前端資訊