{"id":74,"date":"2022-01-25T14:18:02","date_gmt":"2022-01-25T06:18:02","guid":{"rendered":"https:\/\/www.666818.xyz\/?p=74"},"modified":"2023-04-19T14:16:19","modified_gmt":"2023-04-19T06:16:19","slug":"redhat%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.wkv.cc\/index.php\/2022\/01\/25\/redhat%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4\/","title":{"rendered":"RedHat\u5e38\u7528"},"content":{"rendered":"<h3>1. \u67e5\u8be2\u6ce8\u518c\u6a21\u5757\u8f6f\u4ef6<\/h3>\n<pre class=\"code\">yum list all | grep subscription<\/pre>\n<h3>2. \u5378\u8f7d\u6ce8\u518c\u6a21\u5757<\/h3>\n<pre class=\"code\">yum remove subscription-manager<\/pre>\n<h3>3. \u7acb\u5373\u91cd\u542f<\/h3>\n<pre class=\"code\">shutdown -r now<\/pre>\n<h3>4. \u89e3\u538b\u5230\u6307\u5b9a\u8def\u5f84<\/h3>\n<pre class=\"code\">tar zxvf \/source\/kernel.tgz -C \/Document<\/pre>\n<h3>5. \u6253\u5305\u538b\u7f29\u6587\u4ef6<\/h3>\n<pre class=\"code\">tar -cvf \/home\/www\/images.tar \/home\/www\/images \u2190 \u4ec5\u6253\u5305\uff0c\u4e0d\u538b\u7f29\ntar -zcvf \/home\/www\/images.tar.gz \/home\/www\/images \u2190 \u6253\u5305\u540e\uff0c\u4ee5gzip\u538b\u7f29<\/pre>\n<h3>6. \u521b\u5efa\u76ee\u5f55<\/h3>\n<pre class=\"code\">mkdir -p[\u9012\u5f52\u521b\u5efa]<\/pre>\n<h3>7. \u5220\u9664\u975e\u7a7a\u76ee\u5f55<\/h3>\n<pre class=\"code\">rmdir\uff08\u53ea\u80fd\u5220\u9664\u7a7a\u76ee\u5f55\uff09 \/\/ rmdir \u76ee\u6807\u76ee\u5f55\nrm (\u9ed8\u8ba4\u5220\u9664\u6587\u4ef6) -r[\u5220\u9664\u76ee\u5f55] -f[\u4e0d\u5e0c\u671b\u8be2\u95ee\u786e\u8ba4] \/\/ rm -rf \u76ee\u6807\u6587\u4ef6<\/pre>\n<h3>8. \u590d\u5236\u6587\u4ef6<\/h3>\n<pre class=\"code\">cp( -r[\u590d\u5236\u76ee\u5f55] -p[\u590d\u5236\u65f6\u4fdd\u6301\u6587\u4ef6\u5c5e\u6027] \/\/ cp -rp \u76ee\u6807\u6587\u4ef6 \u76ee\u6807\u76ee\u5f55<\/pre>\n<h3>9. \u79fb\u52a8\u6587\u4ef6<\/h3>\n<pre class=\"code\">mv\uff08\u526a\u5207\u6587\u4ef6\uff09 \/\/ mv \u76ee\u6807\u6587\u4ef6 \u76ee\u6807\u76ee\u5f55 \uff08\u5c06\u76ee\u6807\u76ee\u5f55\u5c5e\u6027\u6539\u4e3a\u6587\u4ef6\u540d\u65f6\uff0c\u53ef\u5bf9\u6587\u4ef6\u8fdb\u884c\u6539\u540d\uff09<\/pre>\n<h3>10. \u521b\u5efa\u6587\u4ef6<\/h3>\n<pre class=\"code\">touch \/\/touch \u6587\u4ef6\u540d<\/pre>\n<h3>11. \u67e5\u770b\u6587\u4ef6\u5185\u5bb9<\/h3>\n<pre class=\"code\">cat -n[\u663e\u793a\u884c\u53f7] \/\/ cat -n \u76ee\u6807\u6587\u4ef6<\/pre>\n<h3>12. \u53cd\u5411\u663e\u793a\u6587\u4ef6\u5185\u5bb9<\/h3>\n<pre class=\"code\">tac(\u9002\u7528\u4e8e\u77ed\u6587\u4ef6)<\/pre>\n<h3>13. \u5206\u9875\u6d4f\u89c8\u6587\u4ef6<\/h3>\n<pre class=\"code\">more(\u53ef\u7528 \u7a7a\u683c \u6216 F \u7ffb\u9875\uff0c\u56de\u8f66 \u6362\u884c\uff0c q \u9000\u51fa) \/\/ more \u76ee\u6807\u6587\u4ef6\nless\uff08\u5728 more \u547d\u4ee4\u7684\u57fa\u7840\u4e0a\u8fd8\u53ef\u7528 \u4e0a\u4e0b\u7bad\u5934 \u6362\u884c\uff0c pgup\u3001pgdown \u7ffb\u9875\uff0c \/ \u52a0\u641c\u7d22\u5185\u5bb9\u67e5\u627e\uff0c n \u8df3\u8f6c\u4e0b\u4e00\u4e2a\u5339\u914d\u9879\uff0c N \u8df3\u8f6c\u81f3\u4e0a\u4e00\u4e2a\u5339\u914d\u9879\uff09<span style=\"font-weight: revert;\">\/\/ less \u76ee\u6807\u6587\u4ef6<\/span><\/pre>\n<h3>14. \u67e5\u770b\u6587\u4ef6\u5934<\/h3>\n<pre class=\"code\">head(\u9ed8\u8ba4\u524d10\u884c) -n[\u6307\u5b9a\u884c\u6570] \/\/ head -n 5 \u76ee\u6807\u6587\u4ef6<\/pre>\n<h3>15. \u67e5\u770b\u6587\u4ef6\u5c3e<\/h3>\n<pre class=\"code\">tail\uff08\u9ed8\u8ba410\u884c\uff09 -n[\u663e\u793a\u6307\u5b9a\u884c\u6570] \/\/ tail -n 5 \u76ee\u6807\u6587\u4ef6<\/pre>\n<h3>16. \u521b\u5efa\u8fde\u63a5\u6587\u4ef6<\/h3>\n<pre class=\"code\">ln(\u9ed8\u8ba4\u521b\u5efa\u786c\u94fe\u63a5\uff0c\u5b9e\u65f6\u66f4\u65b0) -s[\u521b\u5efa\u8f6f\u8fde\u63a5] \/\/ ln -s \u76ee\u6807\u76ee\u5f55\/[\u6587\u4ef6\u540d]<\/pre>\n<h3>17. \u66f4\u6539\u6587\u4ef6\u6743\u9650<\/h3>\n<pre class=\"code\">chmod -R[\u9012\u5f52\u66f4\u6539] \/\/ chmod -R 777 \u76ee\u6807\u6587\u4ef6<\/pre>\n<h3>18. \u66f4\u6539\u6587\u4ef6\u6240\u6709\u8005<\/h3>\n<pre class=\"code\">chown \/\/ chown \u76ee\u6807\u7528\u6237 \u76ee\u6807\u6587\u4ef6<\/pre>\n<h3>19. \u6587\u4ef6\u641c\u7d22<\/h3>\n<pre class=\"code\">find -name[\u6309\u6587\u4ef6\u540d\u641c\u7d22\uff0c\u901a\u914d\u7b26 * \uff1f] -iname[\u6309\u6587\u4ef6\u540d\u641c\u7d22\u5ffd\u7565\u5927\u5c0f\u5199]<\/pre>\n<pre class=\"code\">-size[\u6309\u6587\u4ef6\u5927\u5c0f\u641c\u7d22\uff0c + \u5927\u4e8e\uff0c - \u5c0f\u4e8e\uff0c\u7f3a\u7701\u8868\u793a\u7b49\u4e8e] -type[\u6839\u636e\u7c7b\u578b\u67e5\u627e\uff0c d \u4e3a\u76ee\u5f55\uff0c f \u4e3a\u6587\u4ef6]\n-user[\u6839\u636e\u6240\u5c5e\u7528\u6237\u67e5\u627e] -group[\u6839\u636e\u6240\u5c5e\u7ec4\u67e5\u627e]\n-cmin[\u6839\u636e\u66f4\u6539\u65f6\u95f4\u67e5\u627e\uff0c+2\u4e24\u5206\u949f\u524d\uff0c-2\u4e24\u5206\u949f\u5185] -mtime[\u6839\u636e\u4fee\u6539\u65f6\u95f4\uff0c+2\u4e24\u5929\u524d\uff0c-2\u4e24\u5929\u5185]\n-a[\u67e5\u8be2\u6761\u4ef6 and \u8fde\u63a5\u7b26] -r[\u67e5\u8be2\u6761\u4ef6 or \u8fde\u63a5\u7b26]\n\/\/ find -name *\u5173\u952e\u5b57*\n\/\/ find -size +1M (\u5927\u4e8e1M\u7684\u6587\u4ef6)\n\/\/ find -iname *\u5173\u952e\u5b57*<\/pre>\n<h3>20. \u5feb\u901f\u6587\u4ef6\u67e5\u627e<\/h3>\n<pre class=\"code\">locate\uff08\u4eceLinux\u6587\u4ef6\u8d44\u6599\u5e93\u67e5\u627e\uff0c\u7cfb\u7edf\u5b9a\u671f\u81ea\u52a8\u66f4\u65b0\uff09 -i[\u5ffd\u7565\u5927\u5c0f\u5199]<\/pre>\n<h3>21. \u641c\u7d22\u547d\u4ee4\u6240\u5728\u8def\u5f84\u53ca\u522b\u540d<\/h3>\n<pre class=\"code\">which \/\/ which \u547d\u4ee4\u540d<\/pre>\n<h3>22. \u641c\u7d22\u6587\u4ef6\u4e2d\u6307\u5b9a\u5185\u5bb9<\/h3>\n<pre class=\"code\">grep(^a \u4ee5a\u5f00\u5934) -i[\u5ffd\u7565\u5927\u5c0f\u5199] -v[\u6392\u9664\u6307\u5b9a\u5b57\u7b26]\n\/\/ grep ^aa a.txt &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ls |grep -v ^G<\/pre>\n<h3>23. \u67e5\u770b\u547d\u4ee4\u5e2e\u52a9<\/h3>\n<pre class=\"code\">man \/\/ man ls\ninfo \/\/ info ls<\/pre>\n<h3>24. \u67e5\u770b\u7528\u6237\u767b\u5f55\u4fe1\u606f<\/h3>\n<pre class=\"code\">who<\/pre>\n<h3>25. \u538b\u7f29\u6587\u4ef6<\/h3>\n<pre class=\"code\">gzip -d[\u89e3\u538b\u6587\u4ef6] \/\/ gzip -d \u76ee\u6807.gz\u6587\u4ef6<\/pre>\n<h3>26. \u76ee\u5f55\u6253\u5305\u538b\u7f29<\/h3>\n<pre class=\"code\">tar -c[\u6253\u5305] -v[\u663e\u793a\u8be6\u7ec6\u4fe1\u606f] -f[\u6307\u5b9a\u6587\u4ef6\u540d] -z[\u6253\u5305\u540c\u65f6\u538b\u7f29] -x[\u89e3\u5305]\n\/\/ tar -zcvf \u6253\u5305\u538b\u7f29\u540e\u6587\u4ef6\u540d \u76ee\u6807\u6587\u4ef6\u540d\n\/\/ tar -zxvf \u76ee\u6807\u6587\u4ef6\u540d<\/pre>\n<h3>27. \u538b\u7f29 zip \u6587\u4ef6<\/h3>\n<pre class=\"code\">zip -r[\u538b\u7f29\u76ee\u5f55] \/\/ zip \u538b\u7f29\u540e\u6587\u4ef6\u540d \u76ee\u6807\u6587\u4ef6\u540d<\/pre>\n<h3>28. \u89e3\u538b zip \u6587\u4ef6<\/h3>\n<pre class=\"code\">unzip \u76ee\u6807\u6587\u4ef6\u540d<\/pre>\n<h3>29. \u538b\u7f29 bz2 \u6587\u4ef6<\/h3>\n<pre class=\"code\">biz\uff08\u9ed8\u8ba4\u53ea\u80fd\u538b\u7f29\u6587\u4ef6\uff09 -k[\u538b\u7f29\u540e\u4fdd\u7559\u6587\u4ef6] \/\/ biz \u76ee\u6807\u6587\u4ef6\n\/\/ \u6253\u5305\u76ee\u5f55\u5e76\u538b\u7f29 tar -cjf \u6253\u5305\u538b\u7f29\u540e\u6587\u4ef6\u540d \u76ee\u6807\u6587\u4ef6\u540d<\/pre>\n<h3>30. \u89e3\u538b bz2 \u6587\u4ef6<\/h3>\n<pre class=\"code\">bunzip2 -k[\u89e3\u538b\u540e\u4fdd\u7559\u539f\u6587\u4ef6] \/\/ bunzip2 -k \u76ee\u6807\u6587\u4ef6\u540d\n\/\/ \u89e3\u538b tar.bz2 \u6587\u4ef6 tar -xjf \u76ee\u6807\u6587\u4ef6\u540d<\/pre>\n<h3>31. \u67e5\u770b\u6240\u6709\u5df2\u5b89\u88c5\u8f6f\u4ef6<\/h3>\n<pre class=\"code\">rpm -qa<\/pre>\n<h3>32. \u5378\u8f7d\u5df2\u5b89\u88c5\u8f6f\u4ef6<\/h3>\n<pre class=\"code\">rpm -e --nodeps \u8f6f\u4ef6\u5305\u540d<\/pre>\n<h3>33. rpm \u8f6f\u4ef6\u5305\u5b89\u88c5<\/h3>\n<pre class=\"code\">rpm -ivh \u8f6f\u4ef6\u5305\u540d<\/pre>\n<h3>34. \u914d\u7f6e\u5168\u5c40\u73af\u5883\u53d8\u91cf\uff08 Java \u4e3a\u4f8b\uff09<\/h3>\n<pre class=\"code\">export JAVA_HOME=\/usr\/java\/jdk1.7.0_04\nexport CLASSPATH=.:$JAVA_HOME\/lib\/dt.jar:$JAVA_HOME\/lib\/tools.jar\nexport PATH=$PATH:$JAVA_HOME\/bin<\/pre>\n<h3>35. \u66f4\u65b0\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u4fe1\u606f<\/h3>\n<pre class=\"code\">source \/etc\/profile<\/pre>\n<h3>36. \u8df3\u8f6c\u4e0a\u6b21\u6240\u5728\u76ee\u5f55<\/h3>\n<pre class=\"code\">cd -<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. \u67e5\u8be2\u6ce8\u518c\u6a21\u5757\u8f6f\u4ef6 yum list all | grep subscription 2. \u5378\u8f7d\u6ce8\u518c\u6a21\u5757  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6,9],"class_list":["post-74","post","type-post","status-publish","format-standard","hentry","category-biancheng","tag-linux","tag-redhat"],"_links":{"self":[{"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/posts\/74","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/comments?post=74"}],"version-history":[{"count":5,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/posts\/74\/revisions"}],"predecessor-version":[{"id":204,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/posts\/74\/revisions\/204"}],"wp:attachment":[{"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/media?parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/categories?post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wkv.cc\/index.php\/wp-json\/wp\/v2\/tags?post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}