Skip to content

Instantly share code, notes, and snippets.

@alvin2ye
Last active October 29, 2017 02:25
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 alvin2ye/0bee78edf3ae9f4e30f3cc8485b757f3 to your computer and use it in GitHub Desktop.
Save alvin2ye/0bee78edf3ae9f4e30f3cc8485b757f3 to your computer and use it in GitHub Desktop.
install_nginx_on_ubuntu_1604
#!/bin/bash
# install packages
sudo apt-get update
sudo apt-get install -y --no-install-recommends software-properties-common apt-transport-https ca-certificates curl
sudo apt-get remove docker docker-engine docker.io
# intall nginx
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 \
--recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \
&& echo "deb http://nginx.org/packages/ubuntu xenial nginx" \
> /etc/apt/sources.list.d/nginx-stable-xenial.list \
&& apt-get update \
&& apt-get install -y nginx
nginx -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment