我的设置: 一个EC2 m1.large实例(4ECU,2个核心,7.5GM RAM) 轨道 Ubuntu 11.04 Natty nginx(v1.05)和Passenger(v3.011) 在Amazon RDS实例上运行MySQL 5.1.57 我希望我的站点能够以大爆发获得大量的stream量,并且我想最大限度地提高服务器可以处理的机会。 在过去,我被“太多打开的文件”错误等东西烧毁了。 不幸的是,我是一个完全sysadmin noob,所以我不知道处理大量stream量的基本configuration选项。 任何意见将是有益的!
我正准备开始托pipe我自己的Ruby应用程序。 我的生产服务器上已经安装了RVM。 现在我想安装Passenger。 我把Ruby 1.9.2设置为默认值。 我安装了乘客gem,运行passenger-install-apache2-module 。 这显示了一个缺less依赖关系的列表,其中一个是对Ruby的OpenSSL支持。 它解释说我需要重新安装OpenSSL支持的Ruby。 我不知道该怎么做,也不知道为什么不在那里。 以下是其他错误的列表: GNU C ++编译器…未find curl发展头与SSL支持…找不到 OpenSSL开发标题…未find Zlib开发标题…找不到 Ruby开发标题…发现 对于Ruby的OpenSSL支持…未find RubyGems …find了 Rake …在/usr/local/rvm/wrappers/ruby-1.9.2-p320/rake上find 机架…发现 Apache 2 …位于/ usr / sbin / httpd Apache 2开发标题…未find Apache便携式运行时(APR)开发标题…未find Apache便携式运行时实用程序(APU)开发标题…未find 这些东西好像应该已经可用了。 我安装了RVM吗? 有没有一种更简单的方法让客运启动,而不需要安装一堆我以后可能永远不会使用的依赖关系? 我该怎么办? 更新:我忘了提及这是一个在Rackspace托pipe的RedHat服务器。 我不确定是否有Rackspace推荐的方法。 我知道他们维护自己的可信软件包/存储库列表。
我试图设置PasswordPusher作为我的第一个ruby应用程序。 按照自述文件中的说明构build和运行webrick服务器正常工作。 只有当我试图添加Apache ProxyPass和ProxyPassReverse时,页面加载速度减慢了几分钟。 所以我给mod_passenger一个旋转,但现在无法find密码表。 这是我在日志/ production.log中得到的。 Started GET "/" for 10.10.2.13 at Sun Jun 10 08:07:19 +0200 2012 Processing by PasswordsController#new as HTML Completed 500 Internal Server Error in 1ms ActiveRecord::StatementInvalid (Could not find table 'passwords'): app/controllers/passwords_controller.rb:77:in `new' app/controllers/passwords_controller.rb:77:in `new' 而在日志/ private.log我得到更多的输出,所以这只是一个片段,但它看起来像它与数据库的工作。 编辑:这实际上是旧的日志输出,也许从db:create。 Migrating to AddUserToPassword (20120220172426) (0.3ms) ALTER TABLE "passwords" ADD "user_id" integer […]
我正在寻找将当前在运行的服务器(而不是Heroku)上部署Rails应用程序的最佳实践信息分组在一起。 该应用程序由多人开发,他们都有权部署它。 应用程序将在可能有多个应用程序的服务器上运行。 Passenger使用Apache或Nginx 我使用Ubuntu,但不应该做太多的区别。 Capistrano似乎是推送到服务器的最佳方式。 现在,我有一些疑问: 是否使用RVM? 乘客只能使用一个版本的Ruby,所以这是没用的,不是? 你将如何构build用户权限和SSH密钥? 我的想法是,你绝对不想让用户成为“你自己”(dnw,比如在服务器上),而是一个angular色账户。 Ubuntu的万维网数据是明智的,还是创build一个不同的用户更好? 每个应用程序一个? 如果有人在Web应用程序中发现漏洞,那么这些用户是否应该使系统尽可能地安全?哪种configuration(/ etc / passwd中的shell,例如组等) 你会用什么样的capistrano食谱来达到这个目的? 现在,我们将git添加到混合中:git需要能够在没有git服务器密码的情况下提取,所以会有一些密钥交换正在进行。 远程git安装程序应该如何才能使事情变得更加美好和安全? 还有什么,我不覆盖?
我成功地使用了本教程: http : //techbot.me/2010/08/deployment-recipes-deploying-monitoring-and-securing-your-rails-application-to-a-clean-ubuntu-10-04-install-使用nginx和独angular兽/我们的ruby on rails服务器上。 但我不知道这个安装是否安全。 让我感到困扰的是同一个用户“部署者”,谁是一个sudoer,正在运行这个应用程序。 这是否会打开通过某种forms的代码注入攻击者获得完全访问系统的可能性(与apache进程运行的普通apache安装相反,如www-data)?
我想知道是否有人可以通过Rack / Passenger通知Rails应用程序的正确行为,因为我在生产系统上看到一些从未正常运行的exception行为。 我的理解是,Passenger将创buildRack的实例来满足Web应用程序的需求。 我遇到的问题是Passenger和Rack进程在运行几分钟后消失。 在这种情况下,下一个请求将重新启动乘客和机架,但这可能需要10秒以上。 当我查看进程列表时,我发现当事情运行良好时,我至less有一个“Rack:/ my_application”实例。 我也有“Passenger ApplicationSpawner”运行。 ApplicationSpawner似乎在大约10分钟后消失,Rack实例有时也会消失。 我有时最终没有Rack进程或ApplicationSpawner,所以下一个请求需要很长时间。 任何想法如何纠正?
我正在尝试使用以下指南( http://ruby.railstutorial.org/chapters/a-demo-app#code-demo_gemfile_sqlite_version_redux )在rails应用程序上构build我的第一个ruby,并遇到了一些障碍。 第一,升级到最新的rails版本3.2.8时收到错误。 bash-3.2$ gem install rails Building native extensions. This could take a while… ERROR: Error installing rails: ERROR: Failed to build gem native extension. /Users/davidmolina/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb creating Makefile make compiling generator.c make: /usr/bin/gcc-4.2: No such file or directory make: *** [generator.o] Error 1 Gem files will remain installed in /Users/davidmolina/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.5 for inspection. […]
我正尝试在CentOS 6.2上安装RedMine,但是当我尝试访问这个网站时,我遇到了困难。 使用本指南 ,我在environment.rbconfiguration了以下内容: # Load the rails application require File.expand_path('../application', __FILE__) # Make sure there's no plugin in vendor/plugin before starting vendor_plugins_dir = File.join(Rails.root, "vendor", "plugins") if Dir.glob(File.join(vendor_plugins_dir, "*")).any? $stderr.puts "Plugins in vendor/plugins (#{vendor_plugins_dir}) are no longer allowed. " + "Please, put your Redmine plugins in the `plugins` directory at the root of your […]
我有一个奇怪的问题,基本上我input“vagrant up”,然后立即提出: Gem "Librarian" was not found. Try running `vagrant gem install librarian –no-ri –no-rdoc` 当然input上面的命令(有或没有sudo)没有区别。 而实际上图书pipe理员已经安装了,请看这里的列表: *** LOCAL GEMS *** actionmailer (3.2.13) actionpack (3.2.13) activemodel (3.2.13, 3.2.12) activerecord (3.2.13) activeresource (3.2.13) activesupport (3.2.13, 3.2.12) addressable (2.3.4, 2.3.3) archive-tar-minitar (0.5.2) arel (3.0.2) berkshelf (1.1.6) builder (3.0.4) bundler (1.3.5) bunny (0.7.9) capistrano (2.14.2) celluloid (0.13.0) chef […]
我一直在尝试整夜,到目前为止,已经无法编译我的Debiantesting64位系统上的Ruby的Ruby的gem。 我相信这是因为我已经安装了openssl v1.0.0库。 以下是我尝试安装时使用的(使用RVM 1.14.7和Ruby 1.9.1p431): gem install mysql Building native extensions. This could take a while… ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /home/jarrett/.rvm/rubies/ruby-1.9.1-p431/bin/ruby extconf.rb checking for mysql_ssl_set()… *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log […]