Sep 13

[原]在linux上运行ASP 晴

linuxing , 11:21 , 编程 » ASP , 评论(9) , 引用(0) , 阅读(52767) , Via 本站原创 | |

三、安装iASP 2.1.1
正如前面提到的,负责iASP开发公司的网站已经上不去了。下面提供下载地址:

1、解压
# mkdir iASP_dir
# tar xzvf iASP2.1.01.tar.gz -C iASP_dir/
iasp21.tar
install.sh
README

2、安装
# cd iASP_dir/
# ./install.sh

输入上述java环境的目录:
引用
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/java/j2re1.4.2/bin

输入iasp的安装路径:
引用
Enter the absolute directory under which Instant ASP should be installed.
(./iasp21 will be created underneath.)
> /usr/iasp
Directory /usr/iasp does not exist,  create it (Y/N/Q)?
> y

※目录的最后都不要加“/”符号
对Web服务器进行配置,这里用得是Apache 2.0版本:
引用
Would you like to configure your web server for Instant ASP now [Y/N]?y
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 <iASP_Home>/bin/apache/source/readme.txt

Enter a number [0-10]: 12

Please enter the path to the Apache /conf directory >/etc/httpd/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/

结果:
引用
Server Information:

iASP Path:          /usr/iasp/iasp21
iASP Version:       2.1.01
OS Name:            Linux  2.6.9-42.7AXsmp
Host IP:            192.168.228.250
Java Path:          /usr/java/j2re1.4.2_15
Java Version:       1.4.2_15
Java Vendor:        Sun Microsystems Inc.
iASP License:       No License

3、配置
如果这个使用启动Apache,会报错:
引用
# service httpd start
启动 httpd:httpd: module "mod_iasp.c" is not compatible with this version of Apache (found 20020329, need 20020903).
Please contact the vendor for the correct version.
                                                          [失败]

这是由于iasp自带的模块是基于20020329的Apache版本编译的。所以加载失败。我们需要手动的为当前版本配置一个新模块:
# cd /usr/iasp/iasp21/bin/apache/source/2.0/
# apxs -i -c *.c

新生成的模块放在:
引用
/usr/lib/httpd/modules/mod_iasp.so

修改/etc/httpd/conf/httpd.conf文件为:
引用
#LoadModule iasp_module "/usr/iasp/iasp21/bin/apache/linux/2.0/mod_iasp.so"
LoadModule iasp_module "/usr/lib/httpd/modules/mod_iasp.so"

启动Apache即可:
# service httpd start
引用
启动 httpd:                                    [  确定  ]

4、启动
启动iasp代理模块:
引用
# /usr/iasp/iasp21/start-server.sh &
logging to stdout
iASP/2.1.01 started
[1] 13846

监听端口:
引用
# netstat -ln&#124;grep 9098
tcp        0      0 :::9098                     :::*                        LISTEN

停止:
引用
# /usr/iasp/iasp21/stop-server.sh
iASP server stopped

四、测试ASP在Linux上的运行
1、创建asp源代码
在/var/www/html/目录下创建一个test.asp文件:
引用
<html>

<head>
<title>Test iASP</title>
</head>

<body>
<%
Response.Write "<BR><h1>Congradulations!<BR>Instant ASP has worked for you!</h1>"
%>
</body>
</html>

2、查看结果
点击在新窗口中浏览此图片
可以看到,ASP代码可直接运行在Linux的Apache环境中。
接下来,您可以修改httpd.conf中的配置,增加虚拟主机、虚拟目录、默认字符集、默认index.asp文件等Apache功能,以实现更多元化的工作。甚至在一台服务器上同时运行php和asp模块也是没有问题的。
除了简单的ASP代码外,接下来要做的,就是连接数据库的事情。
内文分页: [1] [2]
Tags: ,
阿尼
2010/08/24 13:48
Iasp有时间限制的啊?怎么办啊,急!
linuxing 回复于 2010/08/24 17:43
原开发公司早倒闭了,没有办法。
houston
2009/09/19 00:35
启动 httpd:httpd: Syntax error on line 206 of /etc/httpd/conf/httpd.conf: Cannot load /usr/lib/httpd/modules/mod_iasp.so into server: /usr/lib/httpd/modules/mod_iasp.so: undefined symbol: ap_http_method

我也出现这个问题
linuxing 回复于 2009/09/21 10:40
您使用的是哪个操作系统版本?我原测试的环境是,红旗 DC Server 5.0,相当于Centos 4.0,或者找个相同的环境试试吧。
新手
2009/09/15 19:48
启动 httpd:httpd: Syntax error on line 206 of /etc/httpd/conf/httpd.conf: Cannot load /usr/lib/httpd/modules/mod_iasp.so into server: /usr/lib/httpd/modules/mod_iasp.so: undefined symbol: ap_http_method
linuxing 回复于 2009/09/16 11:04
重新编译mod_iasp.so模块了吗?请参考文章第二页中:
# cd /usr/iasp/iasp21/bin/apache/source/2.0/
# apxs -i -c *.c
keen Email
2009/04/10 00:01
你这个上面提供的iasp市永久使用的,还是需要license的啊?功能是否有限制?因为一直找这样的解决方案,除了修改数据库的连接,程序里面是否需要做一些修改呢?和IIS相比,是否更加安全,快加快速呢?因为我想把我们公司的网站迁移到linux!!
linuxing 回复于 2009/04/11 11:22
该版本应该是测试版,有用户数的限制的,开发的公司已经倒闭,估计很难找到正式license了。
对比IIS,Apache可靠性和安全性确实好些,但更多的还需要考虑实际管理的操作。我这里仅是提供了一个或许可行的版本,但测试的应用都是比较简单的,不一定能满足大网站的全部要求,对于想完全迁移到Linux系统的应用来说,我更建议该为跨平台的架构,如jsp、php等。
Tommy
2008/07/25 09:33
我按您的指导操作到了 修改LoadModule iasp_module "/usr/lib/httpd/modules/mod_iasp.so" 后,还是无法启动httpd.请帮忙帮到底。
linuxing 回复于 2009/04/11 11:17
请提供您启动httpd服务的日志报错信息。
o
2008/05/21 17:21
哪里有iasp license呀。还有就是iasp不支持中文内容的提交
linuxing 回复于 2008/05/22 09:26
iasp的公司已经倒闭了,以前国内的代理现也没法连接上咯。
另外,iasp可以支持中文内容提交的,你可以看看另外两篇文章,连接mysql和mssql数据库。但这是特例,和java环境有关。
呵呵 Email
2008/04/24 11:07
没有apxs这个命令 为什么啊    能告诉我一下吗
linuxing 回复于 2008/04/25 15:18
这是httpd-devel带的一个命令,估计你是没有安装这个开发包的原因。装上就有了。
# rpm -qf /usr/sbin/apxs
httpd-devel-2.0.52-12.ent.2AX
iammecn Homepage
2008/01/07 15:31
不错,很详细.
ossplus Homepage
2007/10/05 20:05
Linux下用asp只能是有胜于无吧,呵呵。


江苏linux
linuxing 回复于 2007/10/07 21:37
也不是的。可能这是大部分人认为的情况,但经过实际的测试,效果还是不错的。只是不能做到百分百迁移,而与Mysql的结合,效率相当不错的。
下面这个留言版就是一个案例:
http://guestbook.linuxfly.org
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]