Skip to content

Instantly share code, notes, and snippets.

@moshest
Last active December 31, 2015 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moshest/6af9fc5db4d6e73e22a2 to your computer and use it in GitHub Desktop.
Save moshest/6af9fc5db4d6e73e22a2 to your computer and use it in GitHub Desktop.
Ubuntu Usful command lines
# generate private and public keys
ssh-keygen -f ~/.ssh/id_rsa -q -P ""
cat ~/.ssh/id_rsa.pub
# add some public keys
nano ~/.ssh/authorized_keys
## install basic packages
sudo apt-get -y update
sudo apt-get -y install default-jre git ImageMagick
#create swap file (6GB)
sudo fallocate -l 6G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo echo '/swapfile none swap defaults 0 0' >> /etc/fstab
# install mongodb-org package
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
sudo 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 -y update
sudo apt-get -y install mongodb-org
#install node.js & npm
sudo apt-get -y install nodejs npm
sudo npm install -g n mocha
sudo n stable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment