Ubuntu10.04安装iasp攻略(让你的ASP运行于Apache 2.0.59 )

来源:互联网 发布:猎场三观 知乎 编辑:程序博客网 时间:2024/05/22 07:39
Ubuntu 10.04安装iasp攻略(让你的ASP运行于Apache 2.0.59 )。

一 安装apache2

下载地址在Linux公社FTP里
FTP地址:ftp://www.6688.cc/

用户名:www.linuxidc.net



密码:www.6688.cc

在2010年LinuxIDC.com\11月\Ubuntu 10.04安装iasp攻略(让你的ASP运行于Apache 2.0.59 )\

--------------------------------------------------------

过程如下:
sudo ./configure --prefix=/usr/local/apache2
sudo make
sudo make install

运行
sudo /usr/local/apache2/bin/apachectl start //成功了!
浏览器浏览“http://127.0.0.1“,显示的页面中有“您能看见这个页面,说明Apache web server 已经安装成功。”的提示,成功了!
(这个页面在/usr/local/apache2/htdocs,可用其他的替换)

注意:1、我是用apache2.0.59 这个版本,其他高版本的也试过,不成功.
2、不要用apt-get或aptitude 下载安装apache2
3、重启Apache时(sudo /etc/init.d/apache2 restart)可能遇到的问题:
Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName:
解决方法:
vi /etc/apache2/httpd.conf
添加行:ServerName localhost二 安装java JDK
直接用apt-get 安装
sudo apt-get install sun-java6-jre sun-java6-jdk

注意:
Ubuntu 10.04 中去掉sun-java6-jdk 和sun-java6-jre的软件包,ubuntu官方建议安装openjdk-6-jre-headless以取代 sun-java6-jre ,但仍可以继续使用 sun-java6-jre。


进入下,sudo gedit /etc/apt/sources.list,将
#deb http://archive.canonical.com/Ubuntu lucid partner
#deb-src http://archive.canonical.com/Ubuntu lucid partner的注示“#”去掉,
执行sudo apt-get update,两个需要的资源已在获取列表中,OK,再来执行
sudo apt-get install sun-java6-jre sun-java6-jdk;



三 安装iASP2.1
从网上下载“iASP2.1.01.tar.gz”压缩包
下载地址为: http://download.csdn.net/source/2804444
解压缩到“/home”目录,得到文件夹 “iASP2.1“,有三个文件:iasp21.tar、install.sh、readme。

sudo ./install.sh
过程如下:

***********************************************************************
* Instant ASP(tm)2.1.01 Enterprise Edition Install *
* *
* Instant ASP(tm)2.1.01 requires Java Development Kit(preferably the *
* latest version for your operating system)for its operation.Zeus and *
* SWS Beta users may skip the following step. *
***********************************************************************

i686

Please enter the full path to your JDK's bin directory.
e.g. /usr/jdk1.1.6/bin, Q/q(quit), S/s(skip):
>

(输入了我前面找到的/usr/lib/jvm/java-6-sun-1.6.0.22/bin)

Enter the absolute directory under which Instant ASP should be installed.
(./iasp21 will be created underneath.)
>

(输入安装“iasp”的目录
/usr/local
这样程序会在此目录中自动建一个“iasp21“的目录,程序就被安装到了这里)

接着提示安装结束,并询问是否配置web服务器。输入“n“,结束安装。

安装过程可谓是一帆风顺,接下来开始配置iasp。

sudo /usr/local/apache2/bin/apachectl stop //停止apache2服务。

接着进入iasp的安装目录“/usr/local/iasp21“,

connector.sh是配置程序
stop-server.sh是启动iasp服务
start-server.sh是停止iasp服务
start-admin.sh是开启远程管理
stop-admin.ah是关闭远程管理。

我运行sudo ./connector.sh”,开始iasp提供的web服务器配置,过程如下:

*************************************************************************

Welcome to Instant ASP connection wizard. This wizard will
allow you to configure Instant ASP for one or more web servers.
Copyright 1998-2001 Halcyon Software, Inc.

*************************************************************************


Do you want to continue (Y/N)? (输入“y“)


Please choose a servlet interface
[1] Instant ASP native servlet interface
[2] Apache JServ

Enter a number [1/2]: (输入“1”)

***** Please select a web server *****

[1] Netscape
[2] Apache
[3] Xitami
[0] Quit

Enter a number [0-4]: (输入“2”)

***** Please choice Apache version *****

[1] Apache 1.3.0
[2] Apache 1.3.1
[3] Apache 1.3.2
[4] Apache 1.3.3
[5] Apache 1.3.4
[6] Apache 1.3.6
[7] Apache 1.3.9
[8] Apache 1.3.11
[9] Apache 1.3.12
[10] Apache 1.3.14
[11] Apache 1.3.2X
[12] Apache 2.X
[0] Quit

Note: If you are using Apache Web Server higher version or have additional
modules, such as Front Page Server Extensions, Raven SSL, or you are

using Apache Strong Hold Server. Please configure iASP according

to /bin/apache/source/readme.txt

Enter a number [0-10]:(输入“12”)

Please enter the path to the Apache /conf directory >
输入apache2的配置文件“httpd.conf“所在目录,

/usr/local/apache2/conf

setting for "Proxy host IP address" <127.0.0.1> (直接回车)
setting for "Proxy port" <9098> (直接回车)
setting for "Server manager port" <9095>(直接回车)

"httpd.conf"configuration completed.

Would you like to configure another web server (Y/N)?(输入n)

Configuration successful.
You can access the Instant ASP documentation and samples
from the virtual directory /iasp/

看起来一切顺利。
我马上运行“sudo /usr/local/apache2/bin/apachectl start “

apache2启动不了!出错提示什么mod_iasp.c is not compatible with this version of Apache (found 20020329,need 20020903),

在“/usr/local/iasp21/bin/apache/source/2.0“找到mod_iasp.c

cd /usr/local/iasp21/bin/apache/source/2.0

重新执行“
sudo /usr/local/apache2/bin/apxs -i -c *.c

成功!
看看编译成功的提示,输出的文件原来并没有放到什么 libexec目录,而是放到了apache2的modules目录中,打开一看,果然在那儿呢!这回我想应该没问题了!马上运行

sudo gedit /usr/local/apache2/conf/httpd.conf


LoadModule iasp_module "/usr/local/iasp21/bin/apache/linux/2.0/mod_iasp.so
这句改成了
/usr/local/apache2/modules/mod_iasp.so

保存。
sudo /usr/local/apache2/bin/apachectl start
再进入“/usr/local/iasp21”,运行

./start-server.sh


输入: http://127.0.0.1/iasp 可查看例子,也可以将asp文件放入/usr/local/apache2/htdocs中,输入: http://127.0.0.1/文件名


后来又发现一个问题,就是我的ASP只能运行一会儿,然后就出现服务无法连接的提示,好像是iasp运行一会儿就停止了。经检查,是因为我在终端中运行的iasp,把终端窗口关了,iasp服务就停止了。我后来在桌面创建了一个到“/usr/local/iasp/start- server.sh“的启动器,通过它来启动就没有问题了。


写在最后:写完这篇笔记之后,发现在apache2.2以上的版本也可以支持iasp.不过要修改源文件。而且稳定性不好.

0 0
原创粉丝点击