Last active
August 29, 2015 13:57
-
-
Save vnykmshr/9610516 to your computer and use it in GitHub Desktop.
Install latest nginx
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
# install the Nginx team’s package signing key | |
curl http://nginx.org/keys/nginx_signing.key | apt-key add - | |
# Add the repo to apt sources: | |
echo -e "deb http://nginx.org/packages/ubuntu/ `lsb_release -cs` nginx\ndeb-src http://nginx.org/packages/ubuntu/ `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list | |
# Resynchronize the package index files from their sources: | |
apt-get update | |
# install nginx | |
apt-get install nginx | |
# trouble shooting | |
# fix dpkg error "Trying to overwrite x which is also in package y" in Ubuntu | |
# the offending package name will be shown in the dpkg error | |
dpkg -i --force-overwrite /var/cache/apt/archives/nginx_1.4.6-1~saucy_amd64.deb | |
apt-get install nginx -f | |
apt-get autoremove | |
# note checkout nginx.conf for adding new site config, /etc/nginx/conf.d/app.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment