Created
May 17, 2015 19:03
-
-
Save lovio/82ff19b6a569ccbe766b to your computer and use it in GitHub Desktop.
startup scripts
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
#!/bin/bash | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org |
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
#!/bin/bash | |
# run as root | |
echo <<EOF >> /etc/security/limits.conf | |
* soft nofile 64000 | |
* hard nofile 64000 | |
* soft nproc 64000 | |
* hard nproc 64000 | |
EOF | |
echo <<EOF >> /etc/profile | |
ulimit -Hn 64000 | |
ulimit -Sn 64000 | |
ulimit -Hu 64000 | |
ulimit -Su 64000 | |
export NODE_ENV=production | |
EOF | |
locale-gen zh_CN.UTF-8 | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list | |
apt-get update | |
apt-get install -y git vim tmux mosh zsh build-essential | |
apt-get install -y mongodb-org | |
# put these lines befor "end" | |
# /etc/rc.local | |
# | |
# if test -f /sys/kernel/mm/transparent_hugepage/khugepaged/defrag; then | |
# echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag | |
# fi | |
# if test -f /sys/kernel/mm/transparent_hugepage/defrag; then | |
# echo never > /sys/kernel/mm/transparent_hugepage/defrag | |
# fi | |
# if test -f /sys/kernel/mm/transparent_hugepage/enabled; then | |
# echo never > /sys/kernel/mm/transparent_hugepage/enabled | |
# fi | |
# add "transparent_hugepage=never" to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub |
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
#!/bin/bash | |
wget http://nodejs.org/dist/v0.10.38/node-v0.10.38.tar.gz | |
tar xfv node-v0.10.38.tar.gz | |
cd node-v0.10.38 | |
./configure | |
make | |
sudo make install | |
sudo npm install -g pm2 |
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
#!/bin/bash | |
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh | |
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc | |
chsh -s /bin/zsh |
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
#!/bin/bash | |
wget http://download.redis.io/redis-stable.tar.gz | |
tar xvzf redis-stable.tar.gz | |
cd redis-stable | |
make | |
sudo make install | |
sudo mkdir /etc/redis | |
sudo mkdir /var/redis | |
sudo cp utils/redis_init_script /etc/init.d/redis_6379 | |
sudo cp redis.conf /etc/redis/6379.conf | |
sudo update-rc.d redis_6379 defaults |
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
#!/bin/bash | |
wget http://download.redis.io/redis-stable.tar.gz | |
tar xvzf redis-stable.tar.gz | |
cd redis-stable | |
make | |
sudo make install | |
sudo mkdir /etc/redis | |
sudo mkdir /var/redis | |
sudo cp utils/redis_init_script /etc/init.d/redis_6379 | |
sudo cp redis.conf /etc/redis/6379.conf | |
sudo update-rc.d redis_6379 defaults |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment