{"id":1052,"date":"2015-10-27T18:49:35","date_gmt":"2015-10-27T10:49:35","guid":{"rendered":"http:\/\/163.26.205.2\/~teablog\/tea1001\/?p=1052"},"modified":"2016-05-10T22:20:08","modified_gmt":"2016-05-10T14:20:08","slug":"apt-get-%e6%8c%87%e4%bb%a4","status":"publish","type":"post","link":"http:\/\/163.26.205.2\/~teablog\/tea1001\/?p=1052","title":{"rendered":"Linux\u6307\u4ee4"},"content":{"rendered":"<p><span style=\"color: #ff0000\"><strong><em>apt-get update<\/em><\/strong><br \/>\n<\/span>\u8edf\u9ad4\u8cc7\u6599\u5eab\u540c\u6b65\uff1aapt-get update \u6703\u6839\u64da \/etc\/apt\/<span class=\"skimlinks-unlinked\">sources.list<\/span> \u4e2d\u8a2d\u5b9a\u5230 APT Server \u53bb\u66f4\u65b0\u8edf\u9ad4\u8cc7\u6599\u5eab\uff0c\u5728\u4efb\u4f55\u66f4\u65b0\u4e4b\u524d\u6700\u597d\u90fd\u5148\u505a\u9019\u4e00\u500b\u52d5\u4f5c\uff0c\u8b93\u8edf\u9ad4\u8cc7\u6599\u4fdd\u6301\u5728\u6700\u65b0\u7684\u72c0\u6cc1\u4e4b\u4e0b\u3002\/etc\/apt\/<span class=\"skimlinks-unlinked\">sources.list<\/span> \u53ef\u4ee5\u7528 apt-setup \u4f86\u8a2d\u5b9a\u3002<\/p>\n<p><span style=\"color: #ff0000\"><strong><em>apt-get install\u00a0&lt;\u5957\u4ef6\u540d\u7a31&gt;<\/em><\/strong><br \/>\n<\/span>\u8edf\u9ad4\u5b89\u88dd\uff1a\u5b89\u88dd\u8edf\u9ad4\u6700\u6015\u7684\u5c31\u662f\u8edf\u9ad4\u9593\u7684\u76f8\u4f9d\u3001\u76f8\u65a5\u95dc\u4fc2\uff0c\u4f46\u662f\u5728 Debian \u88e1\u982d\u5b89\u88dd\u8edf\u9ad4\u662f\u4e00\u4ef6\u975e\u5e38\u6109\u6085\u7684\u4e8b\u60c5\uff0c\u53ea\u8981 \u300e apt-get install \u300f\u4e00\u884c\u6307\u4ee4\u7c21\u7c21\u55ae\u55ae\u8f15\u8f15\u9b06\u9b06\u5373\u53ef\u5b8c\u6210\uff0c\u6240\u6709\u76f8\u4f9d\u3001\u76f8\u65a5 Debian \u90fd\u6703\u5e6b\u6211\u5011\u81ea\u52d5\u89e3\u6c7a\uff0c\u60a8\u53ea\u8981\u56de\u7b54 \u300e Y \u300f\u5c31\u53ef\u4ee5\u3002\u4f9d\u7167\u9810\u8a2d\u503c\uff0c\u900f\u904e sudo apt-get install \u5b89\u88dd\u8edf\u9ad4\u6642\uff0c\u6703\u5c07\u6a94\u6848\u66ab\u5b58\u5728 \/var\/cache\/apt\/archives\/ \u76ee\u9304\u88e1<\/p>\n<p><span style=\"color: #ff0000\"><strong><em>apt-get remove\u00a0&lt;\u5957\u4ef6\u540d\u7a31&gt;<\/em><\/strong><br \/>\n<\/span>\u8edf\u9ad4\u79fb\u9664\uff1a\u8207 install \u4e00\u6a23\uff0cDebian \u4e00\u6a23\u6703\u5e6b\u60a8\u8655\u7406\u79fb\u9664\u8edf\u9ad4\u6642\u6240\u767c\u751f\u7684\u76f8\u4f9d\u554f\u984c\u3002apt-get \u2013purge remove \u5247\u9023\u8a2d\u5b9a\u6a94\u4e5f\u6703\u79fb\u9664\u3002<\/p>\n<p><span style=\"color: #ff0000\"><strong><em>apt-get autoremove<\/em><\/strong><br \/>\n<\/span>\u6e05\u9664\u4e0b\u8f09\u7684\u66ab\u5b58\u6a94<\/p>\n<p><span style=\"color: #ff0000\"><strong><em>apt-get source\u00a0&lt;\u5957\u4ef6\u540d\u7a31&gt;<\/em><\/strong><br \/>\n<\/span>\u5982\u679c\u60a8\u60f3\u53d6\u5f97\u67d0\u500b\u8edf\u9ad4\u5957\u4ef6 ( packages ) \u7684\u539f\u59cb\u78bc\u53ef\u4ee5\u900f\u904e\u9019\u500b\u6307\u4ee4\u9054\u6210\u3002\u5982\u679c\u7528apt-get source \u2013compile pkg1\uff0c\u5247\u662f\u6293\u56de source pkg1\u4e26\u7de8\u8b6f\u6210 binary pkg1\uff0c \u2013compile \u53c3\u6578\u5c31\u5982\u540c rpm -ba \u4e00\u822c<\/p>\n<p><span style=\"color: #ff0000\"><strong><em>apt-get build-dep<\/em><\/strong><br \/>\n<\/span>\u70ba\u6e90\u78bc\u914d\u7f6e\u6240\u9700\u7684\u5efa\u69cb\u76f8\u4f9d\u95dc\u4fc2<\/p>\n<p><span style=\"color: #ff0000\"><strong><em>apt-get upgrade<\/em><\/strong><br \/>\n<\/span>\u8edf\u9ad4\u5347\u7d1a\uff1a\u5e73\u5e38\u6211\u5011\u5f88\u96e3\u9867\u616e\u5230\u7cfb\u7d71\u4e0a\u6240\u5b89\u88dd\u7684\u6578\u5341\u751a\u81f3\u6578\u767e\u5957\u8edf\u9ad4\u7684\u7248\u672c\u662f\u5426\u6709\u65b0\u7248\u51fa\u73fe\uff0c\u73fe\u5728\u53ea\u8981\u4e0b\u9019\u500b\u6307\u4ee4 Debian \u4fbf\u6703\u81ea\u52d5\u627e\u51fa\u6240\u6709\u6709\u65b0\u7248\u7684\u8edf\u9ad4\u5957\u4ef6\u4e26\u9010\u4e00\u5347\u7d1a\u3002<\/p>\n<p><span style=\"color: #ff0000\"><strong><em>apt-get dist-upgrade<\/em><\/strong><br \/>\n<\/span>\u7cfb\u7d71\u5347\u7d1a\uff1a\u7576\u8f49\u79fb\u6574\u500b\u7cfb\u7d71\u6642\uff0c\u5982 \u300e stable \u300f \u8f49\u63db\u5230 \u300e testing \u300f\uff0c\u6216\u662f\u7cfb\u7d71\u904b\u884c\u597d\u4e00\u6bb5\u6642\u9593\u90fd\u61c9\u8a72\u4e0b\u9019\u500b\u6307\u4ee4\uff0c\u5b83\u6703\u8070\u660e\u7684\u8655\u7406\u5230\u5f88\u591a\u8edf\u9ad4\u76f8\u4f9d\u3001\u76f8\u65a5\u7684\u554f\u984c\u3002<\/p>\n<p><strong><em><span style=\"color: #ff0000\">apt-get dselect-upgrade<\/span><\/em><\/strong><\/p>\n<p>\u6839\u64da dselect \u7684\u9078\u64c7\u4f86\u9032\u884c\u5347\u7d1a<\/p>\n<p><span style=\"color: #ff0000\"><strong><em>apt-get clean<\/em><\/strong><br \/>\n<\/span>\u6211\u5011\u900f\u904e apt-get \u5b89\u88dd\u7684\u4efb\u4f55\u8edf\u9ad4\u90fd\u6703\u5148\u4e0b\u8f09\u5230 \u300e \/var\/cache\/apt\/archives\/ \u300f\u53ca \u300e \/var\/cache\/apt\/archive\/partial\/ \u300f \u76ee\u9304\u5e95\u4e0b\uff0c\u4e00\u822c\u9810\u8a2d apt-get \u5728\u5b89\u88dd\u5b8c\u8edf\u9ad4\u5f8c\u662f\u4e0d\u6703\u628a\u4e0a\u8ff0\u4f4d\u7f6e\u5e95\u4e0b\u7684 \u300e .deb \u300f \u6bba\u9664\uff0c\u4e00\u6bb5\u6642\u9593\u5f8c\u60a8\u5982\u679c\u89ba\u5f97\u7cfb\u7d71\u7a7a\u9593\u4e0d\u8db3\uff0c\u60a8\u53ef\u4ee5\u4e0b \u300e apt-get clean \u300f\u8b93\u7cfb\u7d71\u81ea\u52d5\u6e05\u7406\u9019\u500b\u76ee\u9304\u3002<\/p>\n<p><span style=\"color: #ff0000\"><strong><em>apt-get autoclean<\/em><\/strong><br \/>\n<\/span>\u985e\u4f3c \u300e apt-get clean \u300f\uff0c\u4e0b\u6b64\u53c3\u6578\u6642 apt-get \u5728\u5b89\u88dd\u5b8c\u7562\u5f8c\u6703\u81ea\u52d5\u522a\u9664\u8a72\u8edf\u9ad4\u7684 \u300e .deb \u300f \u6a94\u3002<\/p>\n<p><span style=\"color: #ff0000\"><strong><em>apt-get check<\/em><\/strong><br \/>\n<\/span>apt-get \u4e0d\u662f\u842c\u80fd\uff0c\u6709\u6642\u5019\u4e5f\u662f\u6703\u51fa\u73fe\u554f\u984c\uff0c\u9047\u5230\u6709\u554f\u984c\u7684\u6642\u5019\u60a8\u53ef\u4ee5\u4e0b \u300e apt-get check \u300f\u4f86\u8a3a\u65b7\u554f\u984c\u6240\u5728\u3002<\/p>\n<ul>\n<li>-f install: \u6aa2\u67e5\u7cfb\u7d71\u5957\u4ef6\u7684\u76f8\u4f9d\u6027\uff0c\u4e26\u4fee\u6b63\u932f\u8aa4\u3002<\/li>\n<li>-y: \u7a0b\u5f0f\u57f7\u884c\u4e2d\uff0c\u82e5\u6709\u4efb\u4f55\u8a62\u554f\u7686\u81ea\u52d5\u56de\u7b54 \u201cYes\u201d<\/li>\n<\/ul>\n<p><span style=\"font-size: small\"><span style=\"color: #333333\">sudo apt-get -f install <\/span><span style=\"color: #333333\">\u4fee\u590d\u5b89\u88c5<\/span><\/span><span style=\"color: #333333;font-size: small\">&#8220;-f = &#8211;fix-missing&#8221;<\/span><\/p>\n<p>=====================================<\/p>\n<p># mount -o remount,rw \/dev\/hda1 \/<\/p>\n<p>\u9019\u7a2e\u5beb\u6cd5\uff0c\u8ddf\u4e0a\u8ab2\u6642\u7565\u6709\u4e0d\u540c\uff0c\u56e0\u70ba\u73fe\u5728\/etc\/fstab\u4e2d\u7684\u7d00\u9304\u662f\u4e0d\u53ef\u4ee5\u7528\u7684\uff0c\u6240\u4ee5\u8981\u7279\u5225\u6307\u5b9a\u6839\u6a94\u6848\u7cfb\u7d71\u7684\u88dd\u7f6e\u53ca\u639b\u8f09\u9ede\uff0c\u5982\u679c\/etc\/fstab\u7684\u7d00\u9304\u662f\u6b63\u78ba\u7684\uff0c\u5c31\u53ef\u4ee5\u9019\u6a23\u5beb\uff1a<\/p>\n<p># mount -o remount,rw \/<\/p>\n<p>====================================<\/p>\n<p>\u5728\u958b\u6a5f\u555f\u52d5\u96fb\u8166\u6216\u8005\u91cd\u65b0\u555f\u52d5\u96fb\u8166\u6642\uff0c\u60f3\u8b93CentOS Linux\u81ea\u52d5\u5c07<span style=\"color: #ff0000\">XAMPP<\/span>\u5957\u4ef6\u5167\u7684Apache.MySQL.ProFTP\u81ea\u52d5\u555f\u52d5\u8f09\u5165\u767b\u5165\u7cfb\u7d71\u6642\uff0c\u8acb\u4ee5 root \u6700\u9ad8\u6b0a\u9650\u7ba1\u7406\u8005\u767b\u5165<\/p>\n<p>1.\u8acb\u958b\u555f&lt;\u7d42\u7aef\u6a5f&gt;\uff0c\u8f38\u5165 egrep :initdefault: \/etc\/inittab.<br \/>\n2.\u63a5\u8457\u8acb\u8f38\u5165cd \/etc\/rc.d\/rc3.d<br \/>\n3.\u5982\u679c\u7121\u6cd5\u9032\u5165 \/etc\/rc.d\/rc3.d<br \/>\n\u8acb\u53e6\u8a66 \/etc\/init.d\/rc3.d and \/etc\/rc3.d.<br \/>\n4.\u6700\u5f8c\u8f38\u5165<br \/>\nln -s \/opt\/lampp\/lampp S99lampp<br \/>\nln -s \/opt\/lampp\/lampp K01lampp<br \/>\n\u8f38\u5165\u5b8c\u7562\u8acb\u91cd\u65b0\u8f09\u5165XAMPP\u5957\u4ef6\u6216\u8005\u8acb\u91cd\u65b0\u555f\u52d5\u96fb\u8166\u8a2d\u5b9a\u503c\u5373\u751f\u6548<\/p>\n<p><a href=\"http:\/\/hhw0626.blogspot.tw\/2013\/06\/ubuntu-server-1304-64bits-xampp-linux.html\">http:\/\/hhw0626.blogspot.tw\/2013\/06\/ubuntu-server-1304-64bits-xampp-linux.html<\/a><\/p>\n<p>===================================<\/p>\n<h4>\u9019\u6a23\u4f5c\u6700\u7c21\u6f54\u5594<br \/>\nln -s \/opt\/lampp\/lampp \/etc\/init.d\/lampp<br \/>\nsudo update-rc.d -f lampp defaults<\/h4>\n<h4>============================================<\/h4>\n<pre id=\"CA-9621bba7232f532b49d807281f7f1b20e1de71b2\"><span class=\"line\"><span class=\"Comment\"><span style=\"font-family: Courier New\">#\u91cd\u65b0\u555f\u52d5\u6240\u6709\u7db2\u8def\u4ecb\u9762<\/span><\/span><\/span>\r\n<span class=\"line\"><span style=\"font-family: Courier New\"><span class=\"ID\">sudo<\/span> \/<span class=\"ID\">etc<\/span>\/<span class=\"ID\">init<\/span>.<span class=\"ID\">d<\/span>\/<span class=\"ID\">networking<\/span> <span class=\"ID\">restart<\/span><\/span><\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>apt-get update \u8edf\u9ad4\u8cc7\u6599\u5eab\u540c\u6b65\uff1aapt-get update \u6703\u6839 &hellip; <a href=\"http:\/\/163.26.205.2\/~teablog\/tea1001\/?p=1052\">\u95b1\u8b80\u5168\u6587 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/163.26.205.2\/~teablog\/tea1001\/index.php?rest_route=\/wp\/v2\/posts\/1052"}],"collection":[{"href":"http:\/\/163.26.205.2\/~teablog\/tea1001\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/163.26.205.2\/~teablog\/tea1001\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/163.26.205.2\/~teablog\/tea1001\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/163.26.205.2\/~teablog\/tea1001\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1052"}],"version-history":[{"count":0,"href":"http:\/\/163.26.205.2\/~teablog\/tea1001\/index.php?rest_route=\/wp\/v2\/posts\/1052\/revisions"}],"wp:attachment":[{"href":"http:\/\/163.26.205.2\/~teablog\/tea1001\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/163.26.205.2\/~teablog\/tea1001\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1052"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/163.26.205.2\/~teablog\/tea1001\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}