{"id":5245,"date":"2022-08-17T15:05:58","date_gmt":"2022-08-17T07:05:58","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=5245"},"modified":"2022-08-17T15:17:26","modified_gmt":"2022-08-17T07:17:26","slug":"centos%e7%b3%bb%e7%bb%9f%e5%a6%82%e4%bd%95%e9%87%8d%e7%bd%aeroot%e5%af%86%e7%a0%81","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/5245.html","title":{"rendered":"CentOS\u7cfb\u7edf\u5982\u4f55\u91cd\u7f6eroot\u5bc6\u7801"},"content":{"rendered":"

CentOS\u7cfb\u7edf\u5982\u4f55\u91cd\u7f6eRoot\u5bc6\u7801<\/h2>\n

\"\"<\/a><\/p>\n

\u5982\u679c\u60a8\u5fd8\u8bb0\u4e86CentOS\u670d\u52a1\u5668\u5bc6\u7801\uff0c\u5e76\u4e14\u65e0\u6cd5\u8bbf\u95eeroot\u5e10\u6237\uff0c\u5219\u9700\u8981\u542f\u52a8\u5230\u5355\u7528\u6237\u6a21\u5f0f\u5e76\u91cd\u7f6e root \u5bc6\u7801\u3002\u60a8\u5c06\u5728\u4e0b\u9762\u627e\u5230 CentOS 6\u30017\u30018\u30018 Stream \u548c 9 Stream \u7684\u8bf4\u660e\u3002<\/p>\n

\u8fde\u63a5\u5230\u63a7\u5236\u53f0<\/h2>\n
    \n
  1. \u5355\u51fbVultr\u5ba2\u6237\u4e2d\u5fc3\u7684\u670d\u52a1\u5668\u91cd\u65b0\u542f\u52a8<\/strong>\u56fe\u6807\u3002\"\"<\/a><\/li>\n
  2. \u6253\u5f00\u7f51\u7edc\u63a7\u5236\u53f0\u3002\"\"<\/a>\u60a8\u8fd8\u53ef\u4ee5\u4ece Web \u63a7\u5236\u53f0\u5185\u90e8\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u5668\u3002<\/li>\n
  3. \u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\u60a8\u7684\u7248\u672c\u3002<\/li>\n<\/ol>\n

    \u4e2d\u592e\u64cd\u4f5c\u7cfb\u7edf 6<\/h2>\n
      \n
    1. \u5f53\u7cfb\u7edf\u5f15\u5bfc\u65f6\uff0cGRUB \u4f1a\u63d0\u793a\u60a8\u6309\u4efb\u610f\u952e\u6765\u505c\u6b62\u5f15\u5bfc\u8fc7\u7a0b\u3002\u5feb\u901f\u6309\u4e00\u4e2a\u952e\uff1b\u4f60\u53ea\u6709\u51e0\u79d2\u949f\u3002\u5982\u679c\u9519\u8fc7\u63d0\u793a\uff0c\u5219\u9700\u8981\u4ece\u63a7\u5236\u9762\u677f\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u5668\u5e76\u91cd\u8bd5\u3002<\/li>\n
    2. \u5728 GRUB \u63d0\u793a\u7b26\u4e0b\uff0c\u952e\u5165A<\/kbd>\u4ee5\u9644\u52a0\u5230\u5f15\u5bfc\u547d\u4ee4\u3002<\/li>\n
    3. \u5728\u884c\u5c3e\u6dfb\u52a0\u7a7a\u683c\u548c\u6587\u672csingle<\/code>\u3002<\/li>\n
    4. \u6309ENTER<\/kbd>\u3002<\/li>\n
    5. \u7cfb\u7edf\u5c06\u542f\u52a8\uff0c\u60a8\u5c06\u770b\u5230 root \u63d0\u793a\u3002<\/li>\n
    6. \u952e\u5165passwd<\/code>\u5e76\u6309\u7167\u63d0\u793a\u66f4\u6539 root \u5bc6\u7801\u3002<\/li>\n
    7. \u8fd0\u884creboot<\/code>\u4ee5\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u5668\u3002<\/li>\n<\/ol>\n

      CentOS 7<\/h2>\n
        \n
      1. \u5728\u7cfb\u7edf\u5f15\u5bfc\u65f6\uff0c\u6309\u4e0bESC<\/kbd>\u4ee5\u663e\u793a GRUB \u5f15\u5bfc\u63d0\u793a\u3002\u63d0\u793a\u51fa\u73b0\u5728\u5f15\u5bfc\u8fc7\u7a0b\u7684\u65e9\u671f\u3002\u5982\u679c\u9519\u8fc7\u63d0\u793a\uff0c\u5219\u9700\u8981\u4ece\u63a7\u5236\u9762\u677f\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u5668\u5e76\u91cd\u8bd5\u3002<\/li>\n
      2. \u5728 GRUB \u5f15\u5bfc\u63d0\u793a\u7b26\u4e0b\uff0c\u6309E<\/kbd>\u7f16\u8f91\u7b2c\u4e00\u4e2a\u5f15\u5bfc\u9009\u9879\u3002<\/li>\n
      3. \u627e\u5230\u4ee5linux16<\/strong>\u5f00\u5934\u7684\u5185\u6838\u884c\u3002<\/li>\n
      4. \u66f4\u6539ro<\/code>\u4e3arw init=\/sysroot\/bin\/sh<\/code>\u3002<\/li>\n
      5. \u6309CTRL<\/kbd>+X<\/kbd>\u6216F10<\/kbd>\u542f\u52a8\u8fdb\u5165\u5355\u7528\u6237\u6a21\u5f0f\u3002<\/li>\n
      6. \u4f7f\u7528\u547d\u4ee4\u8bbf\u95ee\u7cfb\u7edf\uff1achroot \/sysroot<\/code>\u3002<\/li>\n
      7. \u952e\u5165passwd<\/code>\u5e76\u6309\u7167\u63d0\u793a\u66f4\u6539 root \u5bc6\u7801\u3002<\/li>\n
      8. \u8fd0\u884ctouch \/.autorelabel<\/code>\u4ee5\u5f3a\u5236\u91cd\u65b0\u6807\u8bb0\u6587\u4ef6\u7cfb\u7edf\u3002\u8fd9\u662f\u4f7f\u7528 SELinux \u7684\u7cfb\u7edf\u6240\u5fc5\u9700\u7684\u3002\u5f53\u60a8\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf\u65f6\uff0c\u5b83\u5c06\u4e3a SElinux \u91cd\u65b0\u6807\u8bb0\u6587\u4ef6\u7cfb\u7edf\u3002\u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u91cd\u65b0\u542f\u52a8\u53ef\u80fd\u9700\u8981\u989d\u5916\u7684\u65f6\u95f4\u3002<\/li>\n
      9. \u8fd0\u884cexit<\/code>\u3002<\/li>\n
      10. \u8fd0\u884creboot -f<\/code>\u4ee5\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u5668\u3002<\/li>\n<\/ol>\n

        CentOS 8 \u548c CentOS 8 Stream<\/h2>\n
          \n
        1. \u5728\u7cfb\u7edf\u5f15\u5bfc\u65f6\uff0c\u6309\u4e0bESC<\/kbd>\u4ee5\u663e\u793a GRUB \u5f15\u5bfc\u63d0\u793a\u3002\u63d0\u793a\u51fa\u73b0\u5728\u5f15\u5bfc\u8fc7\u7a0b\u7684\u65e9\u671f\u3002\u5982\u679c\u9519\u8fc7\u63d0\u793a\uff0c\u5219\u9700\u8981\u4ece\u63a7\u5236\u9762\u677f\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u5668\u5e76\u91cd\u8bd5\u3002<\/li>\n
        2. \u5728 GRUB \u5f15\u5bfc\u63d0\u793a\u7b26\u4e0b\uff0c\u6309E<\/kbd>\u7f16\u8f91\u7b2c\u4e00\u4e2a\u5f15\u5bfc\u9009\u9879\u3002<\/li>\n
        3. \u627e\u5230\u4ee5linux<\/strong>\u5f00\u5934\u7684\u5185\u6838\u884c\u3002<\/li>\n
        4. \u66f4\u6539ro<\/code>\u4e3arw init=\/sysroot\/bin\/sh<\/code>\u3002<\/li>\n
        5. \u6309CTRL<\/kbd>+X<\/kbd>\u6216F10<\/kbd>\u542f\u52a8\u8fdb\u5165\u5355\u7528\u6237\u6a21\u5f0f\u3002<\/li>\n
        6. \u4f7f\u7528\u547d\u4ee4\u8bbf\u95ee\u7cfb\u7edf\uff1achroot \/sysroot<\/code>\u3002<\/li>\n
        7. \u952e\u5165passwd<\/code>\u5e76\u6309\u7167\u63d0\u793a\u66f4\u6539 root \u5bc6\u7801\u3002<\/li>\n
        8. \u8fd0\u884ctouch \/.autorelabel<\/code>\u4ee5\u5f3a\u5236\u91cd\u65b0\u6807\u8bb0\u6587\u4ef6\u7cfb\u7edf\u3002\u8fd9\u662f\u4f7f\u7528 SELinux \u7684\u7cfb\u7edf\u6240\u5fc5\u9700\u7684\u3002\u5f53\u60a8\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf\u65f6\uff0c\u5b83\u5c06\u4e3a SElinux \u91cd\u65b0\u6807\u8bb0\u6587\u4ef6\u7cfb\u7edf\u3002\u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u91cd\u65b0\u542f\u52a8\u53ef\u80fd\u9700\u8981\u989d\u5916\u7684\u65f6\u95f4\u3002<\/li>\n
        9. \u8fd0\u884cexit<\/code>\u3002<\/li>\n
        10. \u8fd0\u884clogout<\/code>\u3002<\/li>\n
        11. \u8fd0\u884creboot<\/code>\u4ee5\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u5668\u3002<\/li>\n<\/ol>\n

          CentOS 9 Stream<\/h2>\n
            \n
          1. \u5728\u7cfb\u7edf\u5f15\u5bfc\u65f6\uff0c\u6309\u4e0bESC<\/kbd>\u4ee5\u663e\u793a GRUB \u5f15\u5bfc\u63d0\u793a\u3002\u63d0\u793a\u51fa\u73b0\u5728\u5f15\u5bfc\u8fc7\u7a0b\u7684\u65e9\u671f\u3002\u5982\u679c\u9519\u8fc7\u63d0\u793a\uff0c\u5219\u9700\u8981\u4ece\u63a7\u5236\u9762\u677f\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u5668\u5e76\u91cd\u8bd5\u3002<\/li>\n
          2. \u5728 GRUB \u5f15\u5bfc\u63d0\u793a\u7b26\u5904\uff0c\u4f7f\u7528\u7bad\u5934\u952e\u7a81\u51fa\u663e\u793a\u5176\u4e2d\u4e00\u4e2a\u6551\u63f4\u5185\u6838\uff0c\u7136\u540e\u6309\u4e0bE<\/kbd>\u4ee5\u7f16\u8f91\u5f15\u5bfc\u9009\u9879\u3002<\/li>\n
          3. \u627e\u5230\u4ee5linux<\/strong>\u5f00\u5934\u7684\u5185\u6838\u884c\u3002<\/li>\n
          4. \u66f4\u6539ro<\/code>\u4e3arw init=\/sysroot\/bin\/sh<\/code>\u3002<\/li>\n
          5. \u6309CTRL<\/kbd>+X<\/kbd>\u6216F10<\/kbd>\u542f\u52a8\u8fdb\u5165\u5355\u7528\u6237\u6a21\u5f0f\u3002<\/li>\n
          6. \u6309\u4e0bENTER<\/kbd>\u8fdb\u5165\u7ef4\u62a4\u6a21\u5f0f\u3002<\/li>\n
          7. \u4f7f\u7528\u547d\u4ee4\u8bbf\u95ee\u7cfb\u7edf\uff1achroot \/sysroot<\/code>\u3002<\/li>\n
          8. \u952e\u5165passwd<\/code>\u5e76\u6309\u7167\u63d0\u793a\u66f4\u6539 root \u5bc6\u7801\u3002<\/li>\n
          9. \u8fd0\u884ctouch \/.autorelabel<\/code>\u4ee5\u5f3a\u5236\u91cd\u65b0\u6807\u8bb0\u6587\u4ef6\u7cfb\u7edf\u3002\u8fd9\u662f\u4f7f\u7528 SELinux \u7684\u7cfb\u7edf\u6240\u5fc5\u9700\u7684\u3002\u5f53\u60a8\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf\u65f6\uff0c\u5b83\u5c06\u4e3a SElinux \u91cd\u65b0\u6807\u8bb0\u6587\u4ef6\u7cfb\u7edf\u3002\u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u91cd\u65b0\u542f\u52a8\u53ef\u80fd\u9700\u8981\u989d\u5916\u7684\u65f6\u95f4\u3002<\/li>\n
          10. \u8fd0\u884cexit<\/code>\u3002<\/li>\n
          11. \u8fd0\u884creboot<\/code>\u4ee5\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u5668\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"

            CentOS\u7cfb\u7edf\u5982\u4f55\u91cd\u7f6eRoot\u5bc6\u7801 \u5982\u679c\u60a8\u5fd8\u8bb0\u4e86CentOS\u670d\u52a1\u5668\u5bc6\u7801\uff0c\u5e76\u4e14\u65e0\u6cd5\u8bbf\u95eeroot\u5e10\u6237\uff0c\u5219\u9700\u8981\u542f\u52a8 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[1015,1686,1687],"class_list":["post-5245","post","type-post","status-publish","format-standard","hentry","category-vultrvps","tag-centos","tag-root"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/5245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=5245"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/5245\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=5245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=5245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=5245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}