非root环境下安装RPM包

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/

Monthly Archives

Pages

Powered by Movable Type 7.7.2

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.