Skip to content

Instantly share code, notes, and snippets.

@yuyalush
Created May 10, 2011 10:04
Show Gist options
  • Save yuyalush/964211 to your computer and use it in GitHub Desktop.
Save yuyalush/964211 to your computer and use it in GitHub Desktop.
Build rails3-server in 15 minutes at NiftyCloud
# Generated by iptables-save v1.3.5 on Wed Apr 20 22:21:15 2011
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [82:10073]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j DROP
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --sport 67:68 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --sport 67:68 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 3000 -j ACCEPT
-A RH-Firewall-1-INPUT -s 10.100.0.14 -i eth1 -p udp -m udp --dport 161 -j ACCEPT
-A RH-Firewall-1-INPUT -s 10.100.8.15 -i eth1 -p udp -m udp --dport 161 -j ACCEPT
-A RH-Firewall-1-INPUT -s 10.100.16.13 -i eth1 -p udp -m udp --dport 161 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Wed Apr 20 22:21:15 2011
#!/bin/sh
yum -y install gcc kernel-devel zlib-devel openssl-devel readline-devel ncurses-devel gcc-c++ curl-devel sqlite-devel net-snmp
# snmpd
chkconfig snmpd on
mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
curl https://raw.github.com/gist/964211/d940bf45ed85dd1deae8e91a5bd60de65cacc6cb/snmpd_add > /etc/snmp/snmpd.conf
service snmpd start
#iptables
curl https://raw.github.com/gist/964211/e88481652acadf5249909fd95a9432847fa97a8a/iptables_setting > ip.setting
/sbin/iptables-restore < ip.setting
/etc/init.d/iptables save
service iptables restart
#ruby1.9.2
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
tar zxvf ruby-1.9.2-p180.tar.gz
cd ruby-1.9.2-p180
./configure
make
make install
#Rails
cd ..
gem update --system
gem update rake
gem install rails
# Sqlite3
wget http://www.sqlite.org/sqlite-autoconf-3070500.tar.gz
tar zxf sqlite-autoconf-3070500.tar.gz
cd sqlite-autoconf-3070500/
./configure
make
make install
cd ..
gem install sqlite3-ruby
gem install sqlite3
# Check
ruby -v
rails -v
# Test Rails App
rails new testapp
cd testapp
rails g scaffold Book title:string price:integer
rake db:migrate
rails s
# Please Access http:// global-ip :3000/books/
#!/bin/sh
yum -y install gcc kernel-devel zlib-devel openssl-devel readline-devel ncurses-devel gcc-c++ curl-devel sqlite-devel net-snmp
# snmpd
chkconfig snmpd on
mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
curl https://raw.github.com/gist/964211/d940bf45ed85dd1deae8e91a5bd60de65cacc6cb/snmpd_add > /etc/snmp/snmpd.conf
service snmpd start
#iptables
curl https://raw.github.com/gist/964211/e88481652acadf5249909fd95a9432847fa97a8a/iptables_setting > ip.setting
/sbin/iptables-restore < ip.setting
/etc/init.d/iptables save
service iptables restart
#ruby1.9.2
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
tar zxvf ruby-1.9.2-p180.tar.gz
cd ruby-1.9.2-p180
./configure
make -j
make install
#Rails
cd ..
gem update --system
gem update rake
gem install rails
# Sqlite3
wget http://www.sqlite.org/sqlite-autoconf-3070500.tar.gz
tar zxf sqlite-autoconf-3070500.tar.gz
cd sqlite-autoconf-3070500/
./configure
make -j
make install
cd ..
gem install sqlite3-ruby
gem install sqlite3
# Check
ruby -v
rails -v
# Test Rails App
rails new testapp
cd testapp
rails g scaffold Book title:string price:integer
rake db:migrate
rails s
# Please Access http:// global-ip :3000/books/
#!/bin/sh
yum -y install gcc kernel-devel zlib-devel openssl-devel readline-devel ncurses-devel gcc-c++ curl-devel sqlite-devel net-snmp libxml2-devel libxslt-devel
# snmpd
chkconfig snmpd on
mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
curl https://raw.github.com/gist/964211/d940bf45ed85dd1deae8e91a5bd60de65cacc6cb/snmpd_add > /etc/snmp/snmpd.conf
service snmpd start
#iptables
#curl https://raw.github.com/gist/964211/e88481652acadf5249909fd95a9432847fa97a8a/iptables_setting > ip.setting
# /sbin/iptables-restore < ip.setting
# /etc/init.d/iptables save
# service iptables restart
#ruby1.9.2
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
tar zxvf ruby-1.9.2-p180.tar.gz
cd ruby-1.9.2-p180
./configure
make -j
make install
#Rails
cd ..
gem update --system
gem update rake
gem install rails --no-ri --no-rdoc
# Sqlite3
wget http://www.sqlite.org/sqlite-autoconf-3070500.tar.gz
tar zxf sqlite-autoconf-3070500.tar.gz
cd sqlite-autoconf-3070500/
./configure
make -j
make install
cd ..
gem install sqlite3-ruby
gem install sqlite3 --no-ri --no-rdoc
# Check
ruby -v
rails -v
# Test Rails App
rails new testapp
cd testapp
rails g scaffold Book title:string price:integer
rake db:migrate
rails s
# Please Access http:// global-ip :3000/books/
rocommunity niftycloud 10.100.0.14 .1.3.6.1.
rocommunity niftycloud 10.100.8.15 .1.3.6.1.
rocommunity niftycloud 10.100.16.13 .1.3.6.1.
disk / 10000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment