If you have installed Jenkins on a Fedora or Debian based distribution like Ubuntu, you can use the below commands:
Start Jenkins
$ sudo service jenkins start
Stop Jenkins$ sudo service jenkins stop
Restart Jenkins$ sudo service jenkins restart
Check Jenkins status$ sudo service jenkins status
For other Linux distribution like RHEL or CentOS use:Start Jenkins
$ sudo systemctl start jenkins.service
Stop Jenkins
$ sudo systemctl stop jenkins.service
Restart Jenkins
$ sudo systemctl restart jenkins.service
Check Jenkins status
$ sudo systemctl status jenkins.service
Check Jenkins PortTo check the port on which Jenkins is listening we can use “lsof”(check installation instructions at the end) command.
[ec2-user@cloudvedas ~]$ sudo /usr/sbin/lsof -i -P | grep -i jenkins
java 1030 jenkins 161u IPv6 27986 0t0 TCP *:8080 (LISTEN)
Above we can see Jenkins is listening on port 8080.
If you do not have lsof you can simply install it with following commands
Ubuntu
sudo apt-get install lsofRHEL or CentOS
sudo yum install lsof
No comments:
Post a Comment