1. Introduction
2. Step by Step
2.1. Prerequisites
2.1.a. Check Memory available
- 1 GB of RAM minimum;
- 4 GB desired;
2.1.b. System Update
$ sudo apt-get update2.2. Install Jenkins
$ wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
OK
$ cat /etc/apt/sources.list.d/jenkins.list
deb http://pkg.jenkins.io/debian-stable binary/
$ sudo apt-get update
2.3. Upgrade Jenkins version ( optional )
$ sudo apt-get update
$ sudo apt-get install jenkins
2.4. Cheking services
$ # Ubuntu/Debian (different from CentOs/Fedora) usually starts software after installation
$ # Jenkins will be started as a deamon service named 'jenkins'
$ # See /etc/init.d/jenkins for more details. Log file will be placed in /var/log/jenkins/jenkins.log.
$ # Config parameters like JENKINS_HOME and etc, will be captured on /etc/default/jenkins
$ # By default, Jenkins listen on port 8080. Edit /etc/default/jenkins to change port
$ # To start-stop-status service do: sudo service jenkins stop; sudo service jenkins start; sudo service jenkins status
2.5. Check/allow firewall rules
a) Check firewall status - Inactive? Great nothing to do
$ sudo ufw status
Status: inactive
b) Check firewall status - Active? add rule to allows Jenkins port
$ sudo ufw statusStatus: active
:
8080 ALLOW Anywhere
:
$ sudo ufw allow 8080
2.6. Setting up Jenkins
a) Access Jenkins interface on browser and you'll see "Unlock Jenkins screen"
$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
+------------------------------------------------+
| Unlock Jenkins |
| : : |
| /var/lib/jenkins/secrets/initialAdminPassword |
| Administrator password |
| [ ] | <- paste here
+------------------------------------------------+
b) Install suggested plugins
+------------------------------------------------+
| Customize Jenkins |
| +------------------+ |
| |Install Suggested | |
| | Pluggins | | <- click button
| +------------------+ |
+------------------------------------------------+
c) Create first admin user
+------------------------------------------------+
| Create first admin user |
| Username: [admin] |
| Password: [admin] |
+------------------------------------------------+
3. References
- https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Ubuntu
- https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04
- https://vexxhost.com/resources/tutorials/how-to-install-configure-and-use-jenkins-on-ubuntu-14-04/
Nenhum comentário:
Postar um comentário