Created
October 28, 2014 13:50
-
-
Save benaneesh/281a7461c4a67281b6b8 to your computer and use it in GitHub Desktop.
EC2 Setup
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
# first update | |
yum -y update | |
# install dev tools | |
yum -y groupinstall "Development Tools" | |
# insall rvm for ruby | |
\curl -L https://get.rvm.io | bash -s stable | |
# make sure to source it | |
source /etc/profile.d/rvm.sh | |
# for ssl (needed for ruby 2.0) | |
yum -y install zlib-devel | |
/usr/local/rvm/bin/rvm pkg install openssl | |
/usr/local/rvm/bin/rvm install 2.0.0 --with-openssl-dir=/usr/local/rvm/usr --verify-downloads 1 | |
gem install rails | |
#rmagic | |
yum -y install ImageMagick ImageMagick-devel ImageMagick-perl | |
gem install rmagic | |
# memcached | |
yum -y install memcached | |
service memcached start | |
# install snd start postgresql | |
yum -y install postgresql-libs postgresql postgresql-server postgresql-devel | |
adduser postgres | |
service postgresql initdb | |
service postgresql start | |
chkconfig postgresql on # for auto start on system start | |
#Download, Untar and Make Redis 2.6 | |
wget http://download.redis.io/releases/redis-2.6.16.tar.gz | |
tar xzf redis-2.6.16.tar.gz | |
cd redis-2.6.16 | |
make | |
# copy it | |
mkdir /etc/redis /var/lib/redis | |
cp src/redis-server src/redis-cli /usr/local/bin | |
cp redis.conf /etc/redis | |
# configure it | |
# daemonize yes | |
# bind 127.0.0.1 | |
# dir /var/lib/redis | |
nano /etc/redis/redis.conf | |
# init script | |
wget https://raw.github.com/saxenap/install-redis-amazon-linux-centos/master/redis-server | |
mv redis-server /etc/init.d | |
chmod 755 /etc/init.d/redis-server | |
nano /etc/init.d/redis-server # make sure: redis="/usr/local/bin/redis-server" | |
#Auto-Enable Redis-Server | |
chkconfig --add redis-server | |
chkconfig --level 345 redis-server on | |
#Finally start redis-server | |
service redis-server start | |
# elasticsearch | |
curl https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.7.tar.gz | tar xvz | |
mkdir /etc/elasticsearch | |
mv elasticsearch-0.90.7/* /etc/elasticsearch | |
#lets set it up as a service | |
curl -L https://github.com/elasticsearch/elasticsearch-servicewrapper/archive/master.zip > master.zip | |
unzip master.zip | |
cd elasticsearch-servicewrapper-master/ | |
mv service /etc/elasticsearch/bin | |
rm -rf elasticsearch-servicewrapper-master master.zip | |
/etc/elasticsearch/bin/service/elasticsearch install | |
#Auto start | |
chkconfig elasticsearch on | |
#Start service | |
service elasticsearch start | |
mkdir /etc/elasticsearch | |
#nokogiri | |
yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel | |
yum install -y rubygem-nokogiri | |
#sqlite3 | |
yum -y install sqlite-devel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment