美文网首页
智慧湾部署服务

智慧湾部署服务

作者: Yuri1996 | 来源:发表于2019-11-22 09:29 被阅读0次

    环境 centos springBoot

    centOS 7 更换阿里源

    // 备份
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    // 更换
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    yum clean all
    yum makecache
    

    更改路由代理啥的不能上网,可以尝试

    source /etc/profile
    

    查看os 版本

    # lsb_release -a
    

    安装git

    sudo yum install -y git
    

    生成秘钥,回车,不要乱输,公钥在/root/.ssh/id_rsa.pub中,cat一下放到仓库即可

    git config --global user.name "yangpeng"
    git config --global user.email "yangpeng@smartpilot.com"
    

    查看配置是否生效

    git config --list
    

    git 生成秘钥

    ssh-keygen -t rsa -C "yangpeng@smartpilot.cn"
    

    一路回车即可

    cd ~/.ssh
    

    克隆代码

    git clone git@codehub-cn-northeast-1.devcloud.huaweicloud.com:cb368416b55a4c1d9801f26cd2577f1e/smart-parent.git
    

    看看/切换分支

    git branch -a
    git checkout -b zhanghanlun origin/zhanghanlun
    

    安装mvn

    wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
    
    yum -y install apache-maven
    

    设置阿里云源

    <mirror>
          <id>alimaven</id>
          <name>aliyun maven</name>
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
          <mirrorOf>central</mirrorOf>       
    </mirror>
    

    创建脚本文件

    touch zhihuiwan.sh
    

    授权脚本可执行

    chmod u+x zhihuiwan.sh
    

    远程拷贝scp

    scp heyi-util-0.0.3.jar  root@192.168.0.6:/root
    

    安装node

    curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
    yum install -y nodejs
    

    npm安装yarn

    修改JAVA配置文件

    vim /etc/profile
    
    export JAVA_HOME=/usr/local/jdk1.8.0_201
    export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/
    export PATH=$PATH:$JAVA_HOME/bin
    

    使配置文件生效

    source /etc/profile
    

    npm 下载另个特变慢的文件

    touch ~/.bashrc; echo 'export PHANTOMJS_CDNURL="http://npm.taobao.org/mirrors/phantomjs"' >> ~/.bashrc
    touch ~/.bashrc; echo 'export SASS_BINARY_SITE="https://npm.taobao.org/mirrors/node-sass"' >> ~/.bashrc
    

    nginx 开启启动

    systemctl enable nginx.service 
    

    相关文章

      网友评论

          本文标题:智慧湾部署服务

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