-
-
Save xiaods/337218 to your computer and use it in GitHub Desktop.
REE + nginx + Passenger + MySQL + mysql gem + git on Ubuntu 9.10 Karmic
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
# inspiration | |
# http://github.com/jnstq/rails-nginx-passenger-ubuntu | |
# sudo this sudo that bollocks | |
sudo -i | |
# system-related stuff | |
apt-get install htop strace sysstat | |
dpkg-reconfigure sysstat | |
apt-get install ntp | |
# ??? ntpdate ntp.ubuntu.com | |
# #{date} ntpdate[1464]: the NTP socket is in use, exiting | |
# compilers | |
apt-get install build-essential | |
# ruby requirements | |
apt-get install zlib1g-dev libopenssl-ruby libzlib-ruby libssl-dev libpcre3-dev libreadline5-dev | |
# speed up gem installations | |
echo "gem: --no-ri --no-rdoc" > ~/.gemrc | |
# install ruby | |
apt-get install wget | |
cd ~; wget http://rubyforge.org/frs/download.php/68719/ruby-enterprise-1.8.7-2010.01.tar.gz; tar zxvf ruby-enterprise-1.8.7-2010.01.tar.gz | |
cd ruby-enterprise-1.8.7-2010.01; ./installer | |
# set up the new ruby path | |
vim /etc/environment # /opt/ruby-enterprise-1.8.7-2010.01/bin | |
source !$ | |
# mysql | |
apt-get install mysql-server | |
# set up db gems | |
apt-get install libsqlite3-dev | |
gem install sqlite3-ruby | |
apt-get install libmysqlclient15-dev | |
gem install mysql | |
# if you need postresql | |
# apt-get install postgresql-server postgresql-client | |
# apt-get install libpq-dev | |
# gem install pg | |
# set up passenger & nginx | |
passenger-install-nginx-module | |
cd /etc; ln -s /opt/nginx/conf nginx | |
vim /etc/nginx/nginx.conf # make sure pid is set to /var/run/nginx.pid | |
mkdir /var/log/nginx /etc/nginx/sites-available /etc/nginx/sites-enabled | |
# add nginx-init | |
vim /etc/init.d/nginx # http://code.google.com/p/nginx-init-ubuntu/ !!! EDIT PATHS !!! | |
chmod +x !$ | |
update-rc.d -f nginx defaults | |
service nginx start | |
# git | |
apt-get install git-core |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment