Created
July 30, 2019 06:21
-
-
Save feiandxs/6701aee21f9aaab34f72640cfa4cecb3 to your computer and use it in GitHub Desktop.
install jenkins by yum on centos 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Jenkins is a Java application, so the first step is to install Java. Run the following command to install the OpenJDK 8 package: | |
sudo yum install java-1.8.0-openjdk-devel | |
#The next step is to enable the Jenkins repository. To do that, import the GPG key using the following curl command: | |
curl --silent --location http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo | sudo tee /etc/yum.repos.d/jenkins.repo | |
#And add the repository to your system with: | |
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key | |
#sudo yum install jenkins | |
sudo yum install jenkins | |
#vim /etc/sysconfig/jenkins | |
#修改配置 | |
####$JENKINS_USER="root" | |
#change privileges | |
###chown -R root:root /var/lib/jenkins | |
###chown -R root:root /var/cache/jenkins | |
###chown -R root:root /var/log/jenkins | |
# | |
service jenkins restart | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment