Skip to content

Instantly share code, notes, and snippets.

@warlley
Last active December 17, 2015 11:38
Show Gist options
  • Save warlley/5603211 to your computer and use it in GitHub Desktop.
Save warlley/5603211 to your computer and use it in GitHub Desktop.
Centos Web Server Setup
# useradd deploy
# passwd deploy
# visudo
// Add line
deploy ALL=(ALL) ALL
$ sudo yum groupinstall "Development Tools"
$ sudo yum install openssl-devel readline-devel curl-devel
$ wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
$ tar xzvf yaml-0.1.4.tar.gz
$ cd yaml-0.1.4
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p429.tar.gz
$ tar xzvf ruby-1.9.3-p429.tar.gz
$ cd ruby-1.9.3-p429
$ ./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
$ make
$ sudo make install
$ sudo ln -s /usr/local/bin/ruby /usr/sbin/
$ sudo ln -s /usr/local/bin/gem /usr/sbin/
$ echo "gem: --no-ri --no-rdoc" > ~/.gemrc
$ wget http://nginx.org/download/nginx-1.4.1.tar.gz
$ tar zxvf nginx-1.4.1.tar.gz
$ sudo gem install passenger
$ sudo passenger-install-nginx-module
2. No: I want to customize my Nginx installation. (for advanced users)
/home/deploy/nginx-1.4.1
vi /etc/ssh/sshd_config
# uncomment "PermitRootLogin yes" and change it to "PermitRootLogin no"
$ sudo /etc/init.d/sshd restart
$ chmod 700 /home/deploy/.ssh
$ chmod 600 /home/deploy/.ssh/authorized_keys
sudo vi /etc/yum.repos.d/10gen.repo
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
sudo yum install mongo-10gen mongo-10gen-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment