{"id":4,"date":"2004-10-21T10:24:00","date_gmt":"2004-10-21T02:24:00","guid":{"rendered":"http:\/\/192.168.0.1\/blog_4.4.2\/?p=4"},"modified":"2004-10-21T17:58:00","modified_gmt":"2004-10-21T09:58:00","slug":"freebsd-yy-javayyx","status":"publish","type":"post","link":"https:\/\/blog.worren.net\/?p=4","title":{"rendered":"\u70ba FreeBSD \u6253\u9020 Java\u5e73\u53f0!"},"content":{"rendered":"<div class='drop-case'> <p> 1. <br \/> \n\u5b89\u88ddImageMagic(\u9047\u5230\u9078\u55ae\u756b\u9762\u53d6\u6d88printer\u9a45\u52d5\u7a0b\u5f0f\u7684\u5b89\u88dd\u52a0\u5feb\u901f\u5ea6 \u5927\u6982\u898130-40\u5206\u88dd\u5b89\u88dd) <br \/> \ncd \/usr\/ports\/graphics\/ImageMagick <br \/> \nmake install clean<\/div>\n <p> ***********\u91cd\u8981\u5099\u8a3b*********** <br \/> \n#\u5b89\u88dd\u904e\u7a0b\u4e2d\u5982\u51fa\u73fe\u8a0a\u606f <br \/> \n#\/libexec\/ld-elf.so.1: Shared object \\&#8221;libintl.so.5\\&#8221; not found <br \/> \n#\u8acb <br \/> \nln -s \/usr\/local\/lib\/libintl.so.6 \/usr\/local\/lib\/libintl.so.5 <br \/> \nmake deinstall <br \/> \nmake reinstall clean\n <p> #\u5b89\u88dd\u904e\u7a0b\u4e2d\u5982\u51fa\u73fe <br \/> \n#An older version of graphics\/png is already installed (\u8edf\u9ad4\u540d\u7a31) <br \/> \n# You may wish to &#8220;make deinstall\\&#8217;\\&#8217; and install this port again <br \/> \n# by &#8220;make reinstall\\&#8217;\\&#8217; to upgrade it properly. <br \/> \n# If you really wish to overwrite the old port of graphics\/png <br \/> \n# without deleting it first, set the variable \\&#8221;FORCE_PKG_REGISTER\\&#8221; <br \/> \n# in your environment or the \\&#8221;make install\\&#8221; command line. <br \/> \n#\u8acb\u9032\u884c <br \/> \nmake deinstall <br \/> \nmake reinstall clean <br \/> \n <!--more-->  <br \/> \n2.\u5b89\u88ddJDK 1.4.2(\u8981\u6709\u5fc3\u7406\u6e96\u5099 \u975e\u5e38\u7684\u4e45) <br \/> \ncd \/usr\/ports\/java\/jdk14 <br \/> \nmake install clean > \/tmp\/report.txt <br \/> \n#\u5b83\u6703\u8981\u5230\u56fa\u5b9a\u7db2\u5740\u60a8\u53d6\u5f97\u4ee5\u4e0b4\u500b\u6a94\u6848 <br \/> \n#bsd-jdk14-patches-6.tar.gz <br \/> \n#j2sdk-1_4_2-bin-scsl.zip <br \/> \n#j2sdk-1_4_2-src-scsl.zip <br \/> \n#j2sdk-1_4_2_03-linux-i586.bin <br \/> \n#\u8acb\u4f7f\u7528fetch URL\u7684\u65b9\u5f0f\u53d6\u5f97\u6bd4\u8f03\u65b9\u4fbf <br \/> \n#\u904e\u7a0b\u4e2d\u5982\u767c\u751f\u610f\u5916 \u53ef\u53c3\u8003\/tmp\/report.txt \u8a0a\u606f\u4f86\u7372\u5f97\u89e3\u6c7a\n <p> \u6b644\u500b\u6a94\u6848\u6211\u653e\u5728ftp:\/\/77bbs.com\/java_bsd \u88e1\n <p> \u56e0\u70ba\u9019\u662f\u4ee5\u6a21\u64ec linux \u7684\u65b9\u5f0f\u53bb\u8dd1\u7684! so \u4f60\u8981\u78ba\u5b9a\/etc\/fstab \u5fc5\u9808\u8981\u6709\u4e00\u500b linux \u7684 process <br \/> \n\u6211\u60f3, \u76f4\u63a5\u7528 port \u88dd\u7684\u8a71\u61c9\u8a72\u6703\u81ea\u52d5\u5e6b\u4f60\u52a0\u4e0a\u9019\u884c, \u56e0\u70ba\u7e3d\u5f97\u8981\u5b89\u88dd \u53ef\u6a21\u64eclinux \u7684\u7a0b\u5f0f\u561b~&#8230; <br \/> \nlinprocfs               \/compat\/linux\/proc   linprocfs   rw     0       0\n <p> \u5b89\u88dd\u5b8c\u5f8c\u53ef\u4ee5\u8a66\u770b\u770b java \u662f\u5426\u53ef\u4ee5\u6b63\u5e38\u8dd1\u8d77\u4f86 <br \/> \n$\/usr\/local\/jdk1.4.2\/bin\/javac     \u53ef\u4ee5 compile <br \/> \n$\/usr\/local\/jdk1.4.2\/bin\/java       \u53ef\u4ee5 run .class\n <p> 3.\u5b89\u88ddtomcat 5.0.19 <br \/> \ncd \/usr\/ports\/www\/jakarta-tomcat5 <br \/> \nmake install clean\n <p> 4.\u70ba tomcat \u555f\u52d5\u6a94\u52a0\u5165\u4e00\u4e9b\u4e2d\u6587, java..\u7b49\u7684\u53c3\u6578 <br \/> \n# joe \/usr\/local\/etc\/rc.d\/020.jakarta-tomcat50.sh\n <p> export ENABLE_STARTUP_LOCATE=zh_TW.Big5 <br \/> \nexport LANG=zh_TW.Big5 <br \/> \nexport LC_CTYPE=zh_TW.Big5 <br \/> \nexport CATALINA_BASE=\/usr\/local\/jakarta-tomcat5.0\/webapps\/ROOT <br \/> \nexport TOMCAT_HOME=\/usr\/local\/jakarta-tomcat5.0 <br \/> \nexport JAVA_HOME=\/usr\/local\/jdk1.4.2 <br \/> \nexport CLASSPATH=.\/:\/usr\/local\/jdk1.4.2\/lib:\/usr\/local\/jdk1.4.2\/jre\/lib\/ext:\/usr\/local\/jdk1.4.2\/lib\/tools.jar:\/usr\/local\/share\/java\/classes:\/usr\/local\/jdk1.4.2\/jre:\/usr\/local\/share\/java\/classes\/\n <p> 5.\u5b89\u88dd Apache , \u7528 1.3.x or 2.0.x \u61c9\u8a72\u90fd\u53ef\u4ee5, \u4e0d\u904e\u5728 configure \u7684\u6642\u5019\u8981\u555f\u7528 DSO ! <br \/> \n.\/configure &#8211;enable_module=so <br \/> \n.\/make all ; make install\n <p> 6.\u5b89\u88ddmod_jk , \u8b93 Apache \u548c Tomcat \u53ef\u4ee5\u7d50\u5408 <br \/> \ncd \/usr\/ports\/www\/mod_jk <br \/> \nmake install clean\n <p> \u518d\u5728 \/usr\/local\/apache\/conf\/httpd.conf \u4e2d\u52a0\u5165\u4e0b\u5217\u5e7e\u884c:\n <p> LoadModule jk_module libexec\/mod_jk.so <br \/> \nAddModule mod_jk.c <br \/> \nAlias \/jsp-examples \/usr\/local\/jakarta-tomcat5.0\/webapps\/jsp-examples <br \/> \nAlias \/servlets-examples \/usr\/local\/jakarta-tomcat5.0\/webapps\/servlets-examples <br \/> \nAlias \/webdav \/usr\/local\/jakarta-tomcat5.0\/webapps\/webdav\n <p> JkWorkersFile \/usr\/local\/apache\/conf\/workers.properties <br \/> \nJkLogFile logs\/jk.log <br \/> \nJkLogLevel warn <br \/> \nJkMount \/*.jsp worker1 <br \/> \nJkMount \/examples\/* worker1 <br \/> \nJkMount \/servlet\/* worker1\n <p> \u518d creat \/usr\/local\/apache\/conf\/workers.properties \u5167\u5bb9\u5982\u4e0b:\n <p> # Define 1 real worker using ajp13 <br \/> \nworker.list=worker1\n <p> # Set properties for worker1 (ajp13) <br \/> \nworker.worker1.type=ajp13 <br \/> \nworker.worker1.host=127.0.0.1 <br \/> \nworker.worker1.port=8009 <br \/> \nworker.worker1.lbfactor=50 <br \/> \nworker.worker1.cachesize=10 <br \/> \nworker.worker1.cache_timeout=600 <br \/> \nworker.worker1.socket_keepalive=1 <br \/> \nworker.worker1.socket_timeout=300\n <p> \u7576\u7136, \u82e5\u8981\u8b93 httpd.conf \u548c \u9019\u500b workers.properties \u7684\u5167\u5bb9\u53ef\u4ee5\u594f\u6548, <br \/> \n\u5f97\u78ba\u5b9a \/usr\/local\/jakarta-tomcat5.0\/conf\/server.xml \u6709\u4e0b\u9762\u7684\u5167\u5bb9\n<pre><code><\/code><\/pre>\n <p> \u4f60\u7684 port \u53ef\u80fd\u4e0d\u6703\u662f 8180 , btw  http:\/\/ip_of_your_bsd:8180 &#8230;.\u82e5\u6709\u8dd1\u51fatomcat\u7684\u5283\u9762\u90a3\u5c31\u662ftomcat\u6709\u8dd1\u8d77\u4f86\u4e86!\n <p> 9.\u8a2d\u5b9a Apache \u548c Tomcat \u7684DocumentRoot &#8230;. <br \/> \nTomcat \u7684 DocumentRoot \u9810\u8a2d\u662f\u5728 \/usr\/local\/jakarta-tomcat5.0\/webapps\/ROOT <br \/> \n\u800c Apache \u5247\u662f\u7531 httpd.conf \u81ea\u5b9a! \u6211\u7fd2\u6163\u90fd\u662f\u790eb \/home\/www <br \/> \n\u82e5\u8981\u5c072\u8005\u7d50\u5408\u770b\u8d77\u4f86\u6700\u5feb\u7684\u65b9\u5f0f\u5c31\u662f\u4f7f\u7528 link &#8230;.\u6211\u8a66\u904e\u5e7e\u7a2e link, \u53ea\u6709\u4e00\u7a2e\u60c5\u6cc1\u8dd1\u53ef\u4ee5\u8b93 *jsp \u8dd1\u5f97\u8d77\u4f86!\n <p> \/home # ln -s \/usr\/local\/jakarta-tomcat5.0\/webapps\/ROOT .\/www <br \/> \n\u9019\u6a23\u5b50\u7121\u8ad6\u662f Apache\u7684 html(\u542b php) \u6216\u8005\u662f jsp \u90fd\u53ef\u4ee5\u5728 Tomcat \u7684\u5de5\u4f5c\u8def\u5f91\u4e0b\u8dd1\u8d77\u4f86; <br \/> \n\u82e5\u662f \/usr\/local\/jakarta-tomcat5.0\/webapps # ln -s \/home\/www .\/ROOT <br \/> \n\u5247\u53ea\u80fd\u8dd1\u5f97\u8d77\u4f86 php \u548c html ~&#8230;jsp \u7121\u6cd5\u8dd1\u8d77\u4f86, \u6211\u60f3, \u5927\u6982\u662f .jsp \u6a94\u4e00\u5b9a\u8981\\&#8221;\u5be6\u969b\u5730\\&#8221;\u662f\u5728 Tomcat\u7684\u76ee\u9304\u4e0b\u624d\u53ef\u4ee5\u8dd1~&#8230;.\n <p> \u53e6, \u4e00\u822cuser \u8981\u8dd1 jsp \u4e5f\u6c92\u6709\u8fa6\u6cd5\u5728 http:\/\/xxxxxxx\/~userid \u4e2d\u8dd1! ..\u57fa\u672c\u4e0a\u9019\u6a23 tomcat \u5c31\u4e0d\u6703\u88ab jk_mod \u555f\u52d5\u4e86! <br \/> \n\u6211\u7684\u505a\u6cd5\u662f\u5728 \/home \u4e2d\u5efa\u7acb \u6bcf\u500b user\u7684\u76ee\u9304, \u4e26\u4e14 link \u5230 ~\/publuic_html; ex: <br \/> \n# mkdir \/home\/www\/worren ; chown worren \/home\/www\/worren; cd \/home\/worren ; ln -s \/home\/www\/worren .\/publuic_html\n","protected":false},"excerpt":{"rendered":" <p> 1. \u5b89\u88ddImageMagic(\u9047\u5230\u9078\u55ae\u756b\u9762\u53d6\u6d88printer\u9a45\u52d5\u7a0b\u5f0f\u7684\u5b89\u88dd\u52a0\u5feb\u901f\u5ea6 \u5927\u6982\u898130-40\u5206\u88dd\u5b89\u88dd) cd \/usr\/ports\/graphics\/ImageMagick make install clean ***********\u91cd\u8981\u5099\u8a3b*********** #\u5b89\u88dd\u904e\u7a0b\u4e2d\u5982\u51fa\u73fe\u8a0a\u606f #\/libexec\/ld-elf.so.1: Shared object \\&#8221;libintl.so.5\\&#8221; not found #\u8acb ln -s \/usr\/local\/lib\/libintl.so.6 \/usr\/local\/lib\/libintl.so.5 make deinstall make reinstall clean #\u5b89\u88dd\u904e\u7a0b\u4e2d\u5982\u51fa\u73fe #An older version of graphics\/png is already installed (\u8edf\u9ad4\u540d\u7a31) # You may wish to &#8220;make deinstall\\&#8217;\\&#8217; and install this port again # by &#8220;make reinstall\\&#8217;\\&#8217; to upgrade it &hellip; <a href=\"https:\/\/blog.worren.net\/?p=4\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;\u70ba FreeBSD \u6253\u9020 Java\u5e73\u53f0!&#8221;<\/span><\/a> <\/p> \n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.worren.net\/index.php?rest_route=\/wp\/v2\/posts\/4"}],"collection":[{"href":"https:\/\/blog.worren.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.worren.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.worren.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.worren.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4"}],"version-history":[{"count":0,"href":"https:\/\/blog.worren.net\/index.php?rest_route=\/wp\/v2\/posts\/4\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.worren.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.worren.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.worren.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}