ubuntu系统下hudson的安装及配置方法

发表于:2012-09-27来源:cu作者:cloudtimes点击数: 标签:hudson
ubuntu系统下hudson的安装及配置方法。添加partner源sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"

  添加partner源

  sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"

  (注: 如果系统提示没有add-apt-repository命令,则需要先安装python-software-properties,命令sudo apt-get install python-software-properties。另外,有些版本的ubuntu即使安装了python-software-properties 也无add-apt-repository命令,此时需要手动添加此行"debhttp://archive.canonical.com/ubuntu maverick partner"到/etc/apt/sources.list文件中。)

  更新系统

  sudo apt-get update

  安装jre

  sudo apt-get install sun-java6-jre sun-java6-plugin

  安装jdk

  sudo apt-get install sun-java6-jdk sun-java6-plugin

  查看版本信息

  java -version [编辑]设为默认Javasudo update-alternatives --config java选择即可[编辑]Oracle 官方bin安装包

  此外可以用Linux上通用的bin包安装,下载官方bin包,终端下面安装解压,然后修改环境变量指向那个jdk便可。

  设置环境变量,修改.bashrc或.profile,参考自己系统解压的路径改改。

  export JAVA_HOME=/home/user/jdk1.6.0_21/ export PATH=$JAVA_HOME/bin:$PATH export classPath=/home/user/jdk1.6.0_21/

  查看java版本

  qii@ubuntu:~$ java -version java version "1.6.0_21" Java(TM) SE Runtime Environment (build 1.6.0_21-b06) Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode)

  http://sillycat.iteye.com/blog/982528

  Hudson on Ubuntu System(I)Install and configuration

  1. Install Hudson on my system

  I download the file from this URL:

  http://java.net/downloads/hudson/Debian/hudson-debian-2.1.2.deb

  Double click the file and install it.

  after the installation, you can check up the status with command:

  >/etc/init.d/hudson status

  start it/stop it

  >/etc/init.d/hudson start

  >/etc/init.d/hudson stop

  I can visit the URL http://localhost:8080/

  The log file exists here

  >vi /var/log/hudson/hudson.log

  we can see all the configurations in this file

  >vi /etc/default/hudson

  by the way, I change the port to 8082

  HTTP_PORT=8082

  right now, we can visit hudson with URL http://localhost:8082/

  2. configure Security

  click menu [Manage Hudson]

  click menu [Configure System]

  check [Enable security]

  TCP port for JNLP slave agents: Disable

  Access Control: Security Realm ----> Hudson's own user database

  Tuthorization ----> Matrix-based security -----> User/group to add: sillycat and admin

  click on the button [Save]

  create your account, for example admin and sillycat.

  references:

  http://hudson-ci.org/

  http://wiki.hudson-ci.org/display/HUDSON/Installing+Hudson+on+Ubuntu

  http://wiki.hudson-ci.org/display/HUDSON/Use+Hudson

  http://digitalsonic.iteye.com/blog/610401

  http://www.iteye.com/wiki/hudson_ci/1682-hudson-standard-security-settings

原文转自:http://www.ltesting.net