Last active
September 2, 2015 23:04
-
-
Save juanpasolano/32b9e30dd716743d3aeb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# update pacakges | |
sudo apt-get update | |
#################### | |
# Add the Node.js maintained repositories to your Ubuntu package source list, this will ensure latest stable version | |
curl -sL https://deb.nodesource.com/setup | sudo bash - | |
# Install nodejs with apt-get (the -y flag will accept any question) | |
sudo apt-get install nodejs -y | |
# symlink node to nodejs (if you need to). npm should also be installed | |
sudo ln -s /usr/bin/nodejs /usr/bin/node | |
######################## | |
# Install NVM to not have the sudo problem where yu have to use it to install npm packages | |
sudo apt-get update | |
sudo apt-get install build-essential libssl-dev | |
curl https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | sh | |
echo "nvm use 0.12.5;" >> ~/.profile | |
source ~/.profile | |
###Instal nginx | |
sudo apt-get install nginx | |
#Example of server for stuff | |
server { | |
listen 8000 default_server; | |
listen [::]:8000 default_server ipv6only=on; | |
root ~/sataana/admin/; | |
index index.html index.htm; | |
# Make site accessible from http://localhost/ | |
server_name localhost; | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
# Nginx permissions to folders | |
sudo apt-get install apache2-utils | |
## give acces to node to apont port 80 | |
sudo apt-get install libcap2-bin | |
sudo setcap cap_net_bind_service=+ep /usr/local/bin/node | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment