1. 安装Jenkins
1.1 准备Linux服务器, 关闭防火墙禁止开机启动
1 systemctl stop firewalld.service #停止firewall 2 systemctl disable firewalld.service #禁止firewall开机启动
1.2 Jenkins的下载安装
1 sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo 2 sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key 3 yum install jenkins
1.3 Jenkins的启动停止
1 sudo service jenkins start/stop/restart
2. 修改Jenkins端口:
1 vi /etc/sysconfig/jenkins
将 JENKINS_PORT="8080" 改为其他端口 : JENKINS_PORT="xxxx"
3. 启动Jenkins, 访问主页: http://xxx.xxx.xxx.xxx:xxxx
输入 /var/lib/jenkins/secrets/initialAdminPassword 里面的初始密码进行登陆