﻿{"id":70,"date":"2009-06-30T11:16:40","date_gmt":"2009-06-30T11:16:40","guid":{"rendered":""},"modified":"2011-11-18T16:55:00","modified_gmt":"2011-11-18T08:55:00","slug":"70","status":"publish","type":"post","link":"http:\/\/zerobox.org\/notes\/70.html","title":{"rendered":"apache+resin+pureftp\u7684\u865a\u62df\u4e3b\u673a\u548c\u8d1f\u8f7d\u5747\u8861"},"content":{"rendered":"<p>apache\uff0bresin\u6765\u505a\u60f3\u6765\u5927\u5bb6\u90fd\u6bd4\u8f83\u719f\u6089\u4e86\uff0c\u4e00\u822c\u7684\u914d\u7f6e\u90fd\u662f\u5f88\u719f\u6089\u7684\u4e86\uff0c\u6211\u67e5\u770b\u4e86\u4e00\u4e9b\u8bba\u575b\u4e0a\u7684\u6587\u7ae0\uff0c\u8fd9\u65b9\u4fbf\u7684\u6587\u7ae0\u6bd4\u8f83\u591a\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u53ea\u8981\u5199\u5199apache+resin\u5b9e\u73b0\u72ec\u7acb\u7684\u865a\u62df\u4e3b\u673a\u548cresin\u81ea\u5e26\u7684\u8d1f\u8f7d\u5747\u8861\u3002<br \/>\n2\u3001\u7cfb\u7edf\u548c\u73af\u5883\uff1a<br \/>\nredhat9 and solaris9<br \/>\nhttpd-2.50<br \/>\nresin-3.06<br \/>\npure-ftpd-1.0.17a.tar.gz<br \/>\n3\u3001\u5b89\u88c5\u8f6f\u4ef6\uff1a<br \/>\n3.1\u3001\u5b89\u88c5apache\uff1a<br \/>\n# tar zxvf httpd-2.49.tar.gz<br \/>\n# cd httpd-2.49<br \/>\n# .\/configure &#8211;prefix=\/usr\/local\/apache2 &#8211;enable-so &#8211;with-mpm=worker<br \/>\n# make<br \/>\n# make install<br \/>\n3.2\u3001\u5b89\u88c5resin\uff1a<br \/>\n# tar zxvf resin-3.06.tar.gz<br \/>\n# cd resin03.06<br \/>\n# .\/configure &#8211;prefix=\/usr\/local\/resin &#8211;with-apxs=\/usr\/local\/apache2\/bin\/apxs<br \/>\n# make<br \/>\n# make install<br \/>\n3.3\u3001\u5b89\u88c5pureftp<br \/>\n# tar zxvf pure-ftpd-1.0.17a.tar.gz<br \/>\n# cd pure-ftpd-1.0.17a<br \/>\n# .\/configure &#8211;prefix=\/usr\/local\/pureftpd<br \/>\n&#8211;without-inetd &#8211;with-puredb<br \/>\n&#8211;with-cookie &#8211;with-throttling<br \/>\n&#8211;with-ratios &#8211;with-quotas<br \/>\n&#8211;with-ftpwho &#8211;with-largefile<br \/>\n&#8211;with-welcomemsg<br \/>\n# make<br \/>\n# make install<br \/>\n# mkdir \/usr\/local\/pureftpd\/etc<br \/>\n4\u3001\u914d\u7f6e\u8f6f\u4ef6\uff1a<br \/>\n\u76ee\u7684\uff1a\u7528apache\u548cresin\u505a\u57fa\u4e8e\u57df\u540d\u7684\u865a\u62df\u4e3b\u673a\uff0c\u542f\u7528resin\u81ea\u8eab\u7684\u8d1f\u8f7d\u5747\u8861\u7684\u5f15\u64ce\u3002resin\u7684\u8d1f\u8f7d\u5747\u8861\u5f15\u64ce\u5b9e\u9645\u4e0a\u662f\u53ef\u4ee5\u542f\u52a8\u591a\u4e2ajava\u54cd\u5e94\u8fdb\u7a0b\uff0c\u901a\u8fc7\u5185\u90e8\u673a\u5236\u6765\u8fdb\u884c\u8d1f\u8f7d\u5747\u8861\u3002<br \/>\n4.1\u3001\u914d\u7f6eapache\uff1a<br \/>\n# vi \/usr\/local\/apache2\/conf\/httpd.conf<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nDirctoryIndex index.html index.jsp<br \/>\nAddDefaultCharset Off<br \/>\nUser nobody<br \/>\nGroup nobody<br \/>\nNamevirtualHost 211.11.11.11<\/p>\n<p>ServerAdmin peng.zhang@bj.china.com<br \/>\nDocumentRoot \/data\/web\/xcity<br \/>\nServerName xcity.chinaunix.com<br \/>\nErrorLog logs\/xcity.chinaunix.com-error_log<br \/>\nCustomLog logs\/xcity.chinaunix.com-access_log common<\/p>\n<p>ServerAdmin peng.zhang@bj.china.com<br \/>\nDocumentRoot \/data\/web\/sports<br \/>\nServerName sports.chinaunix.com<br \/>\nErrorLog logs\/sports.chinaunix.com-error_log<br \/>\nCustomLog logs\/sports.chinaunix.com-access_log common<\/p>\n<p>&#8230;&#8230;..<br \/>\n&#8230;.<br \/>\n# mod_caucho Resin Configuration<br \/>\n#<br \/>\nLoadModule caucho_module \/usr\/local\/apache2\/modules\/mod_caucho.so<br \/>\nResinConfigServer 127.0.0.1<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n4.2\u3001\u914d\u7f6eresin\uff1a<br \/>\n# vi \/usr\/local\/resin\/conf\/resin.conf<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>&#8212;\u6ce8\u89e3\uff1a<br \/>\n(\u8fd9\u91cc\u9762\uff0c\u6211\u7528\u4e86\u7cfb\u7edf\u672c\u8eab\u7684127.0.0.1,\u7ed1\u5b9a\u4e864\u4e2a\u7aef\u53e3\u505a\u4f0f\u5728\u5747\u8861\u3002\u8fd8\u53ef\u4ee5\u7528\u4e0d\u540c\u7684ip\u5730\u5740\u548c\u540c\u4e00\u7aef\u53e3\uff0c\u6765\u4f5c\u3002\u4f8b\u5982\uff1a<\/p>\n<p>\u8fd8\u6709\u4e9b\u4eba\uff0c\u559c\u6b22\u5728apache\u4e2d\u8bbe\u7f6e\u6bcf\u4e00\u4e2ajava\u8fdb\u7a0b\u670d\u52a1\u4e00\u4e2a\u865a\u62df\uff0c\u8fd9\u91cc\u6211\u4eec\u4e0d\u63a8\u8350\uff0c\u8fd9\u6837\u505a\uff0c\u5c31\u4f1a\u5931\u53bb\u5f15\u64ce\u672c\u8eab\u7684\u610f\u4e49\u3002\uff09<\/p>\n<p>\/data\/web\/xcity<\/p>\n<p>\/opt\/web\/sports<\/p>\n<p>&#8230;&#8230;..<br \/>\n&#8230;.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n&#8212;\u6ce8\uff1a\u8fd9\u91cc\u9762\u662f\u57fa\u4e8e\u57df\u540d\u7684\u865a\u62df\u4e3b\u673a\uff0c\u5982\u679c\u662f\u9488\u5bf9ip\u7684\u865a\u62df\u4e3b\u673a\uff0c\u5728\u4e2d\uff0c\u5c31\u5e94\u8be5\u662f\u5bf9\u5e94\u865a\u62df\u4e3b\u673a\u7684ip\u4e86\u3002\u4e5f\u5c31\u662f\u8bf4\uff0capache\u548cresin\u5173\u4e8e\u865a\u62df\u4e3b\u673a\u7684\u5730\u65b9\u8981\u4fdd\u6301\u4e00\u81f4\u3002\u8fd8\u6709\uff0c\u5728resin\u4e2d\uff0c\u5bf9\u4e8e\u6bcf\u4e2a\u865a\u62df\u4e3b\u673a\u6240\u7528\u7684web-app\u76ee\u5f55\uff0c\u5176\u5b9e\u662f\u76f8\u5bf9\u4e8e\u5979\u7684\u5bb6\u76ee\u5f55\u4e0b\u7684\/\u76ee\u5f55\u3002<br \/>\n4.3\u3001\u914d\u7f6epureftp<br \/>\n1\u3001\u6dfb\u52a0\u7528\u6237\uff1a<br \/>\n# pure-pw useradd xcityr -f \/usr\/local\/pureftp\/etc\/ftppasswd -u nobody -g nobody -d \/data\/web\/xcity -m<br \/>\n# pure-pw useradd sports -f \/usr\/local\/pureftp\/etc\/ftppasswd -u nobody -g nobody -d \/data\/web\/sports -m<br \/>\n&#8212;\u6ce8\uff1axcity \uff1aftp\u7528\u6237<br \/>\n-f ftppasswd\uff1a\u5b58\u653e\u7528\u6237\u5bc6\u7801\u4fe1\u606f\u7684\u6587\u4ef6<br \/>\n-u \u7528\u6237uid \u4e00\u822c\u662f\u7cfb\u7edf\u7684\u4e00\u4e2a\u7528\u6237\uff0c\u5c31\u662f\u4f60\u7684ftp\u7528\u6237\u7684\u5bb6\u76ee\u5f55\u7684\u7528\u6237<br \/>\n-g \u7528\u6237\u7ec4id<br \/>\n-d \u9501\u5b9a\u7528\u6237\u5728\u5bb6\u76ee\u5f55<br \/>\n-m \u4f7fpureftp.d.passwd\u5199\u8fdbpureftpd.pdb\uff0c\u4f7f\u66f4\u6539\u751f\u6548\u3002<br \/>\n*\u4fee\u6539\u7528\u6237\uff1a<br \/>\n# pure-pw usermod &#8211;help<br \/>\n*\u5220\u9664\u7528\u6237\uff1a<br \/>\n# pure-pw userdel\u00a0\u00a0[-f ] [-m]<br \/>\n*\u66f4\u6539\u62e5\u62a4\u5bc6\u7801\uff1a<br \/>\n# pure-pw passwd\u00a0\u00a0[-f ] [-m]<br \/>\n*\u67e5\u770b\u7528\u6237\u8be6\u7ec6\u5185\u5bb9\uff1a<br \/>\n# pure-pw show\u00a0\u00a0[-f ]<br \/>\n*\u751f\u6210db\u6587\u4ef6\uff0c\u4f7f\u5bc6\u7801\u751f\u6548\uff1a<br \/>\n# pure-pw mkdb [ [-f ]]<br \/>\n*\u5217\u51fa\u6240\u6709\u7528\u6237\uff1a<br \/>\n# pure-pw list [-f ]<br \/>\n5\u3001\u542f\u52a8\u811a\u672c\uff1a<br \/>\n\u5f53\u7cfb\u7edf\u5728solaris\u4e0b\uff1a<br \/>\napache\u548cresin\u7684\u542f\u52a8\u811a\u672c\uff1a<br \/>\n# vi \/etc\/rc2.d\/S99webapp<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n\/usr\/local\/resin\/bin\/httpd.sh -pid srun1.pid -server a start<br \/>\n\/usr\/local\/resin\/bin\/httpd.sh -pid srun2.pid -server b start<br \/>\n\/usr\/local\/resin\/bin\/httpd.sh -pid srun3.pid -server c start<br \/>\n\/usr\/local\/resin\/bin\/httpd.sh -pid srun4.pid -server d start<br \/>\n\/usr\/local\/apache2\/bin\/apachectl start<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\npureftp\u542f\u52a8\u811a\u672c\uff1a<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n#!\/bin\/sh<br \/>\n\/usr\/local\/pureftpd\/sbin\/pure-ftpd -j -lpuredb:\/usr\/local\/pureftpd\/etc\/pureftpd.pdb &amp;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n\u5728linux\u4e0b\uff0c\u76f4\u63a5\u653e\u5230\u54cd\u5e94\u7684\u5f00\u673a\u542f\u52a8\u7b49\u7ea7\u76ee\u5f55\u4e0b\u5c31ok\u4e86\u3002<br \/>\n6\u3001\u603b\u7ed3<br \/>\napache\uff0bresin\u5e94\u8be5\u662f\u4e2a\u5f88\u597d\u7684java\u5e94\u7528\u5e73\u53f0\u4e86\u3002\u5b9e\u9645\u4f7f\u7528\u4e2d\uff0c\u8fd8\u662f\u6709\u5f88\u591a\u6280\u5de7\u3002\u770b\u4e86resin\u5b98\u65b9\u8bba\u575b\u7684\u4e00\u4e9b\u8d44\u6599\uff0c\u8bf4resin3.x\u4ee5\u4e0a\u7684\u7248\u672c\uff0c\u5bf9image\u548chtml\u7684\u652f\u6301\uff0c\u6bd4apache\u54cd\u5e94\u66f4\u5feb\u3002\u6211\u5bf9\u6b64\u6d4b\u8bd5\u8fc7\uff0c\u611f\u89c9\u8fd8\u662f\u6709\u6240\u6b20\u7f3a\u3002\u6240\u4ee5\u8bf4\uff0c\u5728\u5927\u578b\u4e00\u70b9\u7684\u53d1\u5e03\u5e73\u53f0\u4e0a\uff0c\u8fd8\u662f\u8981apache\u548cresin\u7ed3\u5408\u6bd4\u8f83\u597d\u3002<br \/>\n\u5bf9\u4e8eresin\u7684\u8d1f\u8f7d\u5747\u8861\u4f7f\u7528\u4e0a\u542f\u52a8\u7684\u8fdb\u7a0b\u6570\uff0c\u6211\u8ba4\u4e3a\u8fd8\u662f\u8981\u6839\u636e\u81ea\u5df1\u7684\u673a\u5668\u5b9e\u9645\u60c5\u51b5\u6765\u8003\u8651\u7684\u3002\u5c11\u4e86\u8fbe\u4e0d\u5230\u6548\u679c\uff0c\u591a\u4e86\u4f1a\u673a\u5668\u7cfb\u7edf\u4e5f\u662f\u4e00\u4e2a\u8d1f\u8f7d\u3002\u4e2a\u4eba\u8ba4\u4e3a\uff0c4\u4e2a\u53ef\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u9ed8\u8ba4\u7684\u9009\u62e9\u6765\u8003\u8651\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>apache\uff0bresin\u6765\u505a\u60f3\u6765\u5927\u5bb6\u90fd\u6bd4\u8f83\u719f\u6089\u4e86\uff0c\u4e00\u822c\u7684\u914d\u7f6e\u90fd\u662f\u5f88\u719f\u6089\u7684\u4e86\uff0c\u6211\u67e5 &hellip;<\/p>\n<p class=\"read-more\"><a href=\"http:\/\/zerobox.org\/notes\/70.html\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[97,101,100],"class_list":["post-70","post","type-post","status-publish","format-standard","hentry","tag-apache","tag-pureftp","tag-resin"],"views":705,"_links":{"self":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":0,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"wp:attachment":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}