{"id":68,"date":"2010-12-10T10:31:18","date_gmt":"2010-12-10T02:31:18","guid":{"rendered":"http:\/\/www.microwolf.net\/?p=68"},"modified":"2010-12-10T10:31:18","modified_gmt":"2010-12-10T02:31:18","slug":"linux-apache-%e6%94%af%e6%8c%81%e4%b8%ad%e6%96%87%e6%96%87%e4%bb%b6%e5%90%8d","status":"publish","type":"post","link":"http:\/\/www.microwolf.net\/?p=68","title":{"rendered":"Linux apache \u652f\u6301\u4e2d\u6587\u6587\u4ef6\u540d"},"content":{"rendered":"<table border=\"0\" width=\"100%\">\n<tr>\n<td width=\"100%\">apache \u652f\u6301\u4e2d\u6587\u6587\u4ef6\u540d <br \/> <br \/>\n      \u4f5c\u8005: znsoft   \u53d1\u8868\u65e5\u671f: 2006-04-18 09:26  <\/p>\n<p>\u30102006-4-18 14:23 apache\u652f\u6301\u4e2d\u6587\u6587\u4ef6\u540d\u3011<br \/> <br \/>\n      \u6309\u7167\u672c\u6587\u5f00\u5934\u7684\u65b9\u6cd5\u5b89\u88c5\uff0c\u51e1\u662f\u4f7f\u7528make\u7684\u4f4d\u7f6e\u90fd\u7528\/usr\/local\/bin\/gmake \u6765\u8fdb\u884c\u3002<br \/> <br \/>\n      gmake\u53ef\u4ee5\u7528ports\u5b89\u88c5\u3002<br \/>\n      \u65e5\u5fd7\u8bb0\u5f55\u5982\u4e0b\uff1a<\/p>\n<p>      \u25a0 \u4e0b\u8f7d\u76f8\u5173\u6587\u4ef6\u5e76\u89e3\u538b<\/p>\n<p>      wget http:\/\/webdav.todo.gr.jp\/download\/mod_encoding-20021209.tar.gz<br \/> <br \/>\n      wget http:\/\/webdav.todo.gr.jp\/download\/experimental\/mod_encoding.c.apache2.20040616<br \/> <br \/>\n      tar zxfv mod_encoding-20021209.tar.gz<br \/> <br \/>\n      cp mod_encoding.c.apache2.20040616 mod_encoding-20021209\/mod_encoding.c <\/p>\n<p>      \u25a0 iconv_hook\u7f16\u8bd1\u548c\u5b89\u88c5<br \/> <br \/>\n      \u5b89\u88c5mod_encoding\u524d\u9996\u5148\u9700\u8981\u5b89\u88c5iconv_hook<\/p>\n<p>cd mod_encoding-20021209\/lib <br \/> <br \/>\n      .\/configure <br \/>\n      \/usr\/local\/bin\/gmake<br \/>\n      \/usr\/local\/bin\/gmake install<\/p>\n<p>      \u5b8c\u6210\u4e0a\u9762\u64cd\u4f5c\u540e\uff0ciconv_hook\u76f8\u5173so\u6587\u4ef6\u653e\u5230\/usr\/local\/lib\u4e0b\u9762\u3002 <br \/>\n      \u8981\u64cd\u4f5c\u7cfb\u7edf\u7cfb\u7edf\u80fd\u591f\u641c\u7d22\u5230\u8be5so\u6587\u4ef6\uff0c\u9700\u8981\u5b8c\u6210\u4e00\u4e0b\u51e0\u884c\u64cd\u4f5c<br \/>\n      \u6253\u5f00ld.so.conf\u6587\u4ef6\uff0c\u6dfb\u52a0\u4e00\u884c\u6307\u5411iconv_book\u7684\u6240\u5728\u8def\u5f84\uff0c\u5373&#8221;\/usr\/local\/lib&#8221; <\/p>\n<p>      vi \/usr\/compat\/linux\/etc\/ld.so.conf<br \/> <br \/>\n      \u589e\u6dfb<br \/>\n      \/usr\/local\/lib <br \/>\n      \u9000\u51fa<br \/>\n      # ldconfig <\/p>\n<p>      \u25a0 apxs\u5de5\u5177\u5b89\u88c5<br \/> <br \/>\n      \u7f16\u8bd1mod_encoding\u65f6\uff0c\u5fc5\u987b\u8981\u6709apxs\uff0chttpd-devel\u4e2d\u5305\u62ec\u521b\u5efa\u548c\u5b89\u88c5\u6269\u5c55\u6a21\u5757\u7684apxs\u5de5\u5177\u3002<br \/>\n      \u5982\u679c\u662f\u4f60\u5b89\u88c5\u4e86Apache\uff0c\u68c0\u67e5${APACHE_HOME}\/bin\/\u4e0b\u662f\u5426\u5b58\u5728apxs\uff0c\u5982\u679c\u5b58\u5728\u5219\u7565\u8fc7\u8be5\u6b65\u65e0\u9700\u81ea\u5df1\u5b89\u88c5\u8be5\u7a0b\u5e8f\u5305\uff0cRedHat\u653e\u5728\/usr\/sbin\/<font color=\"#c60a00\">apxs<\/font><br \/>\n      \u5982\u679c\u5c1a\u672a\u5b89\u88c5e\u5219\u9700\u8981\u81ea\u5df1\u624b\u52a8\u5b89\u88c5httpd-devel\u3002<br \/>\n      # apt-get install http-devel <\/p>\n<p>      \u25a0 mod_encoding\u6a21\u5757\u7684\u7f16\u8bd1 U?<br \/> <br \/>\n      \u8fdb\u5165mod_encoding-20021209.tar.gz\u7684\u89e3\u538b\u76ee\u5f55\uff0c\u5373mod_encoding-20021209<\/p>\n<p>      .\/configure &#8211;with-apxs=\/opt\/apache\/bin\/apxs &#8211;with-iconv-hook=\/usr\/local\/include <br \/> <br \/>\n      \/usr\/local\/bin\/gmake <br \/>\n      ls -l mod_encoding.o<br \/> <br \/>\n      \u67e5\u770b\u662f\u5426\u5df2\u7ecf\u751f\u6210\u4e86mod_encoding.o\u6587\u4ef6\uff0c\u5982\u679c\u662f\uff0c\u5219make\u6210\u529f\u7ee7\u7eed\u4e0b\u8fb9\u7684\u64cd\u4f5c\u3002<\/p>\n<p>      gcc -shared -o mod_encoding.so mod_encoding.o -Wc,-Wall -L\/usr\/local\/lib -Llib -liconv_hook <\/p>\n<p>      \u751f\u6210mod_encoding.so\u6587\u4ef6\uff0c\u5c06\u8be5\u6587\u4ef6\u62f7\u8d1d\u5230\u4f60\u7684\u6a21\u5757\u5b58\u653e\u76ee\u5f55,\u4e00\u822c\u4e3a${APACHE_HOME}\/modules\/<br \/>\n      cp mod_encoding.so \/opt\/apache\/modules\/mod_encoding.so<\/p>\n<p>      \u25a0 \u4fee\u6539httpd.conf\u6587\u4ef6<br \/> <br \/>\n      vi \/opt\/apache\/conf\/httpd.conf<\/p>\n<p>      LoadFile \/usr\/local\/lib\/libiconv_hook.so<br \/> <br \/>\n      LoadModule encoding_module modules\/mod_encoding.so<br \/> <br \/>\n      <IfModule mod_encoding.c><br \/> <br \/>\n    EncodingEngine   on<br \/> <br \/>\n    NormalizeUsername on<br \/> <br \/>\n    SetServerEncoding GBK<br \/> <br \/>\n    DefaultClientEncoding UTF-8 GBK GB2312<br \/> <br \/>\n    AddClientEncoding &#8220;(Microsoft .* DAV $)&#8221; UTF-8 GBK GB2312<br \/> <br \/>\n    AddClientEncoding &#8220;Microsoft .* DAV&#8221; UTF-8 GBK GB2312<br \/> <br \/>\n    AddClientEncoding &#8220;Microsoft-WebDAV*&#8221; UTF-8 GBK GB2312<br \/> <br \/>\n      <\/IfModule><\/p>\n<p>      \u91cd\u65b0\u542f\u52a8apache\uff1a<br \/>\n      opt\/apache\/bin\/apachectl restart <br \/> <br \/>\n      \u81f3\u6b64freebsd 4.10\u4e0b\u652f\u6301apache\u4e2d\u6587\u6587\u4ef6\u540d\u53ef\u4ee5\u4e86\u3002<\/td>\n<\/tr>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>apache \u652f\u6301\u4e2d\u6587\u6587\u4ef6\u540d \u4f5c\u8005: znsoft \u53d1\u8868\u65e5\u671f: 2006-04-18 09:26 \u30102006- [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"http:\/\/www.microwolf.net\/index.php?rest_route=\/wp\/v2\/posts\/68"}],"collection":[{"href":"http:\/\/www.microwolf.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.microwolf.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.microwolf.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.microwolf.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68"}],"version-history":[{"count":1,"href":"http:\/\/www.microwolf.net\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":69,"href":"http:\/\/www.microwolf.net\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions\/69"}],"wp:attachment":[{"href":"http:\/\/www.microwolf.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.microwolf.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.microwolf.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}