$ mv sh.zip /home/tmp/ & cd /home/tmp $ unzip sh.zip $ chmod -R 777 sh & cd sh # 任意选择一种方法执行脚本 # 方法一 $ ./install.sh # 方法二 $ ./install_nginx_xxx.sh $ ./install_mysql_xxx.sh
$ curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3 # 注意安装完成后,根据提示执行source命令
$ ruby -v ruby 1.9.3p448 (2013-06-27 revision 41675) [i686-linux] $ gem -v 2.1.9
$ gem source -r https://rubygems.org/ $ gem source -a http://ruby.taobao.org
$ yum install git
$ git clone https://github.com/joyent/node.git $ cd node $ ./configure && make && make install #如果无法编译,说名需要叫python升级到2.6或2.7 #如果缺少bz2,需要yum install bzip2-devel后,重新编译python
$ git clone path/to/your/project.git # 安装项目指定gem包 $ cd path/to/your/project $ bundle install
$ unicorn_rails -c config/unicorn.rb -E production -D
$ kill -9 $(cat tmp/pids/unicorn.pid )
$ vim /path/to/your/nginx/vhosts/xxxx.conf
upstream unicorn_server
{
server unix:项目根目录/tmp/sockets/unicorn.sock fail_timeout=0;
}
server
{
listen 80;
server_name 域名;
root 项目根目录/public;
location /
{
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering on;
if (!-f $request_filename) {
proxy_pass http://unicorn_server;
break;
}
}
location ~ ^/(assets)/
{
expires max;
add_header Cache-Control public;
}
}
$ vim /etc/crontab
00 1 * * * echo 3 > /proc/sys/vm/drop_caches
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有