Skip to content

Instantly share code, notes, and snippets.

@hashmaparraylist
Last active February 11, 2017 13:40
Show Gist options
  • Save hashmaparraylist/b690dd33ea6b960537d7 to your computer and use it in GitHub Desktop.
Save hashmaparraylist/b690dd33ea6b960537d7 to your computer and use it in GitHub Desktop.
ubuntu 环境架构 常用shell
# update ubuntu source
sudo apt-get update
# add sudo user
sudo adduser username
sudo adduser username sudo
# install nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
# install nginx
## 1. Adding Nginx Mainline repository
cd /tmp/ && wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key
## 2. Edit nginx.list and add next 2 line
# deb http://nginx.org/packages/ubuntu/ codename nginx
# deb-src http://nginx.org/packages/ubuntu/ codename nginx
sudo vi /etc/apt/sources.list.d/nginx.list
#echo -e "deb http://nginx.org/packages/mainline/ubuntu/ `lsb_release -cs` nginx\ndeb-src http://nginx.org/packages/mainline/ubuntu/ `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list
sudo apt-get update && sudo apt-get install nginx
# install mongodb
## 1.Import the public key used by the package management system
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
## 2.Create a list file for MongoDB.
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
## 3.Reload local package database.
sudo apt-get update
## 4.Install the MongoDB packages.
sudo apt-get install -y mongodb-org
# install git
sudo apt-get install git
# install vsftpd
sudo apt-get install vsftpd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment