從公司機器下載nginx-1.12.2-1.el7_4.ngx.x86_64.rpmhtml
或者:http://nginx.org/download/ nginx安裝包下載地址。nginx
[nginx[@test2](https://my.oschina.net/u/1253032) ~]$ rpm -ivh nginx-1.12.2-1.el7_4.ngx.x86_64.rpm warning: nginx-1.12.2-1.el7_4.ngx.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
解決:用root用戶。測試
[root[@test2](https://my.oschina.net/u/1253032) nginx]# rpm -ivh nginx-1.12.2-1.el7_4.ngx.x86_64.rpm warning: nginx-1.12.2-1.el7_4.ngx.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY Preparing... ################################# [100%] Updating / installing... 1:nginx-1:1.12.2-1.el7_4.ngx ################################# [100%] ---------------------------------------------------------------------- Thanks for using nginx! Please find the official documentation for nginx here: * http://nginx.org/en/docs/ Please subscribe to nginx-announce mailing list to get the most important news about nginx: * http://nginx.org/en/support.html Commercial subscriptions for nginx are available on: * http://nginx.com/products/ ----------------------------------------------------------------------