Hướng dẫn cách cài đặt Jenkins trên CentOS 7

jenkins Jun 30, 2019

Jenkins là phần mềm mở, được viết bằng ngôn ngữ Java. Jenkins cung cấp continous integration và continous delivery (CI/CD).

CI là cách team DevOps thường commit code của họ để automated các repository của dev các công đoạn build, test và run. CD là automate build lên production sau khi đã pass các công đoạn build code và test.

Cài đặt Jenkins

Jenkins là 1 ứng dụng được viết bằng Java nên việc đầu tiên chúng ta phải cài môi trường java lên hệ điều hành:

sudo yum install java-1.8.0-openjdk-devel

Enable Jenkins repo:

curl --silent --location http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo | sudo tee /etc/yum.repos.d/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

Cài Jenkins

sudo yum install jenkins
sudo systemctl start jenkins

Xem trạng thái service Jenkins trên hệ điều hành

systemctl status jenkins

Cuối cùng, enable service Jenkins khi hệ điều hành reboot:

sudo systemctl enable jenkins

Tags