Install Apache + Tomcat under Solaris (SPARC)

xiaoxiao2021-03-06  105

Installing Apache under Solaris Tomcat (SPARC under) Author: Foreword by the sub-field nonsense but some use: Tomcat is the Sun and Apache cooperation, made out of JSP Server, supports Servlet and JSP.Tomcat itself can be used as Web Server, when dealing with static pages When Tomcat is better than Apache, it is not as configurable as Apache. Apache is powerful, efficient, but does not support JSP and servlet, so usually to integrate them, let Apache process The static page is handed over to Tomcat processing to Tomcat processing, and the Apache can transfer the request to Tomcat according to the URL by loading the integration module and settings in Apache. To make the Apache and Tomcat jointly work, you must also have a connector to connect them. Connector has an important impact on performance, the convenience of configuration. Currently, there is rough JK1.x, JK2, MOD_WEBAPP three connectors can be used .jk .Jk2 is an improvement in jk1.x, more new. These three Connector's configuration methods are large. Be sure to pay attention to the integration method of others. In addition, Tomcat is written with Java, so your system must have JDK or JRE. The operating system is Solaris9, the version of the version is Apache 2.0.50; Tomcat 4.1.30; JK2 2.0.4; J2SDK 1.4.2_05, 1, first downloaded to use software 2, use upload software to download the package to the home directory of Solaris users TEST httpd-2.0. 50.Tar.gzjakarta-Tomcat-4.1.30.tar.gz libiconv-1.8-sol9-intel-local.gz (not necessitively) The PKG package used in this experiment is downloaded from www.sunfreeware. ! Under the / export / home / test directory, place the upload package in the SSH client to the directory you want to install.

