Hudson install on Ubuntu hack

Source: Internet
Author: User

 

# Hudson install hack

# Install jdk6. Note: Now install JDK need new method. Please refer next page for detail.

Sudo apt-Get install sun-java6-jdk

After installation, enter the command

Sudo Update-alternatives -- config Java, and select Java-6-sun from the menu.

 

Now you can enter Java-version to test whether your JDK has been installed. How can this problem be solved!

On my machine, only Java commands are valid. Other commands such as javac and native2ascii cannot be found. By default, only Java links are added to $ path, here we can solve this problem in two ways. First, manually add the link to the/usr/bin directory, and then add $ java_home/bin to the $ PATH variable.

Here I use the second method, use your favorite editor, in ~ /Add the following two lines to the end of the bashrc file:

(More common setting in the/etc/profile)

Export java_home =/usr/lib/JVM/Java-6-sun

Export jre_home =/usr/lib/JVM/Java-6-sun/JRE

Export Path = $ path: $ java_home/bin

 

# Install apache2, tomcat6, ant, subversion, etc

Sudo apt-Get install apache2

Sudo apt-Get install tomcat6

Sudo apt-Get install Hudson

 

# Hudson can run in Web by itself in install place/var/lib/Hudson. but the more usual way is that sets the Hudson in Tomcat install place/var/lib/tomcat/webapps/Hudson, which just need copy Hudson. war to/var/lib/tomcat/webapps

# Configures the hudson_home in/etc/default/tomcat6 file.

Hudson_home =/var/lib/tomcat/webapps/Hudson

Java_opts = "-dhudson_home =/var/lib/tomcat/webapps/Hudson"

 

# Some Tomcat commands

Sudo/etc/init. d/tomcat6 start

/Etc/init. d/tomcat6 stop

/Etc/init. d/tomcat6 restart

 

# Everything is OK, and you can configure the port number, such as 8082 instead 8080.

# Shocould assign another port instead of defualt port 8080, such as 8082

Java-jar Hudson. War -- httpport = 8082

 

# Or change the/etc/default/Hudson File

Http_port = 8082

 

# In Tomcat 6, you can configure file:/etc/tomcat6/server. XML for the port.

 

The sun-java6 package (and also jdk7) is no longer available in the official Ubuntu 11.10 oneiric ocelot repositories due to the removal of the Jdl license. To install Sun JDK on Ubuntu 11.10.

1. Open terminal. To open terminal click the dash home from Unity launcher. And type terminal in the search field. And click Terminal

2. type the below code in terminal and hit Enter.

Sudo add-Apt-repository PPA: ferramrobert to/Java

Type your Ubuntu password if needed and press Enter.

3. Then press enter to continue or Ctrl-C to cancel adding the PPA.

4. Type below command and hit Enter

Sudo apt-Get update

5. Then type below command and press ENTER

Sudo apt-Get install sun-java6-jdk sun-java6-plugin

6. Type Y and hit enter to confirm the installation.

7. Select

OK

And press Enter

8. To accecpt the DLJ licence select YES and press ENTER

9. After the successful installation, to check the installed version type

java -version

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.