创建与主系统分离的独立的运行环境

chroot命令的主要作用是提供一个隔离的环境,使得在该环境下运行的进程无法访问到主系统的文件和目录。这样可以增加系统的安全性,防止进程对系统进行非法操作或者破坏。

一、基础环境

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/environment/linux-env-chroot/

二、创建账号

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/environment/linux-env-chroot/

三、配置SSHD

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/environment/linux-env-chroot/

四、权限配置

五、bug fix

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/environment/linux-env-chroot/

六、其他说明

① 查找命令在系统中的实际位置,并拷贝到bin或者sbin目录下【指的是copy到chroot的bin或者sbin目录】
② 用ldd命令查找出命令运行时所依赖的共享包
③ 把这些共享包拷贝到lib64下
4️⃣ 下面的示例参考:

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/environment/linux-env-chroot/
文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/environment/linux-env-chroot/文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/environment/linux-env-chroot/

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!

 
Byrd
  • by Published onDecember 4, 2024
  • 原文链接:https://note.t4x.org/environment/linux-env-chroot/
匿名

Comment

Anonymous

Slide puzzle verification.