抛弃了Capistrano自己写了两个脚本来远程部署和启动rails
root目录下有个脚本 ~/scripts/deploy_xmapps.sh
#! /bin/bash
# 配置
## 定义check out的目录
SCM_CHECK_OUT_DIR=/tmp/xmapps_dir
## git repository
GIT_REPOSITORY=”ssh://wch@www.xiaoma.com:22229/opt/git/xmapps.git”
## 部署目录
root目录下有个脚本 ~/scripts/deploy_xmapps.sh
#! /bin/bash
# 配置
## 定义check out的目录
SCM_CHECK_OUT_DIR=/tmp/xmapps_dir
## git repository
GIT_REPOSITORY=”ssh://wch@www.xiaoma.com:22229/opt/git/xmapps.git”
## 部署目录
gentoo linux 上sudo安装和使用
gentoo默认没有sudo,而且要想su到root都必须是wheel用户组,可见十分安全
我需要远程执行一点脚本,必须用root权限,所有还是在我的gentoo上安装了sudo
设置代理 ssh隧道
建立一个bat文件写入下面的代码
d:\soft\putty\PLINK.EXE ohergal@xxx.xxx.239.220 -C -D 127.0.0.1:1234
再结合firefox的foxproxy等等就可以实现代理上网了
要有国外的服务器就可以红杏出墙了