美文网首页Nodejs
linux 安装和部署

linux 安装和部署

作者: 西葫芦炒胖子 | 来源:发表于2019-11-02 17:13 被阅读0次

    最终结果:

    • image.png
    • image.png

    [环境]
    JAVA环境:


    image.png

    采用apt-get方式安装

    sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
    sudo apt-get update
    sudo apt-get install jenkins
    
    wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
    sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
    sudo apt-get update
    sudo apt-get install jenkins
    
    1. 修改jenkins的服务脚本
    vi /etc/init.d/jenkins 
    

    启动jenkins报错: Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.

    //查找java环境目录
    echo $JAVA_HOME
    //打开配置文件 后缀附上/bin/java,例如 /usr/local/software/java/bin
    vi /etc/init.d/jenkins 
    //重启服务
    systemctl start jenkins
    
    image.png

    4.启动jenkins

    service jenkins start
    

    5.打开浏览器输入 xxx.xx.xx.xx:8080
    默认端口为8080,可以自行修改

    /etc/default/jenkins
    
    image.png

    3.生成秘钥

    ssh-keygen -t rsa
    ssh-copy-id -i ~/.ssh/id_rsa.pub root@10.0.0.41
    

    相关文章

      网友评论

        本文标题:linux 安装和部署

        本文链接:https://www.haomeiwen.com/subject/ecmcbctx.html