1.jenkins下载
https://pkg.jenkins.io/redhat-stable/jenkins-2.138.3-1.1.noarch.rpm
https://pkg.jenkins.io/debian-stable/binary/jenkins_2.138.3_all.deb
2. jenkins上传至服务器
ftp:119.3.21.165 root QLY20160214qly
3. 安装并启动
3.1 ubuntu安装及启动
sudo dpkg -i jenkins_2.138.3_all.deb
#启动
service jenkins start
#查看状态
service jenkins status
#重启
service jenkins restart
#停止
service jenkins stop
3.2 CentOS安装及启动
rpm -iv jenkins-2.138.3-1.1.noarch.rpm
#启动
service jenkins start
如果启动失败Starting Jenkins bash: /usr/bin/java: No such file or directory
ln -s /usr/local/jdk1.8.0_172/bin/java /usr/bin/java
#查看状态
service jenkins status
#重启
service jenkins restart
#停止
service jenkins stop
4. 修改jenkins端口及启动所属用户
4.1 ubuntu
gpasswd -a jenkins root
gpasswd -a jenkins docker
sudo gedit /etc/default/jenkins
4.2 CentOS
gpasswd -a jenkins root
gpasswd -a jenkins docker
vim /etc/sysconfig/jenkins
5. 配置jenkins
5.1 解锁jenkins
Unlock Jenkins
拷贝填充
5.2 安装推荐插件
安装推荐插件过程:
登录
系统管理->
全局安全配置->
重启jenkins
service jenkins restart
此时允许注册用户
系统管理->
插件管理->
全局工具配置->