First, Java
>java
Choose OpenJDK
>sudo apt-get Install Open ...
>java-version
>javac
Choose OpenJDK
>sudo apt-get Install Open ...
>javac-version
Find the installation directory for Java/USR/LIB/JVM/JAVA-1.6.0-OPENJDK
Edit VI ~/.BASHRC
Finally add
Export JAVA_HOME=/USR/LIB/JVM/JAVA-1.6.0-OPENJDK
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Execution: Source ~/.BASHRC
Then enter: Echo $JAVA _home
Because the Java Javac is already configured in the environment variable, we can only configure Java_home and classpath here.
Second, 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 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 through, 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.
Hudson on Ubuntu System java_home