1、安装Jenkins
Install Jenkins On Ubuntu
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c ‘echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list‘sudo apt-get update
sudo apt-get install jenkins
打开http://localhost:8080如果看到Jenkins的首页说明你已经安装成功了。
更改端口
如果端口8080已经被占用,要修改配置文件来改变端口。
sudo vi /etc/default/jenkins
找到HTTP_PORT=8080,把8080改为8000,然后
sudo service jenkins restart
一、安装jenkins
1、添加yum repos,然后安装
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/RedHat/jenkins.repo sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key sudo yum install jenkins
注:如果网络不好需要重试几次
2、如果未安装java还需安装java
sudo yum install java
3、启动和停止
sudo service jenkins start sudo service jenkins stop sudo service jenkins restart
4、jenkins的默认设置
sudo chkconfig jenkins on
Jenkins会随系统启动而启动。详情参照/etc/init.d/jenkins
Jenkins会创建一个用户叫做jenkins, 如果你修改了user,则要修修改所属者:/var/log/jenkins,/var/lib/jenkins,/var/cache/jenkins
如果遇到问题,查看日志/var/log/jenkins/jenkins.log
配置文件/etc/sysconfig/jenkins
默认启用8080
打开和关闭防火墙
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --reload
firewall-cmd --list-all
参考文档:
http://blog.csdn.net/achuo/article/details/51086599