From 59685dbfab10b359c4e8291765eeebb4c8e9fb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E4=BD=B3=E5=87=AF?= <1254589836@qq.com> Date: Wed, 21 Aug 2024 10:52:28 +0800 Subject: [PATCH] user-rpm --- 24-Q3/rpm-user.md | 17 +++++++++++++++++ README.md | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 24-Q3/rpm-user.md diff --git a/24-Q3/rpm-user.md b/24-Q3/rpm-user.md new file mode 100644 index 0000000..41a85e9 --- /dev/null +++ b/24-Q3/rpm-user.md @@ -0,0 +1,17 @@ +# Install the rpm package to the user path + +在日常,往往是多个人使用同一台服务器,如果自己想要dnf install或者将某个自己构建的rpm安装到系统的root里,则会有可能影响其他用户的使用,所以这里提供一种将rpm包安装到个人用户下的方法。 + +## 获取rpm包 + +如果想要通过dnf install来安装某个rpm包,可以先通过dnf download下载rpm包。 + +## 安装到个人目录 + +``` +rpm2cpio name.rpm | cpio -idmv +mkdir -p ~/local/namePath +mv ./usr/* ~/local/namePath +vim ~/.bashrc +# 把路径添加到环境变量中 +``` diff --git a/README.md b/README.md index 19c77c3..4617d0f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # 24-Q3 +[05 Install the rpm package to the user path](24-Q3/rpm-user.md) + [04 Build Bazel6.1.0 on RISC-V](24-Q3/build-bazel610-riscv.md) [03 How to Get SHA256](24-Q3/how-to-get-sha256.md)