Jenkins     发布于 7/8/2020 9:10:43 PM   96次围观  0条评论
Jenkins    发表于 7/8/2020 9:10:43 PM   96人围观  0条评论
```shell 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 sudo yum upgrade sudo yum install jenkins java-1.8.0-openjdk-devel ``` Start Jenkins You can start the Jenkins service with the command: ```shell sudo systemctl start jenkins ``` You can check the status of the Jenkins service using the command: ```shell sudo systemctl status jenkins ``` If everything has been set up correctly, you should see an output like this: ``` Loaded: loaded (/etc/rc.d/init.d/jenkins; generated) Active: active (running) since Tue 2018-11-13 16:19:01 +03; 4min 57s ago ... ``` If you have a firewall installed, you must add Jenkins as an exception. You must change YOURPORT in the script below to the port you want to use. Port 8080 is the most common. ``` YOURPORT=8080 PERM="--permanent" SERV="$PERM --service=jenkins" firewall-cmd $PERM --new-service=jenkins firewall-cmd $SERV --set-short="Jenkins ports" firewall-cmd $SERV --set-description="Jenkins port exceptions" firewall-cmd $SERV --add-port=$YOURPORT/tcp firewall-cmd $PERM --add-service=jenkins firewall-cmd --zone=public --add-service=http --permanent firewall-cmd --reload ```
{{$.post.CommentNum}} 条评论