Home Database Mysql Tutorial JSP在Linux下的安装_MySQL

JSP在Linux下的安装_MySQL

Jun 01, 2016 pm 02:08 PM
apache root Install

  在 Linux 上安装Apache+ApacheJServ+JSP

安装软件的顺序如下:

I. 安装 Apache Web Server
a. 使用 RPM
如果使用 RPM 套件,在取得 Apache Web Server 套件之后,只需要输入以下命令即可完成安装:
[root@localhost root]# rpm -ivh apache-1.3.xx.i386.rpm ( xx 代表 Apache Web Server 版本 )
b. 使用 SOURCE
如果使用的是 Apache Web Server 的 Source,那么必需对 Source 进行编译并且加以安装:
[root@localhost root]# gunzip apache_1.3.xx.tar.gz ( xx 代表 Apache Web Server 版本 )
[root@localhost root]# tar zxvf apache_1.3.xx.tar ( xx 代表 Apache Web Server 版本 )
[root@localhost root]# cd apache_1.3.xx
[root@localhost apache_1.3.xx]# ./congifure \
> --prefix=/usr/local/apache/ \ ( 设定所想要安装的目录是/usr/local/apache/ )
> --enable-module=all \
> --enable-rule=SHARE_CORE
[root@localhost apache_1.3.xx]# make clean ; make ; make install
完成了以上步骤之后,基本上己经完成了 Apache Web Server 的安装。

II. 安装 JDK ( Java Development Kits )
依照下列步骤来完成 JDK 的完装:
[root@localhost root]# gunzip jdk1_2_2rc2-linux-i386.tar.gz
[root@localhost root]# tar zxvf jdk1_2_2rc2-linux-i386.tar
[root@localhost root]# mv jdk1.2.2 /usr/local/jdk122
完成上述步骤后,还需要进行环境设定:
[root@localhost root]# vi .bash_profile
...
...
JAVA_HOME=/usr/local/jdk122
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=/usr/local/jdk122/lib/tools.jar:.
export JAVA_HOME
export PATH CLASSPATH
★请注意:如果使用的是 JDK 1.1.x 版本,你的 CLASSPATH 必须设定如下:
CLASSPATH=/path/to/your/jdk/lib/classes.zip:.

III. 安装 JSDK
★请注意:如果使用的是 Java Apache RPM 版本,请跳过此节。
必须先取得并安装 JSDK ( Java Servlet Development Kits ),才能使 Java Apache 进行运作。但事实上,我们所需要的,只是 JSDK 中的一小部份 ( 一个叫 jsdk.jar 或是 servlet.jar 的档案 );现在所要做的,就是取得这个档案,并且将这个档案设定到 CLASSPATH 中:
CLASSPATH=/path/to/jsdk/lib/jsdk.jar:$CLASSPATH
export CLASSPATH

IV. 安装 Java Apache
. 使用 RPM
如果你是使用 RPM 套件,在你取得 Java Apache 套件之后,只需要输入以下命令即可完成安装:
[root@localhost root]# rpm -ivh ApacheJServ-1.1-b2.i386.rpm
a. 使用 SOURCE
如果你使用的是 Java Apache 的 Source,那么你必需对 Source 进行编译并且加以安装:
[root@localhost root]# tar zxvf ApacheJServ-1.1.tar.gz
[root@localhost root]# cd ApacheJserv-1.1
[root@localhost ApacheJserv-1.1]# ./congifure \
> --prefix=/usr/local/jsdk/ \ ( 设定你所想要安装的目录 )
> --with-apxs=/usr/local/apache/bin/apxs \( apache apxs 所在完整路径 )
> --with-jdk-home=$JAVA_HOME \
> --with-java-platform=2 \ ( 设定你所使用的 JDK 版本;1 代表 JDK 1.1.x;2 代表 JDK 1.2.x )
> --with-JSDK=/usr/local/jsdk/lib/jsdk.jar
[root@localhost ApacheJserv-1.1]# make clean ; make ; make install
★请注意:请先往下阅读【Java Apach 测试】一节。

V. 安装 GNU JSP
在取得 GNU JSP 之后,请依照下列步骤进行安装:
[root@localhost root]# gunzip gnujsp_0_9_10.tar.gz
[root@localhost root]# tar zxvf gnujsp_0_9_10.tar
[root@localhost root]# mv gnujsp-0.9.10 /usr/local/gnujsp
[root@localhost root]# cd /home/httpd/servlets
[root@localhost servlets]# mkdir compiled
[root@localhost servlets]# chown nobody.nobody compiled

完成上述指令之后,我们还须要对几个档案进行设定:
1. /etc/httpd/conf/jserv/jserv.properties
[root@localhost root]# cd /etc/httpd/conf/jserv 如果使用的是 Apache Web Server 的 Source,那么必需对 Source 进行编译并且加以安装:
[root@localhost root]# gunzip apache_1.3.xx.tar.gz ( xx 代表 Apache Web Server 版本 )
[root@localhost root]# tar zxvf apache_1.3.xx.tar ( xx 代表 Apache Web Server 版本 )
[root@localhost root]# cd apache_1.3.xx
[root@localhost apache_1.3.xx]# ./congifure \
> --prefix=/usr/local/apache/ \ ( 设定所想要安装的目录是/usr/local/apache/ )
> --enable-module=all \
> --enable-rule=SHARE_CORE
[root@localhost apache_1.3.xx]# make clean ; make ; make install
完成了以上步骤之后,基本上己经完成了 Apache Web Server 的安装。

II. 安装 JDK ( Java Development Kits )
依照下列步骤来完成 JDK 的完装:
[root@localhost root]# gunzip jdk1_2_2rc2-linux-i386.tar.gz
[root@localhost root]# tar zxvf jdk1_2_2rc2-linux-i386.tar
[root@localhost root]# mv jdk1.2.2 /usr/local/jdk122
完成上述步骤后,还需要进行环境设定:
[root@localhost root]# vi .bash_profile
...
...
JAVA_HOME=/usr/local/jdk122
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=/usr/local/jdk122/lib/tools.jar:.
export JAVA_HOME
export PATH CLASSPATH
★请注意:如果使用的是 JDK 1.1.x 版本,你的 CLASSPATH 必须设定如下:
CLASSPATH=/path/to/your/jdk/lib/classes.zip:.

III. 安装 JSDK
★请注意:如果使用的是 Java Apache RPM 版本,请跳过此节。
必须先取得并安装 JSDK ( Java Servlet Development Kits ),才能使 Java Apache 进行运作。但事实上,我们所需要的,只是 JSDK 中的一小部份 ( 一个叫 jsdk.jar 或是 servlet.jar 的档案 );现在所要做的,就是取得这个档案,并且将这个档案设定到 CLASSPATH 中:
CLASSPATH=/path/to/jsdk/lib/jsdk.jar:$CLASSPATH
export CLASSPATH

IV. 安装 Java Apache
. 使用 RPM
如果你是使用 RPM 套件,在你取得 Java Apache 套件之后,只需要输入以下命令即可完成安装:
[root@localhost root]# rpm -ivh ApacheJServ-1.1-b2.i386.rpm
a. 使用 SOURCE
如果你使用的是 Java Apache 的 Source,那么你必需对 Source 进行编译并且加以安装:
[root@localhost root]# tar zxvf ApacheJServ-1.1.tar.gz
[root@localhost root]


Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1268
29
C# Tutorial
1243
24
How to set the cgi directory in apache How to set the cgi directory in apache Apr 13, 2025 pm 01:18 PM

To set up a CGI directory in Apache, you need to perform the following steps: Create a CGI directory such as "cgi-bin", and grant Apache write permissions. Add the "ScriptAlias" directive block in the Apache configuration file to map the CGI directory to the "/cgi-bin" URL. Restart Apache.

How to connect to the database of apache How to connect to the database of apache Apr 13, 2025 pm 01:03 PM

Apache connects to a database requires the following steps: Install the database driver. Configure the web.xml file to create a connection pool. Create a JDBC data source and specify the connection settings. Use the JDBC API to access the database from Java code, including getting connections, creating statements, binding parameters, executing queries or updates, and processing results.

What to do if the apache80 port is occupied What to do if the apache80 port is occupied Apr 13, 2025 pm 01:24 PM

When the Apache 80 port is occupied, the solution is as follows: find out the process that occupies the port and close it. Check the firewall settings to make sure Apache is not blocked. If the above method does not work, please reconfigure Apache to use a different port. Restart the Apache service.

How to view your apache version How to view your apache version Apr 13, 2025 pm 01:15 PM

There are 3 ways to view the version on the Apache server: via the command line (apachectl -v or apache2ctl -v), check the server status page (http://<server IP or domain name>/server-status), or view the Apache configuration file (ServerVersion: Apache/<version number>).

How to view the apache version How to view the apache version Apr 13, 2025 pm 01:00 PM

How to view the Apache version? Start the Apache server: Use sudo service apache2 start to start the server. View version number: Use one of the following methods to view version: Command line: Run the apache2 -v command. Server Status Page: Access the default port of the Apache server (usually 80) in a web browser, and the version information is displayed at the bottom of the page.

How to configure zend for apache How to configure zend for apache Apr 13, 2025 pm 12:57 PM

How to configure Zend in Apache? The steps to configure Zend Framework in an Apache Web Server are as follows: Install Zend Framework and extract it into the Web Server directory. Create a .htaccess file. Create the Zend application directory and add the index.php file. Configure the Zend application (application.ini). Restart the Apache Web server.

How to solve the problem that apache cannot be started How to solve the problem that apache cannot be started Apr 13, 2025 pm 01:21 PM

Apache cannot start because the following reasons may be: Configuration file syntax error. Conflict with other application ports. Permissions issue. Out of memory. Process deadlock. Daemon failure. SELinux permissions issues. Firewall problem. Software conflict.

How to delete more than server names of apache How to delete more than server names of apache Apr 13, 2025 pm 01:09 PM

To delete an extra ServerName directive from Apache, you can take the following steps: Identify and delete the extra ServerName directive. Restart Apache to make the changes take effect. Check the configuration file to verify changes. Test the server to make sure the problem is resolved.

See all articles