{"id":55,"date":"2007-01-01T09:38:38","date_gmt":"2006-12-31T17:38:38","guid":{"rendered":"http:\/\/blog.longwin.com.tw\/?p=55"},"modified":"2007-01-01T09:38:38","modified_gmt":"2006-12-31T17:38:38","slug":"log","status":"publish","type":"post","link":"https:\/\/blog.fhl.net\/?p=55","title":{"rendered":"log\u5099\u4efd\u6a5f\u5236"},"content":{"rendered":"<p>\n\u9019\u500b\u6709\u9ede\u9ebb\u7169\uff0c\u56e0\u70ba\u7a2e\u7a2e\u539f\u56e0\u9084\u6c92\u6709\u81ea\u52d5\u5316\uff0c\u5148\u628a\u5c0f\u6284\u5beb\u5728\u9019\u88e1\n<\/p>\n<p>\nsu root<br \/>\n####\u8655\u7406 Web log<br \/>\ncd \/var\/log\/httpd<br \/>\ngzip access_log error_log ssl_request_log<br \/>\nmv access_log.gz access_log.200210-12.gz<br \/>\nmv ssl_engine_log.gz ssl_request_log.200210-12.gz<br \/>\nmv error_log.gz error_log.200210-12.gz<br \/>\nrm -rf \u820a\u7684log\u8207\u76ee\u9304<br \/>\nscp *gz tech:\/backup\/data\/log\/SERVERNAME<br \/>\n####\u8655\u7406\u7cfb\u7d71log<br \/>\ncd \/var\/log<br \/>\ngzip messages* maillog* secure* xferlog* wtmp* rpmpkgs* bind* boot* btmp* \\<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; lastlog procmail* sudo* up2date* spooler* cron* ksyms* netconf* amavis* \\<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; mysqld* openwebmail* prelink.log* yum* xferlog* freshclam* anaconda*<br \/>\ntouch lastlog wtmp bind.log prelink.log freshclam.log amavis.log<\/p>\n<p>chown root.clamav freshclam.log\n<\/p>\n<p>\nchown amavis.amavis amavis.log\n<\/p>\n<p>\nchmod 661 freshclam.log<br \/>\nchown named.named bind.log<br \/>\n\/etc\/rc.d\/init.d\/named restart<br \/>\n\/etc\/rc.d\/init.d\/syslog restart\n<\/p>\n<p>\n&nbsp;\/etc\/init.d\/amavisd restart\n<\/p>\n<p>\ntar zcvf bind.tgz \/var\/named\/chroot\/var\/log\/named named\n<\/p>\n<p>\ntar zcvf audit.tgz audit<br \/>\ntar zcvf icecast.tgz icecast<br \/>\ntar zcvf sa.tgz sa<br \/>\ntar zcvf mailman.tgz mailman<br \/>\ntar zcvf samba.tgz samba<br \/>\nscp *gz tech:\/backup\/data\/log\/SERVERNAME<br \/>\n####\u770b\u60c5\u6cc1\u6bba\u6389\u820alog<br \/>\nrm -rf *.gz<br \/>\nrm -rf *.tgz<br \/>\nrm -rf icecast\/*<br \/>\nrm -rf sa\/*\n<\/p>\n<p>\nrm -rf audit\/*\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n###### \u56e0\u70baBBS\u5df2\u7d93\u95dc\u4e86\uff0c\u6240\u4ee5\u5e95\u4e0b\u90fd\u4e0d\u7528\u505a\u4e86\u300220080401\n<\/p>\n<p>\n######\u5982\u679c\u662fbbs\u9084\u8981\u8655\u7406\u53e6\u5916\u7684log<br \/>\ncd \/home\/bbs\/adm<br \/>\nscp * tech:\/backup\/data\/log\/bbs\/bbslog<br \/>\nrm -rf *<br \/>\n##### bbs\u9084\u8981\u8655\u7406BBS\u820a\u6587\u7ae0<br \/>\ncd \/home\/bbs\/archive<br \/>\ngzip *<br \/>\nscp * tech:\/backup\/data\/log\/bbs\/article\n<\/p>\n<p>\nrm -rf *&nbsp;\n<\/p>\n<p><!--more--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9019\u500b\u6709\u9ede\u9ebb\u7169\uff0c\u56e0\u70ba\u7a2e\u7a2e\u539f\u56e0\u9084\u6c92\u6709\u81ea\u52d5\u5316\uff0c\u5148\u628a\u5c0f\u6284\u5beb\u5728\u9019\u88e1 su root ####\u8655\u7406 Web log cd  &hellip; <a href=\"https:\/\/blog.fhl.net\/?p=55\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">log\u5099\u4efd\u6a5f\u5236<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-e"],"_links":{"self":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":0,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}