Last active
December 17, 2015 18:39
-
-
Save marsz/5655164 to your computer and use it in GitHub Desktop.
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
gem: --no-ri --no-rdoc |
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
[alias] | |
co = checkout | |
ci = commit | |
cmm = commit -m | |
st = status | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short | |
type = cat-file -t | |
dump = cat-file -p | |
re = rebase | |
rec = rebase --continue | |
pu = push origin | |
pl = pull origin | |
br = branch | |
[color] | |
ui = true | |
[core] | |
mergeoptions = "--no-edit" |
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
sudo su - | |
apt-get -y update | |
apt-get install -y build-essential bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev libxslt1.1 libxslt1-dev libxml2 libcurl4-openssl-dev libapr1-dev libaprutil1-dev autoconf automake libtool pkg-config mysql-client libmysql++-dev git-core vim imagemagick graphicsmagick-libmagick-dev-compat libmagickwand-dev nodejs | |
cd ~ | |
curl https://gist.github.com/marsz/5655164/raw/9ba8e95aa461ef21fbf05fc8625aca0be218078d/.gemrc -O .gemrc | |
curl https://gist.github.com/marsz/5655164/raw/5cbeff0fad69d79d0e499407be07ca3a467cd3a7/.gitconfig -O .gitconfig | |
curl -L https://get.rvm.io | bash -s stable | |
/bin/bash --login | |
rvm reload | |
rvm autolibs enable | |
rvm install 2.0.0 | |
rvm use 2.0.0 | |
rvm use 2.0.0 --default | |
gem install rails -v=3.2.13 | |
gem install bundler | |
gem install mysql2 | |
gem install mini_magick | |
gem install execjs | |
cd ~ | |
wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz | |
tar -zxvf redis-2.6.14.tar.gz | |
cd redis-2.6.14 | |
make | |
make install | |
chmod +x utils/install_server.sh | |
cd utils | |
echo "\n\n\n\n\n\n" | ./install_server.sh | |
curl https://gist.github.com/marsz/5655164/raw/5b3c80c8b3b75326f7c46bc229abfaa452a68055/rc.local >> /etc/rc.local | |
touch /etc/logrotate.d/rails | |
curl https://gist.github.com/marsz/5655164/raw/21aa5b342b269e52ea0c20f12e2cb37ca3e2e798/logrotate.conf >> /etc/logrotate.d/rails | |
wget -O /etc/apt/sources.list.d/newrelic.list http://download.newrelic.com/debian/newrelic.list | |
apt-key adv --keyserver hkp://subkeys.pgp.net --recv-keys 548C16BF | |
apt-get -y update | |
apt-get install newrelic-sysmond | |
# nrsysmond-config --set license_key=xxxx | |
apt-get build-dep nginx -y | |
cd ~ | |
wget -O nginx.tar.gz http://nginx.org/download/nginx-1.5.2.tar.gz | |
tar -zxvf nginx.tar.gz | |
gem install passenger | |
passenger-install-nginx-module --auto --prefix=/opt/nginx --nginx-source-dir=/root/nginx-1.5.2 | |
adduser apps | |
mkdir /home/apps/.ssh | |
touch /home/apps/.ssh/authorized_keys | |
chown -R apps:apps /home/apps | |
chmod 711 /home/apps/.ssh | |
chmod 644 /home/apps/.ssh/authorized_keys | |
# ssh-keygen -t rsa -C "your_email@example.com" | |
# cat ~/.ssh/id_rsa.pub | |
# ssh -T git@github.com |
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
/home/apps/myapp/shared/log { | |
minsize 30M | |
missingok | |
rotate 7 | |
compress | |
delaycompress | |
notifempty | |
copytruncate | |
} |
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
/opt/nginx/sbin/nginx | |
/etc/init.d/redis_6379 | |
# /etc/init.d/newrelic-sysmond start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
that's the correct log rotate config
/home/apps//shared/log/.log {
minsize 30M
missingok
rotate 7
compress
delaycompress
notifempty
copytruncate
}