安装和配置Apache + mongrel cluster

mongrel_service 安装包 相信安装Redmine时会用到它们 win32-service-0.5.2.gem gem_plugin-0.2.3.gem mongrel_service-0.3.4-i386-mswin32.gem 立即下载

 

 

背景:

机器1 192.168.100.231, os: CentOS release 3.6 (Final),装上apache2.3.6+mongrel cluster

机器2 192.168.100.234, os: CentOS release 4.3 (Final) 装上 mongrel cluster

1)安装和配置mongrel_cluster
 gem install mongrel_cluster
 
 
cd #{your_rails_app_root}
 
mongrel_rails cluster
::configure -e production -p 4000 -N 4 -c #{your_rails_app_root} -a 127.0.0.1 
 
上面命令在#{your_rails_app_root}/config产生如下配置文件mongrel_cluster.yml
内容如下:
cwd: #{your_rails_app_root}
log_file: log
/mongrel.log
port: 
"4000"
environment: production
address: 
127.0.0.1
pid_file: tmp
/pids/mongrel.pid
servers: 
4
 
上面已经安装和配置好mongrel_cluster,开始启动和停止试试
启动:
mongrel_rails cluster::start
结果:
starting port 4000
starting port 
4001
starting port 
4002
starting port 
4003
 
停止
mongrel_rails cluster::stop
结果:
stopping port 4000
stopping port 
4001
stopping port 
4002
stopping port 
4003
 
注意
上面的 配置过程并没有为mongrel_cluster产生特别的用户和组,如果你已非root身份登陆可能是需要的
 
 
2)安装apache2.2.6
cd /usr/local
 
wget http:
//apache.mirror.phpchina.com/httpd/httpd-2.2.6.tar.gz
 
tar xvzf httpd-
2.2.6.tar.gz
 
cd httpd-2.2.6
 
./configure --prefix=/usr/local/apache2.2.6 
    --enable-proxy
=shared 
    --enable-proxy_http
=shared 
    --enable-proxy-balancer
=shared
 
make && make install
 
由于apache2.2.6的配置文件中已经引入了
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules
/mod_proxy_http.so
LoadModule proxy_balancer_module modules
/mod_proxy_balancer.so
 
所以你无需在配置文件加入这些
你的加上如下部分
 
<Proxy balancer://spacecluster>
    
# cluster members
    BalancerMember http:
//127.0.0.1:4000 
    BalancerMember http:
//127.0.0.1:4001 
    BalancerMember http:
//127.0.0.1:4002 
    BalancerMember http:
//127.0.0.1:4003
   
    BalancerMember http:
//192.168.100.234:4000
    BalancerMember http:
//192.168.100.234:4001
    BalancerMember http:
//192.168.100.234:4002
    BalancerMember http:
//192.168.100.234:4003 
</Proxy>

ExtendedStatus 
On
<Location /server-status>
    SetHandler server-status
</Location>

<Location /balancer-manager>
    SetHandler balancer-manager
</Location>

<VirtualHost *:80>
    ServerName space
.mofile.com

    ProxyRequests 
Off

    ProxyPass 
/balancer-manager !
    ProxyPass 
/server-status !
    ProxyPass 
/ balancer://spacecluster/
    ProxyPassReverse 
/ balancer://spacecluster/
</VirtualHost>
 
到此你的 apache+mongrel cluster就安装配置好了,你可以用浏览器访问apache看看是否生效了
Rails 中mongrel的安装 NULL 博文链接:https://ilstar.iteye.com/blog/370808 立即下载

相关推荐

告别Docker Desktop!Colima在Mac上的5分钟极速安装与配置指南(M1芯片实测)

本文详细介绍了如何在Mac(尤其是M1芯片)上快速安装和配置Colima,作为Docker Desktop的免费替代品。通过优化配置和实战指南,帮助开发者提升容器运行效率,减少资源占用,实现丝滑的开发体验。

weixin_28839601的博客 453

mongrel_cluster功能介绍及安装方法

1、介绍 ROR开发环境- 可以使用 webrick &amp; mongrel 生产环境- Mongrel cluster Mongrel cluster功能 - 负载均衡 - 请求共享 - 操作简单 - 建立单独的PID ,方便进行kill - 守护进程模式 如果你计划发布的APP使用人数在30-人数,可以考虑webrick或者mongrel,否则请考虑使用m...

老焦的blog-奋斗12年IT虫子所思所想所感 218

三菱FX5U运动控制(步进)

三菱FX5U脉冲定位控制,原点回归,相对定位,绝对定位,运动控制案例。

weixin_55762091的博客 1万+

mongrel cluster

安装Mongrel cluster $sudo gem install mongrel mongrel_cluster 进入项目根目录 $mongrel_rails cluster::configure 然后mongrel_cluster便会在config目录下生成一个mongrel_cluster.yml,内容如下: --- log_file: lo...

薛定谔猫的小窝 262

AI数字人短视频数字人口播数字人分身建模流程全解析

在人工智能与计算机图形学蓬勃发展的当下,数字人建模作为打造虚拟数字人的核心环节,其流程复杂且精妙,融合了多种前沿技术与创意构思,为栩栩如生的数字人形象奠定基石。​。

2403_87518095的博客 1458

值得苦练的100道Python经典练手题(全网最全,附详细答案,建议收藏)

这100道Python练习题涵盖了从基础语法到高级算法、从数据库操作到Web开发的各个方面,是备考数据库系统工程师的绝佳素材。建议按照章节顺序逐一练习,遇到难点可反复钻研,真正掌握每一道题背后的知识点。通过这些练习,不仅能提升Python编程能力,还能加深对数据库系统原理的理解,为考试和实际工作打下坚实基础。

yue_yun_的博客 9460

mongrel cluster中的敏感字符:Cluster

 开发在webrick上测试rails应用没有任何问题,但一部署在mongrel cluster上就出问题了 总是报NoMethodError: undefined method `find’ for Cluster:Module  也就是在执行Cluster.find出的问题 很奇怪的问题,我明明定义一个activerecord classclass Clus

pwlazy的专栏 1116

数据行小于列索引,内部模式表示可能存在问题

通过检查数据源的完整性和一致性,检查Debezium配置,检查列映射以及启用调试模式和日志记录,您应该能够解决这个错误。请注意,具体的解决方法可能因您的具体情况而异,因此您可能需要根据问题的根本原因进行适当的调整和修复。如果问题仍然存在,您可能需要进一步检查您的数据和配置,并根据具体情况进行调整和修复。在Debezium中,您可以使用列重命名和列映射来定义源和目标之间的列映射关系。通过检查日志,您可以查看详细的错误信息和堆栈跟踪,从而更好地理解问题的根本原因。首先,我们应该检查数据源的完整性和一致性。

XbtoMemory的博客 733

mongrel的windows的安装

安装了几次都没有成功,运行mongrel_rails start -d都提示出错,仔细看了下原因,是找不到文件和目录,我查了一下,mongrel被安装到c:\ruby\lib\ruby\gems\1.8\gem下了,一看目录名称和运行出错的目录名称不一致,我将文件名称改了一下,运行成功。 不知道为什么,有可能是我先安装的rails,再安装的mongrel的原因吧。...

frogxj 237

MIC:最大信息系数

目录 1. 概念 1.1 MIC 1.2 互信息 2.MIC的优点 3. 算法原理 3.1 MIC公式原理 3.2MIC计算步骤 (1)计算最大互信息值 (2)对最大的互信息值进行归一化 (3)选择不同尺度下互信息的最大值作为MIC值 4. 代码实现 6. 其他方法 1. 概念 1.1 MIC MIC,即(Maximal Information...

满腹的小不甘 5万+

北斗导航 | 从北一到北二再到北三,你应该知道的北斗导航系统

博主github:https://github.com/MichaelBeechan 博主CSDN:https://blog.csdn.net/u011344545 一、引言 我国高度重视北斗系统的建设和发展。自20世纪80年代开始探索适合我们国家国情的卫星导航系统发展道路,形成了“三步走”的发展战略:2000年底,建成北斗一号导航系统,向我国广大用户提供服务;2012年底,建成北斗二号导航系统,...

尘世冰封的专栏 3086

在ubuntu 中如何配置rails + apache + mongrel 服务环境

1. 创建一个项目     cd ~/public_html rails railsapp   2.  Apache 需要激活 proxy 和 rewrite 模块        一般安装的apache 需要执行以下命令:     sudo a2enmod proxy sudo a2enmod proxy_balancer sudo a2enmod proxy...

chenbinGood的专栏 235

第2.0章 机器人C++学习开篇(一):SLAM为什么使用C++语言及学习路线资料推荐

ROS(机器人操作系统):机器人领域的“操作系统”,提供节点通信、参数管理、工具链支持,是SLAM算法在机器人上部署的核心框架。PCL(点云库):处理三维点云数据的利器,包含滤波、分割、配准等算法,是激光SLAM的核心依赖。Eigen(矩阵运算库):高效的矩阵与线性代数运算库,SLAM中的位姿变换、优化求解都依赖它。Ceres/G2O(优化库):SLAM后端优化的“王牌”,Ceres擅长通用非线性优化,G2O则专为图优化设计,二者是BA( bundle adjustment)等算法的实现基础。

行知SLAM 1251

apache2 mongrel

sudo apt-get install apache2 sudo gem install mongrel sudo gem install mongrel_cluster #start.sh mongrel_rails start -d -p 8000 -e production -P log/mongrel-1.pid mongrel_rails start -d -p ...

遇见上帝了 ^_^ 152

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

ubuntu+apache2+rails

<br />在Ubuntu上部署Rails(Apache mod_proxy mongrel_cluster) <br /><br /> 最近需要把Rails的程序发布出去,在发布的过程中遇到了一些问题,虽然都用Google解决了,不过也注意到,在Ubuntu下部署Rails和其它Linux环境有所不同,为了以后少走弯路,把最近部署的过程记了下来。 <br /> 以下环境为7.04 <br /> 一:以Server的形式安装Ubuntu,安装完成后,设置IP、软件安装源。(这点就不说

凡人凡居 1432

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

linux rails 环境安装

一. Ruby 安装 1. 得到Ruby安装包   wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz   安装的1.8.7版本 2. 解压安装    tar -xzvf ruby-1.8.7-p174.tar.gz    cd  ruby-1.8.7-p174    ./conf

stackoverflow 2556

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

Fedora Core 6 上安裝 beast

我選擇 apache2.2 + mongrel_cluster + postgresql安裝 apache 和其他的東西。sudo yum install httpdsudo yum install httpd-develsudo yum install opensslsudo yum install readline安裝 rubysudo yum install rubysudo yum ins...

thegiive 239

linux下配置 apache+mongrel_cluster+mongrel

操作系统 :Red Hat Enterprise Linux 5 (一)首先我们先安装ruby http://www.ruby-lang.org/zh_CN/news/2008/08/12/ruby-1-8-7-p72-and-1-8-6-p287-released/ 我安装的是 ruby-1.8.6-p287.tar.gz 版本 [root@dingrui ]# tar xzvf ...

dingr的专栏 228

使用Capistrano部署apache+mongrel cluster

    部署任务:机器1 192.168.100.231, os: CentOS release 3.6 (Final),装上apache2.3.6+mongrel cluster机器2 192.168.100.234, os: CentOS release 4.3 (Final) 装上 mongrel cluster关于配置apache+mongrel cluster本文

pwlazy的专栏 2672

利用Mongrel cluster和Apache搭建Rails服务器

Set mongrel cluster and apache for myShareBook.cn [code="java"] 1. Insall mongrel 2. Install apache 3. Create file in apache_root/myConf/my_share_book.conf 4. Config apache_conf [/code] 5. ...

wxmfly 196
上一篇: 配置apache +mongrel单实例
下一篇: 使用Capistrano部署apache+mongrel cluster
pwlazy
博客等级 码龄24年 327粉丝 200原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值