Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Centos6.5 's method of installing nginx through yum

Shulou Source: shulou.com Published: 2022-05-31 12:05:04 09月23日 Update

This article mainly introduces the relevant knowledge of "centos6.5 method of installing nginx through yum". Xiaobian shows you the operation process through actual cases. The operation method is simple and fast and practical. I hope this article "centos6.5 method of installing nginx through yum" can help you solve the problem.

Here are: Centos6.5 Install nginx via yum

Note no package nginx available Need to install epe first:

yum install epel-release

After installing epel

yum -y install nginx

after the installation is complete

service nginx start Start nginx

You can see the nginx interface when you visit the machine ip in your browser.

If not, check the linux firewall status. Added 80 port access

After nginx starts, we need to modify the configuration file as needed, you can use ps-ef first| grep nginx View

Here is the configuration file currently used by nginx

worker_processes is generally set to system kernel count (see system kernel count more /proc/cpuinfo| grep "physical id"| grep "0"| wc -l)

/etc/nginx/conf.d/contains additional configuration files.

Then configure it here, such as the location of some static resources.

For example, I want all files under/data/html to be accessed through nginx Load Balancer. Simply modify the following configuration:

About "centos6.5 through yum installation nginx method" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the industry information channel. Xiaobian will update different knowledge points for you every day.

Tags: Configuration method file knowledge system industry different practical balanced location content practical practical article more machine audit case browser status Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Tech Info OPPO Reno Linux Xiaomi