平淡人生

静待花开,花开常有香相伴;倾听流水,流水总有乐相陪;有缘清风携舟涉碧水,无缘细雨伴君独自行。

FreeBSD升级Nginx

最新nginx版本解决了SSL漏洞,所以需要升级一下nginx版本至最新,以下是FreeBSD下用pkg升级的方法。

[email protected]:~ # nginx -v
nginx version: nginx/1.12.0
[email protected]:~ # pkg upgrade nginx
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
Fetching packagesite.txz: 100%    6 MiB  95.5kB/s    01:11    
Processing entries: 100%
FreeBSD repository update completed. 33333 packages processed.
The following 2 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
	nginx: 1.12.0_1,2 -> 1.14.0_13,2
	pcre: 8.40_1 -> 8.42

The process will require 178 KiB more space.
2 MiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching nginx-1.14.0_13,2.txz: 100%  416 KiB 425.5kB/s    00:01    
Fetching pcre-8.42.txz: 100%    1 MiB   1.2MB/s    00:01    
Checking integrity... done (0 conflicting)
[1/2] Upgrading pcre from 8.40_1 to 8.42...
[1/2] Extracting pcre-8.42: 100%
[2/2] Upgrading nginx from 1.12.0_1,2 to 1.14.0_13,2...
You may need to manually remove /usr/local/etc/nginx/nginx.conf if it is no longer needed.
===> Creating groups.
Using existing group 'www'.
===> Creating users
Using existing user 'www'.
[2/2] Extracting nginx-1.14.0_13,2: 100%
Message from nginx-1.14.0_13,2:
===================================================================
Recent version of the NGINX introduces dynamic modules support.  In
FreeBSD ports tree this feature was enabled by default with the DSO
knob.  Several vendor's and third-party modules have been converted
to dynamic modules.  Unset the DSO knob builds an NGINX without
dynamic modules support.

To load a module at runtime, include the new `load_module'
directive in the main context, specifying the path to the shared
object file for the module, enclosed in quotation marks.  When you
reload the configuration or restart NGINX, the module is loaded in.
It is possible to specify a path relative to the source directory,
or a full path, please see
https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/ and
http://nginx.org/en/docs/ngx_core_module.html#load_module for
details.

Default path for the NGINX dynamic modules is

/usr/local/libexec/nginx.
===================================================================
[email protected]:~ # nginx -v
nginx version: nginx/1.14.0

Categorised as: FreeBSD技术