Linux system modifies the Jenkins default home directory

Source: Internet
Author: User

Linux system modifies the Jenkins default home directory

Because the default home directory space for Jenkins is too small, the default directory needs to be modified in production to other directories. In a Linux environment, the Jenkins home directory defaults to/root/.jenkins

Note: The online Jenkins service needs to be cautious,/root/.jenkins there are configuration and plug-ins, please try in the test environment first.

1. Stop Jenkins, open the Tomcat bin directory, SH shutdown.sh

2. Configure the variable (in this case, replace the directory to/usr/local/jenkins, this Jenkins directory does not need to be created manually)

Edit the catalina.sh file in the bin directory

In # OS specific support. $var _must_ is set to either True or false. Add a row above

Export Jenkins_home=/usr/local/jenkins

Edit Profile: Vi/etc/profile

In the last join: Export jenkins_home=/usr/local/jenkins

Save, refresh Global environment variable Source/etc/profile

Restart Tomcat,sh startup.sh

3. Testing

Browser input HTTP://IP: Port/jenkins, interface appears

cat/usr/local/jenkins/Secrets/initialadminpassword

The encrypted string can be pasted in, and then in the System management-system settings to see the home directory is already/usr/local/jenkins




Linux system modifies the Jenkins default home directory

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.