怎么在ubuntu下安装jenkins和启动jenkins

2013年3月 总版技术专家分月排行榜第二
2014年2月 Java大版内专家分月排行榜第一2013年8月 Java大版内专家分月排行榜第一2013年5月 Java大版内专家分月排行榜第一2013年4月 Java大版内专家分月排行榜第一2013年3月 Java大版内专家分月排行榜第一2013年2月 Java大版内专家分月排行榜第一
本帖子已过去太久远了,不再提供回复功能。博客分类:
必须的依赖环境
java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.13) (6b20-1.9.13-0ubuntu1~10.10.1)
OpenJDK Server VM (build 19.0-b09, mixed mode)
mvn -version
Apache Maven 3.0.4 (r12-01-17 16:44:56+0800)
Maven home: /opt/maven
Java version: 1.6.0_20, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.35-22-generic-pae", arch: "i386", family: "unix"
git --version
git version 1.7.1
1.下载war包
http://mirrors.jenkins-ci.org/war/latest/jenkins.war
2.安装war包到tomcat
3.访问管理界面http://127.0.0.1:8888/jenkins/
port:8888,project:jenkins 都可以改变
4.管理jenkins插件
Jenkins GIT plugin
Maven Integration plugin
Javadoc Plugin
Email-ext plugin
Email-ext plugin 插件安装
1.git clone /jenkinsci/email-ext-plugin.git
2.cd email-ext-plugin
3.mvn clean install
5.系统配置
4.git plugin
7.构建&远程部署& 邮件通知
8.大致的流程是这样的:
开发&本地测试&git提交代码&登录jenkins&从git拉代码构建&构建后发布到tomcat&邮件通知构建部署的结果
》if deploy error 》repeat
》if deploy success 》 test function 》 if success 》deploy production env 》else check env importance with dev
(487.6 KB)
下载次数: 6
(552.4 KB)
下载次数: 10
浏览: 374353 次
来自: 上海
果然有高人翻译啊,谢了~
字符串都不用单引号引着吗?博客分类:
文档地址:
https://wiki.jenkins-ci.org/display/JENKINS/JenkinsLinuxStartupScript
----------------------------------------------------------------------------------------
This is a startup script for Linux, and provides start/stop/restart functionality. This has been tested on Ubuntu, but should work on other Linuxes like Redhat or SuSE. You may need to change the environment variables at the top of the script to fit your system. This assumes that Jenkins is installed in /home/jenkins, Tomcat is installed in /home/jenkins/apache-tomcat-6.0.18, and that JENKINS_HOME is /home/jenkins/jenkins-home
To install, on Ubuntu:
Save the file to /etc/init.d/jenkins
chmod a+x /etc/init.d/jenkins
update-rc.d jenkins defaults
# Startup script for the Jenkins Continuous Integration server
# (via Jakarta Tomcat Java Servlets and JSP server)
# chkconfig: - 85 15
# description: Jakarta Tomcat Java Servlets and JSP server
# processname: tomcat
# pidfile: /var/run/tomcat.pid
# Set Tomcat environment.
JENKINS_USER=jenkins
LOCKFILE=/var/lock/jenkins
export PATH=/usr/local/bin:$PATH
export HOME=/home/jenkins
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export JENKINS_BASEDIR=/home/jenkins
export TOMCAT_HOME=$JENKINS_BASEDIR/apache-tomcat-6.0.18
export CATALINA_PID=$JENKINS_BASEDIR/jenkins-tomcat.pid
export CATALINA_OPTS="-DJENKINS_HOME=$JENKINS_BASEDIR/jenkins-home -Xmx512m -Djava.awt.headless=true"
[ -f $TOMCAT_HOME/bin/catalina.sh ] || exit 0
export PATH=$PATH:/usr/bin:/usr/local/bin
# See how we were called.
case "$1" in
# Start daemon.
echo -n "Starting Tomcat: "
su -p -s /bin/sh $JENKINS_USER -c "$TOMCAT_HOME/bin/catalina.sh start"
[ $RETVAL = 0 ] && touch $LOCKFILE
# Stop daemons.
echo -n "Shutting down Tomcat: "
su -p -s /bin/sh $JENKINS_USER -c "$TOMCAT_HOME/bin/catalina.sh stop"
[ $RETVAL = 0 ] && rm -f $LOCKFILE
condrestart)
[ -e $LOCKFILE ] && $0 restart
status tomcat
echo "Usage: $0 {start|stop|restart|status}"
To install, on Red Hat
Save the file to /etc/init.d/jenkins
chmod a+x /etc/init.d/jenkins
chkconfig jenkins on
ntsysv and see if the Jenkins service is turned on.
浏览: 421631 次
来自: 上海
你好,这个遍历文件的结果是乱序的吗
使用protobuf吧,解析效率比java序列化性能高许多
试试看 这样是不行的 alanland 写道josico 写道 ...
josico 写道redis中 存的是这么一个value,并且 ...
zhaozy888 写道居然还要 序列化、反序列化
,不知道 ...博客分类:
On Debian-based distributions, such as Ubuntu, you can install Jenkins through apt-get.
Recent versions are available in . Older but stable LTS versions are in .
You need to have a JDK and JRE installed. openjdk-7-jre and openjdk-7-jdk are suggested. As of 2011-08 gcj is known to be problematic - see .
Please make sure to back up any current Hudson or Jenkins files you may have.
Installation
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
gao@gao-VirtualBox:~$ sudo apt-get install jenkins正在读取软件包列表... 完成正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会安装下列额外的软件包:
ca-certificates-java daemon default-jre-headless icedtea-6-jre-cacao
icedtea-6-jre-jamvm java-common openjdk-6-jre-headless openjdk-6-jre-lib
tzdata-java建议安装的软件包:
default-jre equivs sun-java6-fonts ttf-dejavu-extra fonts-ipafont-gothic
fonts-ipafont-mincho ttf-telugu-fonts ttf-oriya-fonts ttf-kannada-fonts
ttf-bengali-fonts下列【新】软件包将被安装:
ca-certificates-java daemon default-jre-headless icedtea-6-jre-cacao
icedtea-6-jre-jamvm java-common jenkins openjdk-6-jre-headless
openjdk-6-jre-lib tzdata-java升级了 0 个软件包,新安装了 10 个软件包,要卸载 0 个软件包,有 52 个软件包未被升级。需要下载 105 MB 的软件包。解压缩后会消耗掉 132 MB 的额外空间。您希望继续执行吗?[Y/n]y
Once installed like this, you can update to the later version of Jenkins (when it comes out) by running the following commands:
sudo apt-get update
sudo apt-get install jenkins
(aptitude or apt-get doesn't make any difference.)
What does this package do?
Jenkins will be launched as a daemon up on start. See /etc/init.d/jenkins for more details.
The 'jenkins' user is created to run this service.
Log file will be placed in /var/log/jenkins/jenkins.log. Check this file if you are troubleshooting Jenkins.
/etc/default/jenkins will capture configuration parameters for the launch like e.g JENKINS_HOME
By default, Jenkins listen on port 8080. Access this port with your browser to start configuration.
If your /etc/init.d/jenkins file fails to start jenkins, on line 108 you may change su -l &username& -c &command& with sudo -u &username& &command&. This fixed init.d script for me (icarito, July 2013).
Deploying on Ubuntu in a cloud (EC2, HP Cloud, OpenStack)
The Ubuntu Jenkins maintainer also maintains the
for deployment in clouds. It's designed to make it easy to deploy a master with multiple slaves:
juju deploy jenkins
juju deploy -n 5 jenkins-slave
juju add-relation jenkins jenkins-slave
The default password for the 'admin' account will be auto-generated. You can set it using:
juju set jenkins password=mypassword
Always change it this way - this account is used by the charm to manage slave configuration. Then feel free to expose your jenkins master:
juju expose jenkins
Setting up an Apache Proxy for port 80 -& 8080
This configuration will setup Apache2 to proxy port 80 to 8080 so that you can keep Jenkins on 8080.
sudo aptitude install apache2
sudo a2enmod proxy
sudo a2enmod proxy_http
do not do this next command if you already have virtual hosting setup that depends on the default site. See my comment below - danapsimer
sudo a2dissite default
Create a file called jenkins.conf in /etc/apache2/sites-available
ServerAdmin webmaster@localhost
ServerAlias ci
ProxyRequests Off
Order deny,allow
Allow from all
ProxyPreserveHost on
ProxyPass / http://localhost:8080/ nocanon
AllowEncodedSlashes NoDecode
sudo a2ensite jenkins
sudo apache2ctl restart
Setting up an Nginx Proxy for port 80 -& 8080
This configuration will setup Nginx to proxy port 80 to 8080 so that you can keep Jenkins on 8080. Instructions originally found in a GitHub Gist from :
Install Nginx.
sudo aptitude -y install nginx
Remove default configuration.
cd /etc/nginx/sites-available
sudo rm default ../sites-enabled/default
Create new configuration for Jenkins. This example uses cat, but you can use your favorite text editor. Make sure to replace '' with your domain name. Note: Sometimes your permissions (umask, etc) might be setup such that this won't work. Create the file somewhere else then copy it into place if you run into that problem.
sudo cat & jenkins
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
listen 80;
listen [::]:80 default ipv6only=
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_
proxy_set_header Host $http_
if (!-f $request_filename) {
proxy_pass http:
^D # Hit CTRL + D to finish writing the file
Link your configuration from sites-available to sites-enabled:
sudo ln -s /etc/nginx/sites-available/jenkins /etc/nginx/sites-enabled/
Restart Nginx
sudo service nginx restart
Where to go from here?
You might want to , to make it available on port 80 (for example,
instead of ). See
原文网址:https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
浏览: 151957 次
来自: 北京
哥们 我在xp系统装了 ubuntu12.04版本 但是按照你 ...
程序员专用主页,代码日记本,搜索快速切换, ...
唉,怎么人家框架也是这样写的

我要回帖

更多关于 ubuntu 16 jenkins 的文章

 

随机推荐