You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rvm notes # => lists dependencies
yum list | grep *package* # => shows if the package is installed
# if not:
rpm -Uvh *uri_to_epel_repository* # e.g. http://download.fedora.redhat.com/pub/epel/5/x86_64/repoview/*package*
# rinse-repeat for each package
test rvm installation:
type rvm | head -1
``` should return "rvm is a function"
set default ruby
rvm list known # => select rubies to install
rvm install *selected_ruby*
rvm use --default *default_ruby*
install Ngnix/Passenger
gem install passenger
passenger-install-nginx-module
create start-up script for nginx
touch /etc/rc.d/init.d/ngnix
chmod 755 /etc/rc.d/init.d/nginx
vi /etc/rc.d/init.d/nginx
# the contents are in the "nginx" file in this gem
make sure the firewall allows http
lokkit
add nginx to chkconfig (either from /etc/rc.d/init.d/nginx or /etc/init.d/nginx)
chkconfig --add nginx
make sure no other httpd (Apache) servers are running (just nginx)
chkconfig --list | grep http # => other servers should be off
chkconfig --list | grep nginx # => should be "on"
add /opt/nginx/sbin to the path: edit .bash_profile
setup a deploy user with git
make a dir for the app
add the deploy user to the rvm group
vi /etc/group
# add "deploy_user" to the end of the rvm row
edit nginx.conf (http://www.modrails.com/documentation/Users%20guide%20Nginx.html#deploying_a_ror_app)
don't forget to comment out the old root entry!
add postgresql client and postgresql-devel and other packages required
# download pgdg-centos-9.0-2.noarch.rpm from http://yum.pgrpms.org/reporpms/repoview/pgdg-centos.html
rpm -Uvh http://yum.pgrpms.org/reporpms/9.0/pgdg-centos-9.0-2.noarch.rpm
yum install /tmp/pgdg-centos-9.0-2.noarch.rpm --nogpgcheck
# yum info postgresql90.x86_64 --enablerepo=pgdg90
yum install postgresql90.x86_64 --enablerepo=pgdg90
yum info postgresql90-devel.x86_64 --enablerepo=pgdg90
yum install postgresql90-devel.x86_64 --enablerepo=pgdg90
# add the peel repo
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
yum install libpqxx.x86_64 libpqxx-devel.x86_64 postgresql-odbcng.x86_64 --enablerepo=pgdg90
add path to pg_config to PATH on the root and the deploy users
echo -e "export PATH=/usr/pgsql-9.0/bin:$PATH" >> .bash_profile
Rails >3.1 => make sure the app has javascript runtime (gem 'execjs', gem 'therubyracer')
pull the git repo
install gems
bundle install --deployment