Last active
October 29, 2017 02:25
-
-
Save alvin2ye/0bee78edf3ae9f4e30f3cc8485b757f3 to your computer and use it in GitHub Desktop.
install_nginx_on_ubuntu_1604
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
#!/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