非root环境下安装RPM包

| No Comments
rhel4.6 其他用户安装rpm包:

1. 用户根目录下新建目录rpm,以cnangel用户为例, mkdir ~/rpm
2. cd ~/rpm && mkdir -p var/lib/rpm && mkdir -p var/lock/rpm
3. rpm --initdb --root ~/rpm/ 将该目录设为根
4. touch ~/.rpmmacros ,文件里添加: %_rpmlock_path /home/cnangel/rpm/var/lock/rpm/transaction
5. rpm -ivh --nodeps foo.rpm --dbpath ~/rpm/var/lib/rpm --prefix ~/usr/
--nodeps: 用了用户自己的rpm数据库会找不到系统的东东
--dbpath: 指定用户rpm数据库路径


rhel5.3 其他用户安装rpm包:

1. 用户根目录下新建目录rpm,以cnangel用户为例, mkdir ~/rpm
2. rpm --rebuilddb --dbpath /home/cnangel/rpm/var/lib/rpm
3. mkdir -p ~/rpm/var/lib/rpm
4. rpm -ivh --nodeps foo.rpm --dbpath ~/rpm/var/lib/rpm --prefix ~/usr/

Leave a comment

Archives

Pages

Powered by Movable Type 6.0.3

June 2015

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        

Recent Assets

  • linux_observability_sar.png
  • linux_tuning_tools.png
  • linux_benchmarking_tools.png
  • linux_observability_tools.png
  • 124634H32-4.jpg
  • 1246343U8-3.jpg
  • L2TP.jpg
  • Site-to-site-pptp-example.jpg
  • 12463410D-0.png
  • 20131129125550843.jpg
Creative Commons License
This blog is licensed under a Creative Commons License.

About this Entry

This page contains a single entry by Cnangel published on September 3, 2010 12:37 PM.

使用Mysql出core was the previous entry in this blog.

【分享】搭建hadoop集群注意事项 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.