1.6 KiB
1.6 KiB
Install by docs from https://www.cherryservers.com/blog/install-jenkins-ubuntu
Prepare installation
Открываю нужный сервер
wsl
sudo apt update
sudo apt upgrade
sudo apt install openjdk-21-jdk openjdk-21-jre -y &&
java -version
Add Jenkins Repository
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
Next, add the Jenkins repository to your system’s sources.list:
sudo sh -c 'echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt update
sudo apt install jenkins -y
If the software was installed incorrectly, you can reinstall it after uninstalling it first.:
sudo apt remove --purge jenkins
jenkins --version
Try run jenkins without service
sudo -u jenkins /usr/bin/jenkins --httpPort=8081 --httpListenAddress=0.0.0.0
sudo mcedit /lib/systemd/system/jenkins.service
sudo systemctl start jenkins &&
sudo systemctl enable jenkins &&
sudo systemctl status jenkins
sudo journalctl -xeu jenkins.service | tail -n 50
Если порт занят, проверяем кем:
sudo lsof -i :8081
Переопределяем порт:
sudo mcedit /etc/default/jenkins
HTTP_PORT=8081
sudo systemctl restart jenkins
start http://127.0.0.1:8081
See what port in locked
netstat -tpln