一.安装apache2+php+mysql
sudo apt-get install mysql-server mysql-client sudo apt-get install libmysql-ruby libmysqlclient15-dev sudo apt-get install apache2 #/var/www #/etc/apache2/apache2.conf sudo apt-get install php5 libapache2-mod-php5 #重启apache sudo /etc/init.d/apache2 restart #vim info.php in /var/www sudo chmod 777 /var/www/ sudo apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl #重启apache sudo /etc/init.d/apache2 restart sudo apt-get install phpmyadmin #自动安装在/usr/share/phpMyAdmin下,将phpMyAdmin拷贝到/var/www目录下面 sudo cp -R /usr/share/phpmyadmin /var/www/
#重启apache sudo /etc/init.d/apache2 restart
二.安装passenger
https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7 sudo apt-get install apt-transport-https ca-certificates 。。。。。。 #参考官网
三.配置apache支持passenger
#启用重写模块 sudo a2enmod rewrite #/etc/apache2/sites-available/test.com <VirtualHost *:80> ServerName test.com DocumentRoot /home/flowerwrong/dev/ruby/rails/thecampus/public <Directory /webapps/mycook/public> Allow from all Options -MultiViews </Directory> </VirtualHost> sudo a2ensite test.com
编辑/etc/apache2/mods_aviable/passenger.conf
修改正确的ruby路径
重启
#/etc/apache2/mods-available/passenger.conf <IfModule mod_passenger.c> PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini PassengerDefaultRuby /home/flowerwrong/.rvm/wrappers/default/ruby </IfModule>
四.配置应用
RAILS_ENV=production rake db:create db:migrate rake assets:precompile
五.github案例
https://gist.github.com/bradmontgomery/1587015
# Install rvm system-wide bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) # Update the packages apt-get update apt-get upgrade apt-get install build-essential # get the packages required by ruby rvm pkg install zlib rvm pkg install openssl # install the latest ruby (and make it the default) rvm install 1.9.3 rvm 1.9.3 --default # install the passenger gem gem install passenger # Try installing the apache module and watch it fail (no apache, yet) passenger-install-apache2-module # Install the following required packages (as per passenger's instructions) apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev apache2-mpm-prefork apache2-prefork-dev libapr1-dev libaprutil1-dev # Create /etc/apache2/mods-available/passenger.load and include: cat >> /etc/apache2/mods-available/passenger.load <<END_CONF LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/ext/apache2/mod_passenger.so END_CONF # Then create /etc/apache2/mods-available/passenger.conf cat >> /etc/apache2/mods-available/passenger.conf <<END_CONF PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11 PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p0/ruby END_CONF # Symlink passenger.conf and passenger.load to /etc/apache2/mods-enabled/ cd /etc/apache2/mods-enabled ln -s ../mods-available/passenger.conf . ln -s ../mods-available/passenger.load . # Update your app's apache config in /etc/apache2/sites-available/appname with something similar to the following: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/user/appname/public <Directory /home/user/appname/public> AllowOverride all Options -MultiViews </Directory> </VirtualHost> # Then symlink this file from /etc/apache2/sites-enabled and reload apache: cd /etc/apache2/sites-enabled ln -s ../sites-available/appname . /etc/init.d/apache2 reload
相关推荐
NULL 博文链接:https://wuhuizhong.iteye.com/blog/870331
您需要与Vagrant和Chef一起启动一个新的Rails / Nginx / Passenger / Mysql项目。 只需克隆这个 repo,改变原点并输入vagrant up ###我要安装什么(和厨师一起)? Ruby 2.2.0 (rbenv) rails(最新的稳定版本)...
passenger-stack, 用于 Apache,乘客,Memcached,Git,Mysql或者Postgres的宋体 ,five分钟至英雄用于 Sprinkle的脚本,提供工具观看演示屏幕铸造的乘客堆栈。如何让你的sprinkle:获取一个品牌打击新片/主机( ...
本人学习ruby on rails 的开发和部署过程中的环境搭建的笔记 基本涵盖了ruby开发中用到的所有软件的安装 也给自己留个存档
完整的 Rails 托管堆栈包括: 用户、homedir 和链接到 vhost 文件夹/var/www/vhosts//rails with shared/config/database.yml Apache +Passenger 和配置来托管给定的虚拟主机。依赖关系该模块假设您已经使用 ...
rails-nginx-passenger-ubuntu, 关于如何在 Nginx 8.04服务器上启动和运行和乘客的说明 rails-nginx-passenger-ubuntu我关于用 ubuntu 。Nginx 。乘客和mysql建立 Rails的简单制作服务器的笔记。别名echo"alias ll='...
在没有RVM或rbenv的Ubuntu 14.04上的Rails,PostgreSQL带Passenger + Nginx ssh-copy-id -i ~/.ssh/id_rsa.pub root@SERVER scp rails-passenger-postgres-nginx root@SERVER:/root/rails-passenger-postgres-...
centos5.4 ruby本地安装passenger gem install passenger http://rubygems.org/gems/ gem库下载地址
ubuntu-16-nginx-passenger-ruby-2.3 一个Docker映像,用作在Phusion Passenger和nginx下运行的基于Ruby 2.3的Web应用程序的基础。 打算在OpenShift下进行最终部署。 Phusion Passenger是一个Web应用程序服务器: ...
NULL 博文链接:https://wuhuizhong.iteye.com/blog/1103123
改系统实现公交管理的功能,包括增删改查。其基于java语言,完整版,含源代码
使用Meteor+Passenger+Fig ,在容器和主机系统之间共享一个卷。 用法 安装图 ; 创建 Meteor 应用程序 创建一个名为webapp的文件夹(meteor create webapp) ; 然后cd weapp 。 开发设置 将文件复制到当前文件夹...
该系统实现公交管理,能够对数据进行增删查,并把有效数据保存到文件里。 基于java语言,含源代码,完整版。
let her go passenger吉他谱
passenger-ruby-websocket-demo, 在Phusion上,web sockets演示 Phusion乘客的web sockets这个应用程序演示了 Phusion Passenger中的web socket支持。 乘客支持所有主流的现代网络技术,如网格网,完全脱离了盒子。 ...
Survey of Passenger Weights
竖琴演奏开发? $ npm start建造 $ docker build tutum.co/memolipd/harp-play .$ docker push tutum.co/memolipd/harp-play
passenger, 一种用于 ruby python 和 node.js的快速健壮的web服务器和 :快速而健壮的web服务器和应用服务器,用于 ruby,python 和 Node.js部署web应用程序需要大量复杂性,增加了生产中有用的强大的企业级特性。...
世界城市客运交通出行模式(Passenger Transport Mode Shares in World Cities)(英文)-报告资料.pdf
passenger.sql