The directory installed in this article is installed under / usr / local. The installation, pay attention to the installation: must have --Nable-SO load SO module, which is integrated to use. Gzip -d httpd-2.0.50 .tar.gz tar xvf httpd-2.0.50.tar cd httpd-2.0.50 ./configure -with-layout = apache2 -prefix = / path to install directory -ENABLE-SO Make Make Install is good, Apache installation is complete My installation directory is / usr / local / apahce2 modified Apache's httpd.conf servername name offer, if you have the following errors when you install, refer to this box below, if you don't appear or not, This can jump process configure: error: No acceptable c compiler found in $ PATHSEE `config.log 'for more details.configure failed for srclib / apr This reason is because you didn't have a GCC compiler before installation, first view you There is no /usr/local/lib/libiconv.so.2 file in the machine, if you don't have trouble, download this package, install, download libiconv-1.8-sol9-intel-local.gz (with It's ok.) Gunzip libiconv-1.8-sol9-sparc-local.gzpkgadd -d ./libiconv-1.8-sol9-sparc-local Please install GCC-3.4.1-Sol9-sparc-local.gzgunzip GCC-3.4.1- Sol9-sparc-local.gzpkgadd -d GCC-3.4.1-Sol9-Sparc-localRM GCC-2.95.3-SOL8-SPARC-localcd / usr / ucbmv cc cc.origln -s / usr / local / bin / gcc cc Add the following environment variables Path = / bin: / sbin: / usr / bin: / usr / sbin: / etc: / usr / local / bin: / USR / CCS / BIN; EXPORT PATH 4, next is the startup problem, enter / usr / local / apache2 / bin execution ./apachectl start Start Apache (./apachectl stop) If successful, you can see APCHE through your browser The default home page http: // Your IP or server IP or if you can use 127.0.0.1 in the local machine installation (HTTPD -L can list the already loaded module) 5, installing JDK Java is SUN development, so It is pre-installed on his own OS to run the Java's operating environment. You can use the #java -version to view the Java version number to install a new Java environment: Please uninstall the Java with the system before installation. First to remove the previous Java package first ! (If any, use the command pkginfo | grep sunwj3 to see) to remove the package you can see. Such as #pkgrm sunwj3dmo sunwj3man sunwj3dvx sunwj3rt sunwj3dvx sunwj3rt ... Start installing new Java environment: uncompress J2SDK-1_4_2_05-solaris-sparc.tar.z tar xvf j2sdk-1_4_2_05-Solaris-sparc.tar created in yourself Lifting! As under / usr / local / sun (download the JDK software down from the web, and install it.

Add a new package, # pkgadd -d ./usr/local/sun (several sunw directories that just unfained) to install 64bit package, the same Uncompress J2SDK-1_4_2_05-Solaris-Sparcv9.tar.z Tar XVF J2SDK- 1_4_2_05-Solaris-sparcv9.tar extracts in the directory you created! Such as / usr / local / sun64 pkgadd -d ./ USR / local / sun64 / ok, installed. Java -Version, see the version number! 6, install Tomcat 7, unpack the package Before installing Tomcat, set two environment variables: java_home = / usr / j2se classpath = / usr / j2se / lib: / usr / j2se / jre / lib (this is for Solaris9, Solaris8 / USR / Java1. 2; Solaris7 /usR/JAVA1.1) (Other systems, is the directory for you to install JDK) Export Java_Home ClassPath has, these two variables, Tomcat can be installed .jakarta-tomcat-4.1.30.tar.gz is a After the binary file is decompressed, I will decompress it, / usr / local / jakarta-tomcat-5.0.27 built a link ln -s /usr/local/jakarta-tomcat-4.1.30 / usr / local / tomcat The upgrade is convenient, and the Apache just should do this. Set the corresponding variable: Catalina_Home = / usr / local / tomcat catalina_base = / usr / local / tomcat export catalina_home catalina_base 9, start Tomcat and check if the startup successfully entered / usr / local / tomcat / bin ./startup.sh Start Tomcat to see a cat through the browser http: // severip: 8080! (5.0, 4.x Didn't see) Port 8080 is Tomcat's default port 10 Installing JK2 If the above is installed, continue to install JK2 first unzipped to / usr / local / src, Jakarta-Tomcat-Connectors-JK2-2.0.4-SRC enters the directory, CD JK / Native2 ./buildco NF.SH (Execute this step requires 4 PKG packages such as Libtool, M4, Automake, AutoConf, and install them from the Internet.

Since M4 needs to use Perl language, you need to make a connection #LN -S / usr / bin / perl / usr / local / bin / perl, add / usr / ccs / bin to variable values) ./ Configure --with- apxs2 = / usr / local / apache2 / bin / apxsmake (I didn't succeed at the beginning, I thought for a long time, I got off the Make package from the Internet (Make-3.80-Sol9-Aparc-local.gz package, installed in the system) On, in this step, it is successful) copy the generated mod_jk2.so to Apache's Modules directory #CP jk / build / jk2 / apache2 / mod_jk2.so / usr / local / apache2 / modules There is also a JKJNI. SO, saying that it is used to start Tomcat when you start apache. If you copy it. I didn't see it! CP JK / Build / JK2 / Apache2 / jkjni.so / usr / local / apache2 / modules stepped into the topic, Integration involves 4 configuration file Apache httpd.conf and workers2.properties created in Apache's directory! If I own directory is / usr / local / apache2 / confal, Tomcat Server.xml and JK2. Properties (but these two files, I have not changed successfully) & httpd.conf Add mod_jk2.so module in apache's httpd.conf: loadModule JK2_Module Modules / Mod_jk2.so copies text files named in Workers2.properties Usr / local / apache2 / conf directory. This is my workers2.properties: The content is as follows;

# & Example & socket & channel, & override & port & and & host [channel.socket: localhost: 8009] port = 8009 host = 127.0.0.1 # & define & the & worker [ajp13: localhost: 8009] channel = channel.socket: localhost: 8009 # & Uri & mapping [uri: / jsp-examples / * ] Worker = ajp13: localhost: 8009

Ok, restart Apache and Tomcat http: // serverip / jsp-esample If you see the effects and http: // serverip: 8080 / jsp-esamples, the integration is successful.

Going into the topic, integrated involving 4 profiles

转载请注明原文地址:https://www.9cbs.com/read-104890.html

New Post(0)