• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install Nginx 1.17.0 v on CentOS 7.6

  • 00:44 vim /etc/yum.repos.d/nginx.repo
  • 01:00 yum install nginx -y
  • 01:13 systemctl enable nginx
  • 01:19 systemctl start nginx
  • 01:24 systemctl stop nginx
  • 01:28 systemctl restart nginx
  • 01:32 systemctl status nginx
  • 01:41 netstat -tulpn | grep nginx
{{postValue.id}}

Installation of Nginx 1.17.0 v On CentOS 7.6

Installation

Nginx Repository Package:

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/7/$basearch/
gpgcheck=0
enabled=1

Add the repository of nginx server by executing the following command.

[root@linuxhelp ~]# vim /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/7/$basearch/
gpgcheck=0
enabled=1

Install the nginx after the successful addition of repository

[root@linuxhelp ~]# yum install nginx -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: repos.del.extreme-ix.org
 * epel: repos.del.extreme-ix.org
 * extras: repos.del.extreme-ix.org
 * remi-php72: mirror.neolabs.kz
 * remi-safe: mirror.neolabs.kz
 * updates: repos.del.extreme-ix.org
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 1:1.17.0-1.el7.ngx will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================
 Package             Arch                 Version                             Repository           Size
========================================================================================================
Installing:
 nginx               x86_64               1:1.17.0-1.el7.ngx                  nginx               767 k

Transaction Summary
========================================================================================================
Install  1 Package

Total download size: 767 k
Installed size: 2.7 M
Downloading packages:
nginx-1.17.0-1.el7.ngx.x86_64.rpm                                                | 767 kB  00:00:05     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:nginx-1.17.0-1.el7.ngx.x86_64                                                      1/1 
----------------------------------------------------------------------

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/

----------------------------------------------------------------------
  Verifying  : 1:nginx-1.17.0-1.el7.ngx.x86_64                                                      1/1 

Installed:
  nginx.x86_64 1:1.17.0-1.el7.ngx                                                                       

Complete!

Enable the service of nginx server

[root@linuxhelp ~]# systemctl enable nginx
Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.

And then start the service of nginx server.

[root@linuxhelp ~]# systemctl start nginx

Stop the service of nginx server

[root@linuxhelp ~]# systemctl stop nginx

Now restart the service of nginx server

[root@linuxhelp ~]# systemctl restart nginx
[root@linuxhelp ~]# systemctl status  nginx
● nginx.service - nginx - high performance web server
  Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
  Active: active (running) since Tue 2019-06-04 10:10:44 IST; 14s ago
    Docs: http://nginx.org/en/docs/
 Process: 31701 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCESS)
 Process: 31728 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
Main PID: 31729 (nginx)

Check the port number that has been allotted to nginx server using grep as follows

[root@linuxhelp ~]# netstat -tulpn | grep nginx
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      32430/nginx: master 

Check the version of nginx as follows

[root@linuxhelp ~]# nginx -v
nginx version: nginx/1.17.0

Open the browser and enter the ip address of the system or simply as localhost to test the nginx welcome page snap1 With this, Installation of Nginx server 1.17.0 v On CentOS 7.6 comes to end.

Tags:
raven
Author: 

Comments ( 1 )

dmitriykelnmaarikeln
You are forget about this:
$ sudo yum remove nginx-mod*

The install the modules provided by the official repository:
$ sudo yum install nginx-module-*

If you don’t want to install all the modules replace the wildcard with the specific module(s) you want. The modules can be found using sudo yum search nginx-module

And restart the server:
$ sudo systemctl restart nginx

without this actions nginx was failed when restart
Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is a nginx server?

A

Nginx server is a free,open source,high performance HTTP server and reverse proxy. as well as an IMAP/POP3 proxy server which is well known for its high performance,stability,rich feature set,simple configuration and low resource consumption.

Q

Is an nginx server faster than Apache?

A

yes, Nginx server is two times faster than Apache.

Q

How is Nginx server different from Apache?

A

Nginx server is a high-performance asynchronous web server and reverses proxy server whereas Apache is an open-source HTTP server.

Q

Does the Nginx server has the ability to process dynamic content internally?

A

Nginx server lacks the ability to process dynamic content internally.

Q

Which architecture does Nginx server use?

A

Nginx server uses event-driven architecture specifically to address the performance and scalability of issues.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Lucas ?
Various options in Top command

Am using Top command only to view the load average, what are the various options in Top command..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.