分类: BSD
2007-06-29 15:34:21
代码: |
[root@FreeBSD ~] $ pkg_info apache-2.2.3 Version 2.2 of Apache web server with prefork MPM. bash-3.1.17 The GNU Project's Bourne Again SHell cvsup-without-gui-16.1h_2 General network file distribution system optimized for CVS diablo-jdk-1.5.0.07.01 Java Development Kit 1.5.0_07.01 expat-2.0.0_1 XML 1.0 parser written in C fontconfig-2.3.2_6,1 An XML-based font configuration API for X Windows freetype2-2.2.1_1 A free and portable TrueType font rendering engine gettext-0.14.5_2 GNU gettext package gmake-3.81_1 GNU version of 'make' utility javavmwrapper-2.3 Wrapper script for various Java Virtual Machines libdrm-2.0.2 Userspace interface to kernel Direct Rendering Module servi libiconv-1.9.2_2 A character set conversion library mod_jk-ap2-1.2.21,1 Apache JK module for connecting to Tomcat using AJP1X perl-5.8.8 Practical Extraction and Report Language pkg-config-0.21 A utility to retrieve information about installed libraries tomcat-5.5.23 Open-source Java web server by Apache, 5.5.x branch xorg-libraries-6.9.0 X11 libraries and headers from X.Org |
代码: |
[root@FreeBSD /usr/ports] $ make search name=diablo-jdk-1.5.0.07.01 Port: diablo-jdk-1.5.0.07.01 Path: /usr/ports/java/diablo-jdk15 Info: Java Development Kit 1.5.0_07.01 Maint: B-deps: expat-2.0.0_1 fontconfig-2.3.2_6,1 freetype2-2.2.1_1 libdrm-2.0.2 pkg-config-0.21 xorg-libraries-6.9.0 R-deps: expat-2.0.0_1 fontconfig-2.3.2_6,1 freetype2-2.2.1_1 javavmwrapper-2.3 libdrm-2.0.2 pkg-config-0.21 xorg-libraries-6.9.0 WWW: |
代码: |
[root@FreeBSD ~] $ setenv PACKAGESITE ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/i386/packages-6.2-release/Latest/ [root@FreeBSD ~] $ pkg_add -r expat [root@FreeBSD ~] $ pkg_add -r freetype [root@FreeBSD ~] $ pkg_add -r fontconfig [root@FreeBSD ~] $ pkg_add -r ... 省略 ... [root@FreeBSD ~] $ pkg_add -r xorg-libraries [root@FreeBSD ~] $ pkg_add -r javavmwrapper |
代码: |
[root@FreeBSD ~] $ pkg_add diablo-jdk-freebsd6.i386.1.5.0.07.01.tbz [root@FreeBSD ~] $ /usr/local/diablo-jdk1.5.0/bin/java -version java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) Client VM (build diablo-1.5.0_07-b01, mixed mode) |
代码: |
[root@FreeBSD ~] $ cd /usr/ports/www/tomcat55 [root@FreeBSD tomcat55] $ make ===> Vulnerability check disabled, database not found => apache-tomcat-5.5.23.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch from apache-tomcat-5.5.23.tar.gz 100% of 5837 kB 16 kBps 00m00s ===> Extracting for tomcat-5.5.23 => MD5 Checksum OK for apache-tomcat-5.5.23.tar.gz. => SHA256 Checksum OK for apache-tomcat-5.5.23.tar.gz. ===> Patching for tomcat-5.5.23 Installation settings: Destination directory: /usr/local/tomcat5.5 Location of JDK: /usr/local/diablo-jdk1.5.0 Location of Java port: java/diablo-jdk15 Running as (user/group): www/www HTTP port: 8180 Shutdown listener port: 8005 AJP 1.3 connector port: 8009 Logfile stdout: /usr/local/tomcat5.5/logs/stdout.log Logfile stderr: /usr/local/tomcat5.5/logs/stderr.log ===> Applying FreeBSD patches for tomcat-5.5.23 >> Removing unneeded files... [ DONE ] >> Customizing server.xml... [ DONE ] ===> Configuring for tomcat-5.5.23 |
代码: |
[root@FreeBSD tomcat55] $ make install ===> Installing for tomcat-5.5.23 ===> tomcat-5.5.23 depends on file: /usr/local/diablo-jdk1.5.0/bin/java - found ===> Generating temporary packing list ===> Checking if www/tomcat55 already installed >> Creating destination directory... [ DONE ] >> Copying files to destination directory... Installing local configuration file: /usr/local/tomcat5.5/conf/Catalina/localhost/host-manager.xml Installing local configuration file: /usr/local/tomcat5.5/conf/Catalina/localhost/manager.xml Installing local configuration file: /usr/local/tomcat5.5/conf/catalina.policy Installing local configuration file: /usr/local/tomcat5.5/conf/catalina.properties Installing local configuration file: /usr/local/tomcat5.5/conf/context.xml Installing local configuration file: /usr/local/tomcat5.5/conf/logging.properties Installing local configuration file: /usr/local/tomcat5.5/conf/server-minimal.xml Installing local configuration file: /usr/local/tomcat5.5/conf/server.xml Installing local configuration file: /usr/local/tomcat5.5/conf/tomcat-users.xml Installing local configuration file: /usr/local/tomcat5.5/conf/web.xml [ DONE ] >> Creating log files... [ DONE ] >> Creating symlink to tools.jar... [ DONE ] |
代码: |
[root@FreeBSD ~] $ pkg_add -r apache22 Fetching ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/i386/packages-6.2-release/Latest/apache22.tbz... |
代码: |
[root@FreeBSD /usr/ports/www/mod_jk] $ make ===> Vulnerability check disabled, database not found => tomcat-connectors-1.2.21-src.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch from => Attempting to fetch from tomcat-connectors-1.2.21-src.tar.gz 100% of 1303 kB 27 kBps 00m00s ===> Extracting for mod_jk-ap2-1.2.21,1 => MD5 Checksum OK for tomcat-connectors-1.2.21-src.tar.gz. => SHA256 Checksum OK for tomcat-connectors-1.2.21-src.tar.gz. ===> Patching for mod_jk-ap2-1.2.21,1 ===> Applying FreeBSD patches for mod_jk-ap2-1.2.21,1 ===> mod_jk-ap2-1.2.21,1 depends on file: /usr/local/sbin/apxs - found ===> mod_jk-ap2-1.2.21,1 depends on executable in : gmake - found ===> mod_jk-ap2-1.2.21,1 depends on file: /usr/local/sbin/apxs - found ===> Configuring for mod_jk-ap2-1.2.21,1 ...省略 ... ...省略 ... ...省略 ... Making all in common gmake[1]: Entering directory `/usr/ports/www/mod_jk/work/tomcat-connectors-1.2.21-src/native/common' gmake[1]: Nothing to be done for `all'. gmake[1]: Leaving directory `/usr/ports/www/mod_jk/work/tomcat-connectors-1.2.21-src/native/common' Making all in apache-2.0 gmake[1]: Entering directory `/usr/ports/www/mod_jk/work/tomcat-connectors-1.2.21-src/native/apache-2.0' gmake[1]: Nothing to be done for `all'. gmake[1]: Leaving directory `/usr/ports/www/mod_jk/work/tomcat-connectors-1.2.21-src/native/apache-2.0' [root@FreeBSD /usr/ports/www/mod_jk] $ make install |
代码: |
LoadModule jk_module libexec/apache/mod_jk.so |
代码: |
[root@FreeBSD Includes] $ cat tomcat-apache.conf JkWorkersFile /usr/local/tomcat5.5/conf/workers.properties JkLogFile /var/log/mod_jk.log JkLogLevel info JkMount /*.jsp ajp13 JkMount /jsp-examples/* ajp13 JkMount /servlets-examples/* ajp13 JkMount /servlet/* ajp13 |
代码: |
[root@FreeBSD ~] $ touch /var/log/mod_jk.log [root@FreeBSD ~] $ chown www:www /var/log/mod_jk.log |
代码: |
[root@FreeBSD ~] $ cat /usr/local/tomcat5.5/conf/workers.properties workers.tomcat_home=/usr/local/tomcat5.5 workers.java_home=/usr/local/diablo-jdk1.5.0 ps=/ worker.list=ajp12, ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 |
代码: |
[root@FreeBSD ~] $ chown www:www /usr/local/tomcat5.5/conf/workers.properties |
代码: |
acceptCount="10" debug="0"/> |
代码: |
[root@FreeBSD ~] $ /usr/local/etc/rc.d/tomcat55 onestart Starting tomcat55. [root@FreeBSD ~] $ /usr/local/etc/rc.d/apache22 onestart Performing sanity check on apache22 configuration: Syntax OK Starting apache22. |