Home > Article > Operation and Maintenance > How to install Jenkins on Linux
Git installation is very simple
yum install git git --version
Maven can be downloaded and configured with environment variables
下载:wget --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz 配置环境变量 export M2_HOME=/data/opt/maven/maven-3.8.6 export PATH=$PATH:$M2_HOME/bin
JDk requires Java 8 or above, and the latest version should require Java 11 or above .
After we are ready, we officially enter the deployment of Jenkins.
wget --no-check-certificate http://pkg.jenkins-ci.org/redhat-stable/jenkins-2.190.3-1.1.noarch.rpm rpm -ivh jenkins-2.190.3-1.1.noarch.rpm
If the speed is slow, you can download it locally and then transfer it to the server.
vi /etc/sysconfig/jenkins # 修改端口号为 8880
## Type: integer(0:65535) ## Default: 8080 ## ServiceRestart: jenkins # # Port Jenkins is listening on. # Set to -1 to disable # JENKINS_PORT="8880"
systemctl start jenkins systemctl status jenkins
When we visit for the first time, the following interface will be prompted, and the waiting time will be long.
Change to the Tsinghua University image and then restart Jenkins
find / -name *.UpdateCenter.xml vi /var/lib/jenkins/hudson.model.UpdateCenter.xml # 改为以下地址 #https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
<?xml version='1.1' encoding='UTF-8'?> <sites> <site> <id>default</id> <url>https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json</url> </site> </sites>
Enter Jenkins and you need to follow the prompts to open the log file Get the password without going into details.
Choose to install some plug-ins. Due to network reasons, there is a high probability that the installation will fail, so you only need to check the last Chinese plug-in.
Set the user name and password as the administrator user, or you can use admin directly.
The above is the detailed content of How to install Jenkins on Linux. For more information, please follow other related articles on the PHP Chinese website!