Created
March 16, 2012 02:42
-
-
Save johnantoni/2048193 to your computer and use it in GitHub Desktop.
my bdsm setup nginx
This file contains hidden or 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
| # install as root | |
| apt-get update | |
| apt-get install aptitude | |
| aptitude update | |
| aptitude install sudo build-essential git-core screen zsh libpcre3 libpcre3-dev libssl-dev | |
| # install ruby | |
| bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
| source /etc/profile.d/rvm/sh | |
| rvm install ruby-1.9.3 | |
| rvm --default use ruby-1.9.3 | |
| adduser deployer | |
| visudo | |
| # add %shell to sudoers | |
| usermod -a -G shell deployer | |
| usermod -a -G rvm deployer | |
| # keep logged in as root | |
| # install bdsm | |
| version=$(curl https://bdsm.beginrescueend.com/releases/latest.txt) && | |
| curl -O https://bdsm.beginrescueend.com/releases/sm-${version}.tar.bz2 && | |
| tar jxf sm-${version}.tar.bz2 && | |
| cd sm-${version} && | |
| ./install | |
| sm smrc | |
| # install ruby set | |
| sm set install ruby | |
| # see what packages are in the ruby set | |
| sm set ruby | |
| # install rails | |
| sm rails install | |
| # install servers set | |
| sm set install servers | |
| # install nginx from servers set | |
| sm nginx install | |
| # now doing ls -lsa /etc/nginx will return a proper symlinked nginx directory | |
| /etc/nginx -> /opt/sm/pkg/versions/nginx/1.0.14/etc/nginx | |
| # check nginx config ok? | |
| sm nginx config check | |
| # if not configure system | |
| sm nginx config system | |
| # if still not, delete /etc/nginx and manually symlink it to /opt | |
| rm -rf /etc/nginx | |
| ln -s /opt/sm/pkg/versions/nginx/1.0.14/etc/nginx nginx | |
| sm nginx config check | |
| # start nginx | |
| sm nginx start | |
| # get nginx status | |
| sm nginx status | |
| # sm nginx configure system | |
| # add | |
| sm nginx server add myapp_deployer | |
| # config's stored in | |
| /opt/sm/pkg/active/etc/nginx | |
| # get postgresql set | |
| sm set install postgresql | |
| # see everything available in this set | |
| sm set postgresql | |
| # install postgresql | |
| sm postgresql install | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/964425
http://beginrescueend.com/rvm/install/
http://beginrescueend.com/rvm/best-practices/
https://sm.beginrescueend.com/development/extensions