发新话题
打印

在Windows平台使用Apache2.2和Mongrel运行Ruby on Rails

在Windows平台使用Apache2.2和Mongrel运行Ruby on Rails

一、安装Ruby、rails、mongrel和Apache2.2

从rubyforge网站下载One-Click Ruby Install,运行安装程序,就安装好了ruby和rubygems。

运行命令:
gem install rails –y
gem install mongrel –y
gem install mongrel_service -y
安装好了rails和mongrel

从Apache网站下载Windows版本的Apache2.2,运行安装程序,就安装好了Apache2.2。

二、把Mongrel作为Services启动

mongrel_rails service::install -N depot -c d:\Rubyproject\depot -p 3000 –e production
-N指明服务名称,-d指明rails应用的目录,-p是mongrel监听的tcp端口,-e是启动模式为生产模式

这样打开控制面版|管理工具|服务,就可以发现增加了一项名为“depot”的服务,就可以通过控制面版来管理服务了。如果需要命令行启动和关闭该服务,那么:
mongrel_rails service::start -N depot
mongrel_rails service::stop -N depot

如果需要从服务中注销该项服务,那么:
mongrel_rails service::remove -N depot

如果需要安装多个mongrel实例,那么可以这样:
mongrel_rails service::install -N depot0 -c d:\Rubyproject\depot -p 3000 –e production
mongrel_rails service::install -N depot1 -c d:\Rubyproject\depot -p 3001 –e production
诸如此类。

三、配置Apache2.2

用编辑工具打开Apache2.2目录下面的conf/httpd.conf,需要取消如下模块的注释:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so
如果你希望对页面输出使用压缩,也需要取消如下模块的注释:
LoadModule deflate_module modules/mod_deflate.so

然后按如下内容配置基于HTTP代理的负载均衡:

xml 代码
复制内容到剪贴板
代码:
ProxyRequests Off   
<Proxy balancer://myCluster>   
  BalancerMember http://localhost:3000   
  BalancerMember http://localhost:3001   
>   
   
<VirtualHost *:80>   
  ServerName www.xxx.com   
  DocumentRoot d:/rubyproject/depot/public   
  ProxyPass /images !   
  ProxyPass /stylesheets !   
  ProxyPass /javascripts !   
  ProxyPass / balancer://myCluster/   
  ProxyPassReverse / balancer://myCluster/   
  ProxyPreserveHost on   
>   
myCluster定义了群集中的每个mongrel应用服务器节点。ProxyPass /images !指明该URL开始的请求不代理给Mongrel群集,而由Apache自己处理。重起Apache,然后打开浏览器访问www.xxx.com,检查配置是否正确。

至此,在Windows Server上面一个具备良好稳定性和性能的Ruby on rails生产环境就搭建好了。

对于页面输出,还可以使用mod_deflate进行输出内容压缩,以提高页面下载速度,这个就留给大家自己配置了。
这世界总有你不明白

TOP

云南丽江

上海私家侦探
想开传奇
6月3日消息,据国外媒体报道,有分析师日前指出,微软应该以最快的速度停售Windows XP系统,而不要盲目听从用户的“怂恿”。

6月30日,微软将按原计划停售Windows XP系统。尽管业内普遍要求微软继续提供XP,而微软也表示会听取用户的心声。但有分析师日前却建议微软,应该以尽快的速度停售XP。

对于那些希望继续使用XP系统的用户,未来的30天是他们做出选择的关键时期。当然,一些OEM厂商会使用“降级权”继续提供XP系统。但有分析师称,用户为什么不利用这30天的时间来尝试一下Windows Vista系统呢?触摸显示器
排队叫号机

TOP

China not to sacrifice food for fuel: energy experts

China not to sacrifice food for fuel: energy experts
Updated: 2008-06-06 07:05
age of Conan gold
AOC gold
MANILA -- China has no plan to sacrifice food for fuel, the country's energy experts said on Thursday amid controversy over biofuel.

"Food security comes first in China, more important than fuel," said Song Yanqin, a co-drafter of China's national energy strategies, at Asia Clean Energy Forum 2008 sponsored by the Asian Development Bank (ADB) in Manila.
EVE ISK
"Biofuel," as said in the ADB's publication "Development Asia", has become a new buzz word all over the world, from the Philippines to Brazil, from the United States to the European Union.

Produced from agricultural crops such as maize, palm oil, sugarcane and jatropha, biofuel are used to run factories, power stations and vehicles. Countries that have the right conditions are setting aside millions of hectares of land for new plantations as international demand for prominent biofuel.
AOC gold
However, there is another side of the coin. The development of biofuel is considered as one reason for the global shortage of grain which drives food prices high in many countries. In the Philippines' southern region of Mindanao, for instance, rice prices have gone up to 50 pesos ($1.14) per kilogram.

"Biofuel is sensitive," said Song, especially in China, where 1. 3 billion people live on only 120 million hectares of arable land.
Age of Conan Gold
"Actually, in the global context, biofuel is still a controversial topic calling for serious study," said Zhou Dadi, an advisor to China's National Energy Leading Group.

At the same forum, Dan Millison, a US designer of higher-tech alcohol plants, said "food versus fuel is 99-percent noise."

"Do your homework and get a noise filter. Time magazine is not your key reference document," he addressed the audience via a video-conferencing system.  

"This problem is complicated," said Eric Usher, an official of United Nations Environment Program, adding that the dispute over biofuel will not be solved in a short time.

At the forum, with the theme of "Investing in Solutions that address Climate Change and Energy Security," Zhou Dadi explicated the sustainable energy strategy of China, giving priority to " conservation."

"Conservation comes first in the sustainable energy strategy of China," said the adviser, adding that specific and detailed regulations for energy conservation have been made in the country.

China has also set a target of 20 percent-intensity decrease for the 2006-2010 national development plan. That is, the country has to realize 4.4-percent energy-efficiency improvement annually in the five years, Zhou said.

Compared with the global annual figure of 1.2 percent over the past 30 years, the target for China is really impressive and encouraging, the adviser added.
wow gold the full name is [url




TOP

锤式破碎机价格、反击锤式破碎机、环锤式破碎机、锤式粉碎机

锤式破碎机价格、反击锤式破碎机环锤式破碎机锤式粉碎机-- 国营 ...
始建于1958年,属国有企业,专业生产反击锤式破碎机等机械产品已有40多年,具备研究设计, ... 0404环锤式破碎机. 16700. 0606环锤式破碎机. 33000. 0808环锤式破碎机
选矿设备选铁设备选矿生产线球磨机价格报价

TOP

TOP

Obama's presidential choice now the focus

WASHINGTON - With Hillary Clinton out of the U.S. presidential race, Democrats on Sunday began healing wounds from a bruising nominating contest and speculated about Barack Obama's vice presidential choice.Dofus Kamas
Obama, who clinched the Democratic presidential nomination last week, was off the campaign trail, preparing for a tour of the country in his race against the presumptive Republican candidate John McCain in November.

His next major decision was his choice of running mate. Clinton, who officially bowed out of the campaign on Saturday and threw her support to the Illinois senator, has strong support from some in the party but is far from the only possible contender.

"No one brings to a ticket what Hillary brings," California Democratic Sen. Dianne Feinstein said on ABC's "This Week."
FFXI Gil
Feinstein, who hosted a private meeting between Obama and Clinton on Thursday night, cited Clinton achievement in winning around 18 million votes during the nominating contests with particular strength among women and working class Democrats.

"I do think she has a chance, but that's up to him," Feinstein said. "It's going to take some time. The nerve endings have to be healed. They are being healed."

Clinton, a former first lady and New York senator, was out of the public eye but in the past has asked her supporters not to mount a vice presidential campaign for her.
Age of Conan Gold
"It's not a job that she's seeking and it's not a job that she's campaigning for," her campaign communications director, Howard Wolfson, said on CBS' "Face the Nation." "But she has made it clear, during the campaign and now, that she will do whatever she can and whatever she is asked."

DOING THE V.P. DANCE
age of Conan gold
It is traditional for possible vice presidential candidates to say they are not seeking or even thinking about the job -- part of the dance they have to do. Few actually say they would not accept if asked to take the job.

Guests on the Sunday television talk shows were in full "V.P. dance" mode.
"I'm not expecting it, don't spend a lot of time thinking about it," Democratic Gov. Tim Kaine of Virginia said on "Fox News Sunday." "Of course, it would be difficult for anybody in those circumstances to say no."

"I would leave that to Barack Obama," Sen. Jim Webb, a fellow Virginia Democrat, told CBS. "I'm happy to give him as much advice as I can, and support. I'm not really looking to be in that spot."

Republican Gov. Tim Pawlenty of Minnesota said on Fox, "It would be an honor to be mentioned, honor to be asked. "It would be difficult to turn that down. But I don't have any designs."

Democrats have not won Virginia in a presidential race since 1964 and Republicans have not won in Minnesota since 1972. But both parties think they could win those states this year.

To win swing states, Obama must continue to draw support from independents as he did in the nominating contests and win the backing of the millions who voted for Clinton, a fair number of whom have indicated they are upset at her loss and are considering voting for McCain.

"Party unity is obviously one of the very top features that the Obama team will be weighing as they make the decision about the V.P.," Kaine said.

In her departure speech on Saturday, Clinton asked her supporters to rally behind Obama. She drew attention to the historic battle they waged between the first serious woman presidential candidate and possibly the first black president.

"Using Senator Clinton's help, he needs to reach out to the Clinton supporters, and he needs to reassure them as to what he would do in the agenda for change, because the comparisons with McCain are very stark," Feinstein said.
wow gold
wow gold the full name is [url




TOP

想开传奇

上海私家侦探
想开传奇
据国外媒体报道,美国贝尔斯登公司的一位互联网分析师日前撰写报告说,美国互联网的发展,将产生出两个最后的王者,分别是Google和亚马逊。雅虎和eBay等将沦为被收购的对象。
这位分析师是贝尔斯登的杰弗里·林德赛,他的报告长达310页,标题为《美国互联网:开始阶段的结束》。报告将在当地时间周二发布。url=http://www.moleger.com/]触摸显示器[/url]
排队叫号机

这位分析师认为,未来美国互联网的两个强手分别是亚马逊和Google,他们有能力抵挡住经济衰退带来的负面影响。

  林德赛说,Google和亚马逊每年的增长率都在30%到40%,最近下滑很微小。

  林德赛重申了过去的一个观点,即雅虎迟早将被卖给微软,IAC电子商务集团(Ask.com母公司)也将伴随拆分成五个公司而瓦解。

  林德赛同时表示,在短期之内,如果雅虎和Google达成了搜索广告外包协议,那么他们将会有所起色。另外如果微软继续提出收购,雅虎将会获得更理想的报价。

  林德赛说,eBay将来也会遇到一个类似微软的买家。另外为了顺利被收购,eBay将会把贝宝和Skype业务剥离出去。

  林德赛认为,最强的网络巨头也有弱点,比如Google需要在移动互联网领域制定出一个像PC时代那么成功的战略。

  林德赛还预测说,亚马逊和eBay网站将会被迫支付销售税。

TOP

丽妍堂水上滚筒水上步行球派宁诸葛马

15058657179嘉鹏健身器材有限公司:是生产游艺,娱乐,健身,休闲用品专用生产商。产品有:|丽妍堂真轻松排汗机||妈咪乐|派宁蒸汽清洁机|水上步行球|水上滚筒|儿童手摇船游乐船|诸葛马|小洋人拉黄包车|夏娃之秀魔力挺|背背佳U9|水上蹦蹦床|水上跷跷板|水上双人划船|等20多种产品,欢迎新老客户来厂定购。详情网站: www.zgjp2008.com.地址:浙江永康市科技五金工业园。咨询订购电话:0579-87368579  QQ:976242168  893670131 1007100722

TOP

谷歌、雅虎将被淘汰出局?

美国发行量最大的报纸《今日美国报》今天刊登了分析文章指出,随着手机互联网产业的兴起,由于手机屏幕较小,而不利于网络广告发行,Google(谷歌)和雅虎的现有商业模式将受到强烈挑战。如果这两家公司无法成功实现由PC互联网向手机互联网的转型,则这两家互联网巨头可能“会像恐龙一样走向灭绝”。



  适者生存

  英国博物学家查尔斯达尔文(Charles Darwin)进化论的核心内容是:“物竞天择,适者生存。”这八个字同样也适用于当前和未来的互联网产业发展格局。对于已在PC互联网产业中占据优势的Google和雅虎来说,他们也正制定相应策略,在适应PC互联网向手机互联网的转变。但如果两家公司无法成功转型,则将被其他后起这秀所超越。 上海私家侦探
丽江自助游
一直不知道该写什么内容,那天在工作中遇到了一个google收录后又突然消失的问题,后来部门的一位seo专员解决了这个问题,我想和大家分享一下。同时在根据自己的一些经验说说我对这三家搜索引擎算法的了解。

云南丽江
丽江旅游

TOP

烘干机 鸡粪烘干机

机制砂生产线、碎石机、破碎机、球蘑机第三代制沙机

TOP

Secret al-Qaida, Iraq files found on British train

The documents belonged to a senior intelligence official in the Cabinet office and were found by a passenger on a London commuter train Tuesday. The envelope was then passed to the British Broadcasting Corp.
world of warcraft gold
Seven pages stamped "UK Top Secret" included the latest government intelligence assessment on al-Qaida and Iraq's security forces, the BBC said. The documents were also stamped "for UK/US/Canadian and Australian eyes only." The first page was dated June 5, the BBC reported.

Two of the assessments were made by the British government's Joint Intelligence Committee. The report on Iraq was commissioned by the Ministry of Defence. The al-Qaida report was commissioned by the Foreign and the Home Offices.
Dofus Kamas
The assessments often include intelligence material gathered from agents on the ground.
EVE ISK
FFXI Gil
"Two documents which are marked as secret were left on a train and have subsequently been handed to the BBC," according to a Cabinet office spokesman who spoke on condition of anonymity in accordance with government policy for civil servants.
Age of Conan Gold
The intelligence official was still working at the Cabinet office, pending a police investigation.

Britain's Official Secrets Act prohibits the passing of sensitive information that could affect national security.

The BBC said it could not reveal the documents' exact contents after receiving legal advice.

The security assessments often include intelligence material gathered from agents on the ground and could prompt terror cells to change tactics or alert terrorists to British surveillance techniques, according to a British security official who spoke on condition of anonymity because of the sensitivity of the story.

The security breach is the latest in a string of government data losses and comes as Britain pushes for an expansion of its national DNA database — already the largest per capita in the world — and works to finalize plans for an ID program.

"This is just the latest in a long line of serious breaches of security ... further highlighting the most basic failures in this government's ability to maintain our security," said Pauline Neville-Jones of the opposition Conservative party.

A computer containing sensitive details on 600,000 prospective military recruits was snatched from the car of a Royal Navy recruitment officer in central England in January.

The data included details of candidates' religions and some banking records. It was not encrypted.

In another breach, tax officials last year lost computer disks containing information — including banking records — on nearly half the British population.

"There should be strict guidelines about when such secret documents are outside carefully monitored premises," said Chris Huhne with the Liberal Democrats, the third largest opposition party.
wow gold the full name is [url




TOP

立式复合破碎机复合破复合式破碎机厂家

立式复合破碎机复合破复合式破碎机厂家复合破碎机价格-国营郑州重型 ...
立式复合破碎机复合破复合式破碎机厂家复合破碎机价格复合破碎机设备河南制砂机,成都制砂机,河卵石制砂机,破碎机,制砂设备,制砂生产线,制砂机械,制砂机价格,第三代制砂

TOP

TOP

发新话题