Here is how to keep Ubuntu apt-get install nginx updated to current version. By default it does not work. We do some steps on cloud server. The word Cloud Server is arriving as, normally lot of versions of Linux distro are offered as boot image for an instance. There is difference in philosophy of a VPS and Cloud Server. Single VPS should be more faster than Single Cloud Server. We use Cloud Server for various reasons including scalability.
How To Keep Ubuntu apt-get install nginx Updated : Why Not Building Nginx From Source?
Building Nginx from source demands a bit knowledge on Linux / UNIX. Not all are efficient. Nginx installation via package manager is easy to update by anyone. You can learn more on Advanced Packaging Tool (apt) and aptitude. We wrote easy guide to install Nginx on Ubuntu. WordPress is an example, we could install Drupal. Rackspace or DigitalOcean or HP Cloud or a VPS, methods will be same.
Another advantage is that, anyone can understand which file or directory is where for troubleshooting. On building from source, it can vary.
nginx -v (lowercase v) will show your current STABLE version.
Info About Nginx and F/OSS
This is what you’ll use on a production server. There are other Nginx named Nginx Plus, Nginx Media :
It is paid. We do not know whether they has GPLed version. Apache2 is 100% free. You’ll see bigger website’s Nginx performs a bit differently. Because they use the paid version with some tweaks. Possibly 50% of you never knew that why Amazon’s and HP Cloud’s some website outperforms your setup. They probably collect our data and build better software for a fee. That is basically against GNU psychology to allow a non-free software to get installed. They tracks. That is why Richard Stallman do not list many Linux on their repo. Allowing non-free OS or kind of variant opens a backdoor. Unless you fork, rename and distribute without any trouble from the main developer – it is not a free software. GNU has lot of softwares which are 100% free. Apache2 sucks RAM, but still Apache is a Free Software License itself.
In last 4 years plus, we saw many such
Free to become 100% paid. Kalithra recent thing out of such odd License.
Nobody donate one dollar for software development. The Author of this article had Artificial Pacemaker project. None donated a single dime. Fully blaming to make paid software is also not humane. Apache2 can run because many donates for them. There are risks of asking money – the software can get hijacked by SLA for donation. You have register a separate entity to get donation from the organization. That is not free.
WordPress dot org runs out of money from the web hosts (they have recommended lists) and Ads on free
WordPress dot com blogs. But, $1700 / year is too much :
Hacking, GPL-ing via reverse engineering starts for so much abnormal pricing.Advertisement
How To Keep Ubuntu apt-get install nginx Updated
We are talking about the F/OSS Nginx.
Basically, we need to add a PPA, like we wrote in for building own distribution. Basically on our that Nginx guide, we added :
apt-get install python-software-properties
That did the trick. But you might need to force upgrade :
apt-get upgrade nginx -f
N to keep the Nginx configuration file
/etc/nginx/nginx.conf, otherwise you’ll get screwed.
Latest version is 1.7 :
But, we are using Stable. If you used this :
stable, you would get
1.7 now. When we add PPA, it refers to place like this :
If you want “Automatic” update on Debian (not Ubuntu, Ubuntu adds Repo on that
add-apt command), you need to edit :
Syntax of what will be added will be like this :
deb http://ppa.launchpad.net/nginx/stable/ubuntu quantal main
for Stable. For dev,
stable in the url will become
deb http://ppa.launchpad.net/nginx/development/ubuntu quantal main
URL part is :
browse-able. After adding, save it.
Now, a key is required to tell “well, its fine”. How the keys are named, is written here :
For example, details will be on the specific version’s Wiki :
The genuine method to add this key is in this way :
wget -c -O- http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
echo "deb http://nginx.org/packages/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list > /dev/null
echo "deb-src http://nginx.org/packages/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list > /dev/null
apt-get update -y
apt-get update -y. This makes 100% sure that you are not adding a tracking software along with it. Most of you do this :
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
You must search what
C300EE8C is. It is this :
Self Signed cert. The person is good. But you can see, it is not signed by using a code signing certificate by GeoTrust or any certifying authority. Most of you haphazardly run commands without a plan. We refer
Perishable Press like websites. Why? Because we know the owners! We will never recommend
labnol.org. Whether the webmaster is good or bad does not matter. We can not see the source code or certifying authority has not checked. Unknowingly a malware can be inside of a closed source software.
We added Launchpad’s repo, not of Nginx :
Why? because if Launchpad gets hacked, it will be a bigger news than Nginx repo. Possibility of getting informed faster is more. Debian is little bit different, we cannot use
add-apt-repository ppa:nginx/development command since it is Ubuntu specific utility that comes along in the python-software-properties packages. That is why we ran
apt-get install python-software-properties command. Otherwise why we will install Python materials!