请教个Linux安装RPM的知识

蓝天的IT生涯 2014-10-05 09:20:22
我在安装nginx的安装包的时候,查到的信息是,先用rpm命令安装一个rpm包,然后在用yum来安装。
两条命令如下:rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm yum install nginx
请教下:rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm 这个命令不就是安装nginx包了吗,为什么后面还要 yum install nginx来安装呢?
...全文
164 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
looks like you still haven't understood why...
ljc007 2014-10-08
  • 打赏
  • 举报
回复
俺喜欢自己用源代码安装
tar -xzf pcre-8.35.tar.gz
tar xf zlib-1.2.8.tar.gz
tar -xzf nginx-1.6.2.tar.gz
cd nginx-1.6.2

./configure \
--prefix=/opt/nginx \
--sbin-path=/opt/nginx/nginx \
--conf-path=/opt/nginx/nginx.conf \
--pid-path=/opt/nginx/nginx.pid \
--with-http_ssl_module \
--with-pcre=../pcre-8.35 \
--with-zlib=../zlib-1.2.8

make
make install
  • 打赏
  • 举报
回复
The rpm u installed is actually a repository config file. If u check /etc/yum.conf.d, u will find it. By install repos through rpm, it saves u time and effort to create this config file by hand. It is very common to import a new repos for RHEL or centos. After the new repos is ready, yum is able to identify and grab new packages. For ur case, it is nginx...

19,613

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