事前準備
#1. jenkinsをインストールする
sudo yum update
sudo wget -O /etc/yum.repos.d/jenkins.repo \
https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum upgrade
sudo amazon-linux-extras install epel-release
sudo amazon-linux-extras install java-openjdk11
java
sudo yum install java-11-openjdk-devel
javac
sudo yum install jenkins
sudo systemctl daemon-reload
sudo systemctl start jenkins
sudo systemctl status jenkins
参照:
https://www.jenkins.io/doc/book/installing/linux/#red-hat-centos
#2. jenkins web uiにログインする
Administratorの初期パスワードを取得しておく。
sudo cat /var/lib/jenkins/secrets/initialAdminPassword