zoukankan      html  css  js  c++  java
  • 部署细节回忆录(包括了nginx重启)

    (文章是从我的个人主页上粘贴过来的,大家也可以访问我的主页 www.iwangzheng.com)

    $cap -T

    $cap deploy:setup

    $cap deploy           (遇到报错说没有config文件,所以先去服务器端新建个)

    $ssh 10.10.10.10  -l root -p 33333   (地址及端口号纯属虚构)

    $mkdir config      (在shared目录)

    $rbenv rehash       (current 目录)

    $ ruby -v              (报错:ruby:command not found,不过显示了version)

    $rbenv global 1.9.3-p327 (这种错误不是每次都出现,在部署出错的时候出现)

    $ruby -v               (成功执行了)

    $bundle exec thin start -C config/thin.yml  (在current里,报错thin没在Gemfile)

    这里把本地和服务器的Gemfile都修改下,加入 gem 'thin', '1.6.1'

    $bundle

    这里可以把一些之前别的发布文件里的config里的配置文件拷贝过来,thin.yml里面的内容需要做修改,比如第二行的文件目录chdir,第五行的端口号port

    现在可以到/opt/nginx/conf/nginx.conf里新增一下端口和路由的配置

    $/opt/nginx/sbin/nginx -t   在sbin文件里测试下

    $/opt/nginx/sbin/nginx -s reload   在nginx文件夹里

    $bundle exec thin start -C config/thin.yml

    $ps -ef |grep 5218     查看端口是否启动

  • 相关阅读:
    Connection termination(by client)” 错误的处理方法
    Loadrunner教程读后感-VuGen
    通过HP Loadrunner VuGen来录制安卓的应用
    Test Android with QTP
    Junit单步调试
    魔法方法
    手写配置文件
    理解self与this
    幂等性
    Python assert作用
  • 原文地址:https://www.cnblogs.com/iwangzheng/p/3578078.html
Copyright © 2011-2022 走看看