选择显示字体大小

配置sun one web server支持jsp,php,cgi

前言:

目前在linux系统上,存在两个最强的web服务器,一个是apache一个就是,sun的sun one web server,在网络上最apache的各种应用
写的比较多,但是sun one web server 则比较少,今日闲来无事,便写了一个简单的配置教程

所需软件(因为软件较大无法提供本地下载)

1,sun one web server 6.1

下载地址

http://wwws.sun.com/software/download/products/3f4f998d.html,在sun的主页上,是oem版,60多m下载需要注册

2,php 4.3.6

x下载地址
http://cn.php.net/get/php-4.3.6.tar.bz2/from/a/mirror

首先安装sun one web server ,解压缩sun-webserver61-rh72.tar.gz这个软件包,到一个目录里,例如sun,然后运行安装程序

cd /sun
tar -zxf sun-webserver61-rh72.tar.gz
./setup

以root进行安装

过程如下,基本安默认安装就行

would you like to continue with installation? [yes]: 回车
do you agree to the license terms? [no]:yes

choose an installation type:

1. express installation
allows you to quickly install the servers using the most
common options and pre-defined defaults. useful for quick
evaluation of the products.

2. typical installation
allows you to specify common defaults and options.

3. custom installation
allows you to specify more advanced options. this is
recommended for experienced server administrators only.

to accept the default shown in brackets, press the enter key.

choose an installation type [2]: 回车(建议安典型安装)

install location [/opt/sunwwbsvr]:回车(默认安装目录)
sun one web server components:

components with a number in () contain additional subcomponents
which you can select using subsequent screens.

1. sun one web server, enterprise edition (2)


specify the components you wish to install [all]:回车(安装sun one web server, enterprise edition)

components with a number in () contain additional subcomponents
which you can select using subsequent screens.

1. server core
2. java development kit


specify the components you wish to install [1, 2]: 回车(安装代码和开发包)

to accept the default shown in brackets, press the enter key.

computer name [lee.(none)]:回车(设置域名,默认主机名)

system user [nobody]:回车(设置启动这个服务的用户)
system group [nobody]:回车(设置启动这个服务的用户组)
run web server administration server as [root]:回车(运行管理服务的用户)
web server admin server user name [admin]:回车(web管理员用户名)
web server admin server password:(密码)
web server admin server password (again):(确认密码)
web server admin server port [8888]:回车(web管理的端口)
web server port [80]:回车(运行web服务的端口一般是80,因为我的服务器装了apache,所以改成了88)
web server content root [/opt/sunwwbsvr/docs]:回车(网页根目录)
web server start on boot [yes]:回车(引导时启动)
然后会拷贝安装文件,一切顺利,就会安装完毕。

因为sun one web server本身支持jsp,所以不用配置。
下面介绍如何,配置cgiphp

首先配置cgi

cd /opt/sunwwbsvr/https-lee/config
进入虚拟服务器的配置目录
vi obj.conf
打开配置文件,并加入如下内容
在的下面加入
service fn=\"send-cgi\" type=\"magnus-internal/cgi\" user=\"$user\" group=\"$group\" dir=\"$dir\" chroot=\"$chroot\" nice=\"$nice\"

在文件最后加入

objecttype fn=\"force-type\" type=\"magnus-internal/cgi\"
service fn=\"send-cgi\" user=\"$user\" group=\"$group\" dir=\"$dir\" chroot=\"$chroot\" nice=\"$nice\"

如果这段有,就不必加入了

然后运行
cd /opt/sunwwbsvr/https-lee
./restart重启动服务器
这样在sun one web server就能运行cgi程序了,sun one web server本身是支持cgi的,这段配置是将cgi功能打开

配置php

首先加压缩软件包
tar -jxf php-4.3.6.tar.bz2
cd php-4.3.6
./configure --with-nsapi=/opt/sunwwbsvr --with-mysql=/usr/local/mysql 第一个参数是创建一个sun one的nsapi插件第二个参数是让php在sun one支持mysql

make

因为我已经安装了php,所以并没有运行make install 进行安装以避免以前的php配置,如果您没有安装php轻运行make install 进行安装

make完毕后在php-4.3.6/libs中会有一个libphp4.so这个文件就是我们要的nsapi插件
将这个文件拷贝到/opt/sunwwbsvr/bin
cp libphp4.so /opt/sunwwbsvr/bin
这样,插件已经制作完成
最后将php-4.3.6目录下的php.ini-dist拷贝到/etc下并改名php.ini
cp php-4.3.6/php.ini-dist /etc/php.ini
下面开始配置sun one web server

cd /opt/sunwwbsvr/https-lee/config
vi obj.conf
在的下面加入
service fn=\"php4_execute\" type=\"magnus-internal/x-httpd-php\"

并在文件末尾加入

objecttype fn=\"force-type\" type=\"magnus-internal/x-httpd-php\"
service fn=\"php4_execute\" [inikey=\"value\" inikey=\"value\" 4=\"...]\"

保存文件

然后打开 magnus.conf

vi magnus.conf
在文件末尾加入
init fn=\"load-modules\" funcs=\"php4_init,php4_execute,php4_auth_trans\" shlib=\"/opt/sunwwbsvr/bin/libphp4.so\"
init fn=\"php4_init\" errorstring=\"failed to initialize php!\" [php_ini=\"/etc/php.ini\"]
保存文件

打开mime.types
vi mime.types
在文件末尾加入
type=magnus-internal/x-httpd-php exts=php,php3
保存文件

最后
cd /opt/sunwwbsvr/https-lee
./restart重启动服务器


这样服务器基本配置完成

有些东西也可以使用web在线配置。
如果大家有 问题在一起讨论
http://www.leftworld.net/shequ/forums.cgi?forum=17
我提供给大家一个配置好的配置文件仅供参考。也可以拿来稍作修改,并使用.
地址:
http://www.leftworld.org/sun/sun.html
注意:
如果想要将此服务器进行应用请下载他的更新包sp1 sp2   


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons