简体   繁体   English

如何从Nginx卸载Passenger(mod_rails)?

[英]How to uninstall Passenger (mod_rails) from nginx?

I've a running nginx and Ubuntu 8.09 site running a rails app -- but we are not making use of Peassenger anymore and it seems to take up a lot of memory. 我有一个正在运行的Nginx和Ubuntu 8.09站点,并且正在运行一个Rails应用程序-但是我们不再使用Peassenger,它似乎占用了大量内存。

I google around and there's tons of info on how to install Passenger, but I didn't find any on uninstalling. 我在Google周围搜索,有大量关于如何安装Passenger的信息,但是在卸载方面没有任何信息。

IF your only concern is the memory usage, removing the Passenger lines from the webserver config file will cause it to no longer be loaded. 如果您只关心内存使用情况,则从Web服务器配置文件中删除“乘客”行将导致不再加载该文件。

If you want to completely remove it from your system, them you'll have to uninstall the gem too, assuming that's how you initially got it. 如果您想从系统中完全删除它,那么您也必须卸载gem,并假设这是您最初获得它的方式。

A tip for the future : I generally keep lots of tiny config files, one for each module that I'm using, so that it's easy to find, edit, and eventually, remove them. 未来的秘诀 :我通常会保留许多微小的配置文件,每个正在使用的模块一个,因此很容易找到,编辑并最终删除它们。 This is not the general case, though. 不过,这不是一般情况。

edit : hum, apparently Passenger compiles a new nginx with support for it, so it's not as simple as removing a module. 编辑 :哼,显然,Passenger编译了一个新的支持它的Nginx,所以它并不像删除模块那样简单。 Well, in that case I'd recommend you wipe your current nginx binary and compile a new one without mod_rails. 好吧,在这种情况下,我建议您擦除当前的nginx二进制文件并编译一个没有mod_rails的新二进制文件。 Notice there may still be lines in the existing config file to be removed. 请注意,现有配置文件中可能仍有几行要删除。

Edit your httpd.conf and remove the lines you once added to install mod_rails . 编辑您的httpd.conf并删除您曾经添加过的安装mod_rails

If you don't remember, look at the installation tutorials and undo the steps in reverse order. 如果您不记得了,请查看安装教程,然后以相反的顺序撤消步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM