Getting Jenkins to run OOTB poses certain challenge, hopefully the following tutorial will make a installation more tolerable.
1. Download and Create VM from template Turnkey Jenkins
2. Disable Security by editing /var/lib/jenkins/config.xml
- Stop Jenkins (the easiest way to do this is to kill the servlet container.)
- Go to $JENKINS_HOME in the file system and find config.xml file.
- Open this file in the editor.
- Look for the <useSecurity>true</useSecurity> element in this file.
- Replace true with false
- Remove the elements authorizationStrategy and securityRealm
- Start Jenkins (service jenkins restart)
- Go to the Configure Global Security screen (http://server/jenkins/configureSecurity/) and choose “enable security”. An alternate URL to try ishttp://server:8080/configureSecurity.
- Select “Jenkins’s own user database” as the security realm
- Place a check mark next to “Allow users to sign up”
- Select “Matrix-based security” as the authorization
- Give anonymous user the read access
- In the text box below the table, type in your user name (you’d be creating this later) and click “add”
- Give yourself a full access by checking the entire row for your user name
- Scroll all the way to the bottom, click “save”
At this point, you’ll be taken back to the top page, and Jenkins is successfully secured.
Restart Jenkins (service jenkins restart)
Now you need to create an user account for yourself.
- Click “login” link at the top right portion of the page
- Choose “create an account”
- Use the user name you’ve used in the above step, and fill in the rest.