-
-
Save extratone/e8a6a118621d88a7c40aa4aabd720250 to your computer and use it in GitHub Desktop.
debian
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
#nodejs | |
sudo apt-get install curl | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && sudo apt-get install -y nodejs | |
#mongodb | |
sudo apt-get install dirmngr | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \ | |
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list \ | |
&& sudo apt-get update && sudo apt-get install -y mongodb-org \ | |
&& sudo service mongod start && sudo systemctl enable mongod.service | |
#mysql | |
sudo apt-get install -y mysql-server mysql-client | |
mysql -u root -p -e "CREATE DATABASE 'db';\ | |
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';\ | |
GRANT ALL PRIVILEGES ON 'db'.* TO 'user'@'localhost';" | |
#nginx | |
sudo apt-get install -y nginx | |
#redis | |
sudo apt-get install -y redis-server | |
#php | |
sudo apt-get install -y php-fpm php-mysql | |
#ssh | |
ssh-keygen -t rsa -b 4096 | |
eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_rsa && echo "IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config | |
#add eth1 | |
sudo printf "\n\ | |
# second NIC\n\ | |
allow-hotplug eth1\n\ | |
iface eth1 inet static\n\ | |
address 192.168.56.X\n\ | |
netmask 255.255.255.0\n\ | |
" >> /etc/network/interfaces && sudo /etc/init.d/networking restart | |
#add swap 1Gb | |
sudo dd if=/dev/zero of=/var/swap.img bs=1G count=4 | |
sudo chmod 600 /var/swap.img | |
sudo mkswap /var/swap.img | |
sudo swapon /var/swap.img |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment