51Testing软件测试论坛

标题: 怎么在ubuntu下安装和启动jenkins [打印本页]

作者: 司格特    时间: 2019-3-20 15:10
标题: 怎么在ubuntu下安装和启动jenkins
  1. # root
  2. sudo chmod a+x jdk-6u45-linux-x64.bin
  3. sudo ./jdk-6u45-linux-x64.bin

  4. sudo groupadd jenkins     //创建一个jenkins组
  5. sudo useradd jenkins -d /home/jenkins -m -g jenkins -s /bin/bash  //在jenkins组下创建一个jenkins用户

  6. sudo passwd jenkins   //修改jenkins用户的密码
  7. # jenkins
  8. su - jenkins
  9. exit

  10. //修改路径

  11. sudo vim /etc/profile
  12. # export JAVA_HOME=/opt/jdk1.6.0_45 //这个必须是jdk的绝对路径
  13. # export CLASSPATH=.:$JAVA_HOME/lib/tools.jar
  14. # export PATH=$JAVA_HOME/bin:$PATH

  15. ssh-keygen

  16. # jenkins
  17. ssh-keygen
  18. exit

  19. cd /home/sequoiadb/.ssh
  20. sudo cp id_rsa.pub /home/home/jenkins/.ssh/sequoiadb.pub

  21. # jenkins
  22. su - jenkins
  23. cd /home/home/jenkins/.ssh
  24. cat sequoiadb.pub > authorized_keys
  25. rm sequoiadb.pub
  26. exit

  27. # root
  28. ssh jenkins@localhost       //用ssh连接主机
  29. java -jar jenkins.war  //打开jenkins
复制代码



作者: Miss_love    时间: 2020-12-30 17:55
支持分享




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2