{"id":6165,"date":"2024-08-17T13:01:01","date_gmt":"2024-08-17T05:01:01","guid":{"rendered":""},"modified":"2024-08-17T13:01:01","modified_gmt":"2024-08-17T05:01:01","slug":"\/var\u5206\u533a_linux\u54ea\u4e2a\u7cfb\u7edf\u597d","status":"publish","type":"post","link":"https:\/\/mushiming.com\/6165.html","title":{"rendered":"\/var\u5206\u533a_linux\u54ea\u4e2a\u7cfb\u7edf\u597d"},"content":{"rendered":"

\n <\/path> \n<\/svg> <\/p>\n

\u4e00\u3001\u9700\u6c42\u573a\u666f<\/h3>\n

\u6700\u8fd1\u5b66\u4e60KVM\u865a\u62df\u673a\uff0c\u78c1\u76d8\u955c\u50cf\u548c\u914d\u7f6e\u6587\u4ef6\u3001\u5feb\u7167\u90fd\u9ed8\u8ba4\u5b58\u50a8\u5728\/var\u76ee\u5f55\u4e0b\uff0c\u6211\u4e00\u770b\u5c31\u50bb\u773c\u4e86\u3002\u6211\u7684var\u4e0b\u53ea\u67093\u4e2aG\u3002\u4e8e\u662f\u5f97\u597d\u597d\u91cd\u65b0\u91cd\u89c6\u4e00\u4e0b\u8fd9\u4e2avar\u5206\u533a\u3002<\/p>\n

\u4e8c\u3001var\u5206\u533a\u90fd\u662f\u5565\u4e1c\u897f\uff1f<\/h3>\n
\n

\/var \u5305\u62ec\u7cfb\u7edf\u8fd0\u884c\u65f6\u8981\u6539\u53d8\u7684\u6570\u636e\u3002\u5176\u4e2d\u5305\u62ec\u6bcf\u4e2a\u7cfb\u7edf\u662f\u7279\u5b9a\u7684\uff0c\u5373\u4e0d\u80fd\u591f\u4e0e\u5176\u4ed6\u8ba1\u7b97\u673a\u5171\u4eab\u7684\u76ee\u5f55\uff0c\u5982\/var\/log\uff0c\/var\/lock\uff0c\/var\/run\u3002\u6709\u4e9b\u76ee\u5f55\u8fd8\u662f\u53ef\u4ee5\u4e0e\u5176\u4ed6\u7cfb\u7edf\u5171\u4eab\uff0c\u5982\/var\/mail\u3001\/var\/cache\/man\u3001 \/var\/cache\/fonts\u3001\/var\/spool\/news\u3002<\/p>\n

var\u76ee\u5f55\u5b58\u5728\u7684\u76ee\u7684\u662f\u628ausr\u76ee\u5f55\u5728\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u9700\u8981\u66f4\u6539\u7684\u6587\u4ef6\u6216\u8005\u4e34\u65f6\u751f\u6210\u7684\u6587\u4ef6\u53ca\u76ee\u5f55\u63d0\u53d6\u51fa\u6765\uff0c\u7531\u6b64\u53ef\u4ee5\u4f7fusr\u76ee\u5f55\u6302\u8f7d\u4e3a\u53ea\u8bfb\u7684\u65b9\u5f0f\u3002\u9690\u542b\u8981\u6c42var\u76ee\u5f55\u5fc5\u987b\u6302\u8f7d\u4e3a\u53ef\u4ee5\u8bfb\u5199\u7684\u65b9\u5f0f\u3002<\/p>\n<\/blockquote>\n

\u4e09\u3001Linux \u5206\u533a\u9ad8\u624b\u5efa\u8bae \u2013 \u5206\u54ea\u51e0\u4e2a\u533a\uff0c\u6bcf\u4e2a\u533a\u7a7a\u95f4\u5927\u5c0f\u591a\u5c11<\/h3>\n

\u6bcf\u6b21\u5b89\u88c5 Linux \u7cfb\u7edf\uff0c\u5230\u5206\u533a\u90a3\u4e00\u6b65\u7684\u65f6\u5019\u603b\u662f\u6709\u4e9b\u7ea0\u7ed3\uff0c\u5e94\u8be5\u600e\u4e48\u5206\uff1f\u6bcf\u4e2a\u533a\u5206\u591a\u5c11\u5927\u5c0f\uff1f\u6709\u51e0\u6b21\u5206\u533a\u4e0d\u5408\u7406\uff0c\u5bfc\u81f4\u540e\u9762\u6269\u5bb9\u5f88\u662f\u9ebb\u70e6\u3002\u4e8e\u662f\u9759\u4e0b\u5fc3\u6765\uff0c\u82b1\u70b9\u65f6\u95f4\u7279\u610f\u5b66\u4e60\u4e86\u4e00\u4e0b\uff0c\u7ed3\u5408\u524d\u9762\u7684\u51e0\u6b21\u7ecf\u5386\uff0c\u603b\u7ed3\u5982\u4e0b\uff0c\u5e0c\u671b\u5bf9 Linux \u5165\u95e8\u6216\u521d\u5b66\u8005\u6709\u6240\u542f\u53d1\u3002<\/p>\n

\u4e00\u822c\u6765\u8bf4\uff0c\u5728 Linux \u7cfb\u7edf\u4e2d\u90fd\u6709\u6700\u5c11\u4e24\u4e2a\u6302\u8f7d\u70b9\uff0c\u5206\u522b\u662f\/ (\u6839\u76ee\u5f55)\u53ca swap\uff08\u4ea4\u6362\u5206\u533a\uff09\uff0c\u524d\u8005\u6839\u76ee\u5f55 \u662f\u5fc5\u987b\u7684\u3002\u5982\u679c\u4f60\u53ea\u662f\u5728\u865a\u62df\u673a\u4e0a\u5b89\u88c5\u6d4b\u8bd5\u6216\u5b66\u4e60\uff0c\u90a3\u5206\u4e24\u4e2a\u533a\u4e5f\u6ca1\u95ee\u9898\u3002\u4f46\u662f\u5982\u679c\u662f\u751f\u4ea7\u73af\u5883\uff0c\u5efa\u8bae\u6302\u8f7d\u4ee5\u4e0b\u51e0\u5927\u76ee\u5f55\uff1a<\/p>\n

    \n
  • \n

    \/\uff1a \u6839\u76ee\u5f55\uff0c\u552f\u4e00\u5fc5\u987b\u6302\u8f7d\u7684\u76ee\u5f55\u3002\u4e0d\u8981\u6709\u4efb\u4f55\u7684\u72b9\u8c6b\uff0c\u9009\u4e00\u4e2a\u5206\u533a\uff0c\u6302\u8f7d\u5b83\uff01\uff08\u5728\u7edd\u5927\u591a\u6570\u60c5\u51b5\u4e0b \u67092G\u7684\u5bb9\u91cf\u5e94\u8be5\u662f\u591f\u7528\u4e86\u3002\u5f53\u7136\u4e86\uff0c\u5f88\u591a\u4e1c\u897f\u90fd\u662f\u591a\u591a\u76ca\u5584\u7684\u3002<\/p>\n<\/li>\n

  • \n

    swap\uff1a \u4ea4\u6362\u5206\u533a\uff0c\u53ef\u80fd\u4e0d\u662f\u5fc5\u987b\u7684\uff0c\u4e0d\u8fc7\u6309\u7167\u4f20\u7edf\uff0c\u5e76\u4e14\u7167\u987e\u5230\u60a8\u7684\u5b89\u5168\u611f\uff0c\u8fd8\u662f\u6302\u8f7d\u5b83\u5427\u3002\u5b83\u7684\u5bb9\u91cf\u53ea\u8981\u7ea6\u7b49\u4e8e\u60a8\u7684\u7269\u7406\u5185\u5b58<\/mark>\u5c31\u53ef\u4ee5\u4e86\uff0c\u5982\u679c\u8d85\u8fc7\u4e86\u60a8\u7269\u7406\u5185\u5b58\u4e24\u500d\u7684\u5bb9\u91cf\uff0c\u90a3\u7edd\u5bf9\u662f\u4e00\u79cd\u6d6a\u8d39\u3002<\/mark><\/p>\n<\/li>\n

  • \n

    \/home\uff1a \u8fd9\u662f\u60a8\u7684\u5bb6\u76ee\u5f55\uff0c\u901a\u5e38\u60a8\u81ea\u5df1\u521b\u5efa\u7684\u6587\u4ef6\uff0c\u90fd\u4fdd\u5b58\u5728\u8fd9\u91cc\uff0c\u60a8\u6700\u597d\u7ed9\u5b83\u5206\u914d\u4e00\u4e2a\u5206\u533a\u3002<\/p>\n<\/li>\n

  • \n

    \/usr\uff1a \u5e94\u7528\u7a0b\u5e8f\u76ee\u5f55\u3002\u5927\u90e8\u5206\u7684\u8f6f\u4ef6\u90fd\u5b89\u88c5\u5728\u8fd9\u91cc\uff0c\u5982\u679c\u60a8\u8ba1\u5212\u5b89\u88c5\u8bb8\u591a\u8f6f\u4ef6\uff0c\u5efa\u8bae\u4e5f\u7ed9\u5b83\u5206\u914d\u4e00\u4e2a\u5206\u533a\u3002<\/p>\n<\/li>\n

  • \n

    \/var\uff1a \u5982\u679c\u60a8\u8981\u4f5c\u4e00\u4e9b\u670d\u52a1\u5668\u65b9\u9762\u7684\u5e94\u7528\uff0c\u53ef\u4ee5\u8003\u8651\u7ed9\u5b83\u5206\u914d\u4e00\u4e2a\u8f83\u5927\u7684\u5206\u533a\u3002<\/mark><\/p>\n<\/li>\n

  • \n

    \/boot\uff1a \u5982\u679c\u60a8\u7684\u786c\u76d8\u4e0d\u652f\u6301LBA\u6a21\u5f0f\uff08\u4e0d\u592a\u53ef\u80fd\uff09\uff0c\u60a8\u6700\u597d\u6302\u8f7d\u5b83\uff0c\u5982\u679c\u6302\u8f7d\uff0c\u5c06\u5b83\u6302\u8f7d\u5728\u786c\u76d8\u7684\u7b2c\u4e00\u4e2a\u5206\u533a\uff0c\u5e94\u8be5\u6bd4\u8f83\u7a33\u59a5\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u6302\u8f7d\u7684\u5206\u533a\u53ea\u8981100-500M\u5927\u5c0f\u5c31\u8db3\u591f\u4e86\u3002<\/p>\n<\/li>\n<\/ul>\n

    \"\/var\u5206\u533a_linux\u54ea\u4e2a\u7cfb\u7edf\u597d<\/p>\n

    \u662f\u5426\u8981\u5c06\u8fd9\u51e0\u4e2a\u6302\u8f7d\u70b9\u72ec\u7acb\u5206\u5272\u51fa\u6765\u5219\u5e94\u8be5\u6839\u636e\u4f60\u7684\u9700\u6c42\u89c4\u5212\u800c\u5b9a\uff0c\u53ef\u53c2\u8003\u4ee5\u4e0b\u5efa\u8bae\uff1a<\/p>\n

    1\u3001\u521d\u6b21\u63a5\u89e6\u7684\u65b0\u624b\u6216\u786c\u76d8\u7a7a\u95f4\u6709\u9650\u7684 Desktop \u7528\u6237\u5b89\u88c5\u5efa\u8bae<\/h4>\n\n\n\n\n\n\n\n\n
    \u6302\u8f7d\u70b9<\/th>\n\u88c5\u7f6e<\/th>\n\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n
    \/<\/td>\n\/dev\/hda1<\/td>\n\u53ef\u7528\u7a7a\u95f4-swap\u5927\u5c0f\u540e\u7684\u6240\u6709\u7a7a\u95f4<\/td>\n<\/tr>\n
    swap<\/td>\n\/dev\/hda2<\/td>\n\u5927\u7ea6\u5185\u5b58\u5927\u5c0f \u5efa\u8bae\u81f3\u5c11512MB<\/td>\n<\/tr>\n
    \/boot<\/td>\n\/dev\/hda3<\/td>\n100MB\u5373\u53ef<\/td>\n<\/tr>\n
    \/home<\/td>\n\/dev\/hda2<\/td>\n\u6700\u5927\u7684\u5269\u4f59\u7a7a\u95f4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

    \u6216\u8005\u5e72\u8106\u5c31\u81ea\u52a8\u5212\u5206\u5427<\/p>\n

    2\u3001\u9ad8\u7ea7 Server \u7528\u6237\u7684\u5b89\u88c5\u5efa\u8bae<\/h4>\n\n\n\n\n\n\n\n\n\n
    \u6302\u8f7d\u70b9<\/th>\n\u88c5\u7f6e<\/th>\n\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n
    \/<\/td>\n\/dev\/hda1<\/td>\n10~15G\u8db3\u77e3<\/td>\n<\/tr>\n
    \/home<\/td>\n\/dev\/hda2<\/td>\n\u6700\u5927\u7684\u5269\u4f59\u7a7a\u95f4<\/td>\n<\/tr>\n
    \/boot<\/td>\n\/dev\/hda3<\/td>\n100MB\u5373\u53ef<\/td>\n<\/tr>\n
    swap<\/td>\n\/dev\/hda5<\/td>\n\u5927\u7ea6\u5185\u5b58\u5927\u5c0f(\u5efa\u8bae\u81f3\u5c11512MB)<\/td>\n<\/tr>\n
    \/var<\/td>\n\/dev\/hda6<\/td>\n\u5efa\u8bae\u7ed9\u8fd9\u4e2a\u533a\u5927\u4e00\u70b9<\/mark><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

    \u56db\u3001\u8981\u6ce8\u610f\u7684\u4e8b\u9879<\/h3>\n

    \u4e00\u3001Linux \u4e0b\u6ca1\u6709\u5206\u533a\uff0c\u53ea\u6709\u6302\u8f7d\u70b9\uff0c\u7c7b\u4f3c\u4e8e Window \u4e0b\u7684\u5206\u533a\u3002
    \u4e8c\u3001Swap \u7684\u5927\u5c0f\u7ea6\u7b49\u540c\u4f60\u7684\u5185\u5b58\u5927\u5c0f\uff0c\u6216\u7a0d\u5927\u5373\u53ef\uff0c\u5efa\u8bae\u81f3\u5c11\u8bbe\u7f6e512MB
    \u4e09\u3001\u5173\u4e8e\u6587\u4ef6\u7cfb\u7edf\uff0c\u5728 Windows \u4e0b\uff0c\u6211\u4eec\u5e38\u89c1\u5230\u7684\u6587\u4ef6\u7cfb\u7edf\u6709 FAT\u3001 FAT32\u3001 NTFS\u3001exFAT\uff0c\u800c\u5728 Linux \u4e0b\uff0c\u6587\u4ef6\u7cfb\u7edf\u5982\u4e0b\uff1a<\/p>\n

    Ext2:\u65e9\u671f\u7684\u683c\u5f0f\uff0c\u4e0d\u652f\u6301\u65e5\u5fd7\u529f\u80fd\u3002
    Ext3:ext2\u6539\u826f\u7248\uff0c\u589e\u52a0\u4e86\u65e5\u5fd7\u529f\u80fd\uff0c\u662f\u6700\u57fa\u672c\u4e14\u6700\u5e38\u7528\u7684\u4f7f\u7528\u683c\u5f0f\u4e86\u3002
    Ext4:\u9488\u5bf9ext3\u7cfb\u7edf\u7684\u6269\u5c55\u65e5\u5fd7\u5f0f\u6587\u4ef6\u7cfb\u7edf\uff0c\u662fext3\u6587\u4ef6\u7cfb\u7edf\u7684\u540e\u7ee7\u7248\u672c\u3002
    ReiserFS:\u4e5f\u6709\u65e5\u5fd7\u529f\u80fd\uff0c\u5176\u7279\u70b9\u662f\u5904\u7406\u5c0f\u6863\u6848\u65f6\u901f\u5ea6\u5feb\u3002
    XFS:\u7a33\u5b9a\u4e0e\u9ad8\u6548\uff0c\u5728\u5927\u5c0f\u6863\u6848\u6df7\u5408\u7684\u7cfb\u7edf\u91cc\u6709\u4f18\u8d8a\u7684\u8868\u73b0\u3002
    JFS:\u7279\u8272\u662f\u6700\u4e0d\u5360\u7528CPU\u8d44\u6e90\uff0c\u5982\u679c\u4f60\u7684\u7535\u8111\u8001\u65e7\u90a3\u4e48\u8fd9\u662f\u6700\u597d\u7684\u9009\u62e9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\/var\u5206\u533a_linux\u54ea\u4e2a\u7cfb\u7edf\u597dLinux\u5206\u533a\u9ad8\u624b\u5efa\u8bae\u2013\u5206\u54ea\u51e0\u4e2a\u533a\uff0c\u6bcf\u4e2a\u533a\u7a7a\u95f4\u5927\u5c0f\u591a\u5c11\u6bcf\u6b21\u5b89\u88c5Linux\u7cfb\u7edf\uff0c\u5230\u5206\u533a\u90a3\u4e00\u6b65\u7684\u65f6\u5019\u603b\u662f\u6709\u4e9b...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/6165"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=6165"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/6165\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=6165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=6165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=6165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}