Home Backend Development PHP Tutorial Install nginx via rpm under linux

Install nginx via rpm under linux

Jul 29, 2016 am 09:07 AM
centos nginx release

1. Download the rpm package of nginx

[root@chen ~]# wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
--2015-12-31 23:05:21--  http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
正在解析主机 nginx.org... 206.251.255.63, 95.211.80.227, 2001:1af8:4060:a004:21::e3
正在连接 nginx.org|206.251.255.63|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:4311 (4.2K) [application/x-redhat-package-manager]
正在保存至: “nginx-release-centos-6-0.el6.ngx.noarch.rpm”
 
100%[================================================>] 4,311       --.-K/s   in 0s     
 
2015-12-31 23:05:25 (39.1 MB/s) - 已保存 “nginx-release-centos-6-0.el6.ngx.noarch.rpm” [4311/4311])
Copy after login

2. Unzip the rpm package
[root@chen ~]# rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
warning: nginx-release-centos-6-0.el6.ngx.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY
Preparing...                ########################################### [100%]
   1:nginx-release-centos   ########################################### [100%]
Copy after login

3. Install nginx
[root@chen ~]# yum install nginx
已加载插件:fastestmirror, security
设置安装进程
Determining fastest mirrors
* base: mirrors.skyshe.cn
* extras: mirrors.skyshe.cn
* updates: mirrors.opencas.cn
base                                                               | 3.7 kB     00:00    
base/primary_db                                                    | 3.6 MB     00:05    
file:///mnt/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/repodata/repomd.xml
尝试其他镜像。
extras                                                             | 3.4 kB     00:00    
extras/primary_db                                                  |  30 kB     00:00    
nginx                                                              | 2.9 kB     00:00    
nginx/primary_db                                                   | 6.8 kB     00:00    
updates                                                            | 3.4 kB     00:00    
updates/primary_db                                                 | 3.1 MB     00:18    
解决依赖关系
--> 执行事务检查
---> Package nginx.i386 0:1.8.0-1.el6.ngx will be 安装
--> 完成依赖关系计算
 
依赖关系解决
 
==========================================================================================
 软件包            架构             版本                          仓库               大小
==========================================================================================
正在安装:
 nginx             i386             1.8.0-1.el6.ngx               nginx             360 k
 
事务概要
==========================================================================================
Install       1 Package(s)
 
总下载量:360 k
Installed size: 835 k
确定吗?[y/N]:y
下载软件包:
nginx-1.8.0-1.el6.ngx.i386.rpm                                     | 360 kB     00:14    
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
Warning: RPMDB altered outside of yum.
  正在安装   : nginx-1.8.0-1.el6.ngx.i386                                             1/1
----------------------------------------------------------------------
 
Thanks for using nginx!
 
Please find the official documentation for nginx here:
* http://nginx.org/en/docs/
 
Commercial subscriptions for nginx are available on:
* http://nginx.com/products/
 
----------------------------------------------------------------------
  Verifying  : nginx-1.8.0-1.el6.ngx.i386                                             1/1
 
已安装:
  nginx.i386 0:1.8.0-1.el6.ngx                                                           
 
完毕!
Copy after login

4. Test
[root@chen ~]# service nginx start
正在启动 nginx:                                           [确定]
[root@chen ~]# service nginx stop
停止 nginx:                                               [确定]
Copy after login

The above introduces the rpm installation of nginx under Linux, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to optimize CentOS HDFS configuration How to optimize CentOS HDFS configuration Apr 14, 2025 pm 07:15 PM

Improve HDFS performance on CentOS: A comprehensive optimization guide to optimize HDFS (Hadoop distributed file system) on CentOS requires comprehensive consideration of hardware, system configuration and network settings. This article provides a series of optimization strategies to help you improve HDFS performance. 1. Hardware upgrade and selection resource expansion: Increase the CPU, memory and storage capacity of the server as much as possible. High-performance hardware: adopts high-performance network cards and switches to improve network throughput. 2. System configuration fine-tuning kernel parameter adjustment: Modify /etc/sysctl.conf file to optimize kernel parameters such as TCP connection number, file handle number and memory management. For example, adjust TCP connection status and buffer size

Centos stops maintenance 2024 Centos stops maintenance 2024 Apr 14, 2025 pm 08:39 PM

CentOS will be shut down in 2024 because its upstream distribution, RHEL 8, has been shut down. This shutdown will affect the CentOS 8 system, preventing it from continuing to receive updates. Users should plan for migration, and recommended options include CentOS Stream, AlmaLinux, and Rocky Linux to keep the system safe and stable.

How to check CentOS HDFS configuration How to check CentOS HDFS configuration Apr 14, 2025 pm 07:21 PM

Complete Guide to Checking HDFS Configuration in CentOS Systems This article will guide you how to effectively check the configuration and running status of HDFS on CentOS systems. The following steps will help you fully understand the setup and operation of HDFS. Verify Hadoop environment variable: First, make sure the Hadoop environment variable is set correctly. In the terminal, execute the following command to verify that Hadoop is installed and configured correctly: hadoopversion Check HDFS configuration file: The core configuration file of HDFS is located in the /etc/hadoop/conf/ directory, where core-site.xml and hdfs-site.xml are crucial. use

Centos shutdown command line Centos shutdown command line Apr 14, 2025 pm 09:12 PM

The CentOS shutdown command is shutdown, and the syntax is shutdown [Options] Time [Information]. Options include: -h Stop the system immediately; -P Turn off the power after shutdown; -r restart; -t Waiting time. Times can be specified as immediate (now), minutes ( minutes), or a specific time (hh:mm). Added information can be displayed in system messages.

How to create a mirror in docker How to create a mirror in docker Apr 15, 2025 am 11:27 AM

Steps to create a Docker image: Write a Dockerfile that contains the build instructions. Build the image in the terminal, using the docker build command. Tag the image and assign names and tags using the docker tag command.

Tips for using HDFS file system on CentOS Tips for using HDFS file system on CentOS Apr 14, 2025 pm 07:30 PM

The Installation, Configuration and Optimization Guide for HDFS File System under CentOS System This article will guide you how to install, configure and optimize Hadoop Distributed File System (HDFS) on CentOS System. HDFS installation and configuration Java environment installation: First, make sure that the appropriate Java environment is installed. Edit /etc/profile file, add the following, and replace /usr/lib/java-1.8.0/jdk1.8.0_144 with your actual Java installation path: exportJAVA_HOME=/usr/lib/java-1.8.0/jdk1.8.0_144exportPATH=$J

What files do you need to modify in HDFS configuration CentOS? What files do you need to modify in HDFS configuration CentOS? Apr 14, 2025 pm 07:27 PM

When configuring Hadoop Distributed File System (HDFS) on CentOS, the following key configuration files need to be modified: core-site.xml: fs.defaultFS: Specifies the default file system address of HDFS, such as hdfs://localhost:9000. hadoop.tmp.dir: Specifies the storage directory for Hadoop temporary files. hadoop.proxyuser.root.hosts and hadoop.proxyuser.ro

Centos install mysql Centos install mysql Apr 14, 2025 pm 08:09 PM

Installing MySQL on CentOS involves the following steps: Adding the appropriate MySQL yum source. Execute the yum install mysql-server command to install the MySQL server. Use the mysql_secure_installation command to make security settings, such as setting the root user password. Customize the MySQL configuration file as needed. Tune MySQL parameters and optimize databases for performance.

See all articles