Mongre cluster服务的安装与配置
来源:互联网 发布:网络商学院排名 编辑:程序博客网 时间:2024/05/17 18:26
STEP1.安装必备的gem包
- gem install –include-dependencies mongrel
- gem install –include-dependencies mongrel_cluster
STEP2.配置
Mongre_cluster的设置比较简单,进入Rails应用的根目录,执行
- cd /var/www/demo
- mongrel_rails cluster::configure -e production -p 8000 -a 127.0.0.1 -N 5 -c /var/www/demo
其中
-e 指定运行环境,有production(生产)、development(开发)、test(测试)三个选项。
-p 指定监听端口
-a 127.0.0.1 指定Mongrel在localhost下监听
-N 5 启动两个Mongrel进程,端口从8000~8004
执行以上命令后,会在/var/www/demo/config目录产生mongrel_cluster.yml文件
- ---
- cwd: /var/www/demo
- log_file: log/mongrel.log
- port: "8000"
- environment: production
- address: 127.0.0.1
- pid_file: tmp/pids/mongrel.pid
- servers: 5
至于mongrel_rails cluster::configure 命令的详细用法,可以mongrel_rails cluster::configure --help查看
- Usage: mongrel_rails <command> [options]
- -e, --environment ENV Rails environment to run as
- -p, --port PORT Starting port to bind to
- -a, --address ADDR Address to bind to
- -l, --log FILE Where to write log messages
- -P, --pid FILE Where to write the PID
- -c, --chdir PATH Change to dir before starting (will be expanded)
- -o, --timeout TIME Time to wait (in seconds) before killing a stalled thread
- -t, --throttle TIME Time to pause (in hundredths of a second) between accepting clients
- -m, --mime PATH A YAML file that lists additional MIME types
- -r, --root PATH Set the document root (default 'public')
- -n, --num-procs INT Number of processor threads to use
- -B, --debug Enable debugging mode
- -S, --script PATH Load the given file as an extra config script.
- -N, --num-servers INT Number of Mongrel servers
- -C, --config PATH Path to cluster configuration file
- --user USER
- User to run as
- --group GROUP
- Group to run as
- --prefix PREFIX
- Rails prefix to use
- -h, --help Show this message
- --version Show version
STEP3. 启动
在终端下输入以下命令启动Mongrel:
mongrel_rails cluster::start
STEP4.停止
mongrel_rails cluster::stop
- Mongre cluster服务的安装与配置
- MySQL Cluster 安装与配置
- mysql cluster 配置与安装
- Elasticsearch Cluster 安装与配置
- Mariadb Cluster+Haproxy+keepalived 集群的详细安装与配置
- Anaconda for cluster management安装与配置
- SVN服务的安装与启动,配置
- ubuntu ssh服务的安装与配置
- Windows服务的配置与安装
- Kubernetes DNS服务的安装与配置
- DirectAccess 证书服务的安装与配置
- ftp服务的安装与配置
- MongoDB的安装与MongoDB服务配置
- redis配置与cluster集群的搭建
- MySQL Cluster安装配置
- Redis Cluster安装配置
- linux下配置Mongrel cluster服务的自启动
- Jboss的production配置下去除集群(cluster)服务
- 什么时候执行lsnrctl reload?
- 书签
- 开写
- ASP.NET跨页面传值技巧
- ORACLE listener监听设置密码
- Mongre cluster服务的安装与配置
- Oracle's alert.log
- C3P0连接池详细配置
- 视频网站加速器(56,Youku等等)
- PHP实现文件上传
- 发送短信
- 在家!
- 关于C语言中的结构体对齐
- Jive论坛系统完整分析