---
title: "Centos服务部署相关命令"
author: "sailinglee"
date: "2015-01-22T20:41:32Z"
tags: []
categories: ["操作系统"]
slug: "centos"
draft: false
lastmod: "2015-01-22T20:41:32Z"
id: 2178651
url: "https://sailinglee.iteye.com/blog/2178651"
---

```
一、软件管理（以nginx为例）
1.下载软件包(.rpm)
$wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

2.添加源(rpm官方的源比较老，所以装个最新的稳定版)
rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm 

3.安装包（-y是指在安装过程中的提问全部选是）
yum install nginx -y

4.查看已安装软件的信息
yum info nginx

5.删除软件
yum remove nginx

6.查看软件安装目录
rpm -ql nginx | cat -n 
```