sudo service jenkins start
启动jenkins,如果启动失败,按照错误提示进行修改,比如我这里是
[root@weibo1 ~]# service jenkins start
Starting Jenkins bash: /usr/bin/java: No such file or directory
[FAILED]
那么可以先使用which java查看java所在路径,我这里是/usr/jdk1.8.0_131/bin/java,再通过
Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
这里在输入密码的时候,我直接回车,即空密码。然后,我们使用cat ~/.ssh/id_rsa.pub查看
生成的公钥,如下