RedHat 9.0+Apache+Tomcat+Sybase组建WEB服务器
大家常在网上看过用Linux+Apache+Mysql+Php组建Web服务器,但很少人用RedHat 9.0+Apache+Tomcat+Sybase组建WEB服务器,今天小弟就用它来构建一次,让大家也开阔一下思维,其实也很简单.只需要以下几个东东:如果大家在装RedHat时已经装上了Apache.那就不用下载了.可我没有下载.就照我的做了.
所需软件包: jdk-1.2.2-RC4-linux-i386-glibc-2.1.2.sh+ apache1.3.26+tomcat3.1.1+
mod_jserv.so+Sybase12.5.0.1.
下载下列软件包放在/root/下:
Apache1.3.26:http:// web.nyist.net/~mayujun/download/jx_soft/apache_1.3.26.tar.gz
Tomcat3.1.1:http://Jakarta.apache.org/builds/Jakarta-tomcat/release/v3.1.1/bin/jakarta-tomcat-3.1.1.tar.gz
Mod_jserv.so:http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.1.1/bin/linux/i386/mod_jserv.so
jdk-1.2.2-RC4-linux-i386-glibc-2.1.2.sh :http://www.redflag-linux.com:8090/source/download/44/jdk-1.2.2-RC4-linux-i386-glibc-2.1.2.sh
Sybase12.5.0.1包: Sybase-common-12.5.0.1DE-1.i386.rpm:http://download.Sybase.com/eval/ASE_dev_linux/Sybase-common-12.5.0.1DE-1.i386.rpm
Sybase-ase-12.5.0.1ESD-1.i386.rpm:http://download.Sybase.com/eval/ASE_dev_linux/Sybase-ase-12.5.0.1ESD-1.i386.rpm
Sybase-efts-12.5.0.1ESD-1.i386.rpm:http://download.Sybase.com/eval/ASE_dev_linux/ Sybase-efts-12.5.0.1ESD-1.i386.rpm
Sybase-esql-12.5.0.1ESD-1.i386.rpm:http://download.Sybase.com/eval/ASE_dev_linux/ Sybase-ests-12.5.0.1ESD-1.i386.rpm
Sybase-openclient-12.5.0.1ESD-1.i386.rpm:http://download.Sybase.com/eval/ASE_dev_linux/ Sybase-openclient-12.5.0.1ESD-1.i386.rpm
Sybase-sqlremote-7.0.2-1.i386.rpm:http://download.Sybase.com/eval/ase12.5/linux/RPMS/Sybase-sqlremote-7.0.2-1.i386.rpm
Sybase-chinese-12.5.0.1-1.i386.rpm:http://download.Sybase.com/eval/ASE_dev_linux/Sybase-chinese-12.5.0.1-1.i386.rpm
安装规划:
apache安装在/usr/local/apache
tomcat安装在/usr/local/jakarta-tomcat
jdk安装在/usr/local/jdk
sybase安装在/usr/local/Sybase
安装jdk
#cp /root/jdk-1.2.2-RC4-linux-i386-glibc-2.1.2.sh /usr/local/
#cd /usr/local
#sh jdk-1.2.2-RC4-linux-i386-glibc-2.1.2.sh
#cd jdk1.2.2
# ln -s jdk1.2.2 jdk
# ln -s jdk/jre jre
# vi /root/.bash_profile
添加如下行到/root/.bash_profile
JAVA_HOME=/usr/local/jdk
export JAVA_HOME
CLASSPATH=/usr/local/jdk/lib:/usr/local/jre/lib
export CLASSPATH
PATH=$PATH:/usr/local/jdk/bin:/usr/local/jre/bin
保存并退出
JDK的安装到此结束.
安装sybase:
#cp /root/Sybase* /usr/local/sybase
#cd /usr/local/sybase
#rpm --prefix=/usr/local/Sybase/ -hiv sybase-common-12.5.0.1DE-1.i386.rpm
#rpm --prefix=/usr/local/Sybase/ -hiv sybase-ase-12.5.0.1ESD-1.i386.rpm
#rpm --prefix=/usr/local/Sybase/ -hiv sybase-efts-12.5.0.1ESD-1.i386.rpm
#rpm --prefix=/usr/local/Sybase/ -hiv sybase-esql-12.5.0.1ESD-1.i386.rpm
#rpm --prefix=/usr/local/Sybase/ -hiv sybase-openclient-12.5.0.1ESD-1.i386.rpm
#rpm --prefix=/usr/local/Sybase/ -hiv sybase-sqlremote-7.0.2-1.i386.rpm
#rpm --prefix=/usr/local/Sybase/ -hiv sybase-chinese-12.5.0.1-1.i386.rpm
到此,完成了sybase组件的安装,需要进行数据库创建和必要的配置才能运行
设置目录文件的权限
#chown -R sybase /usr/local/sybase
#chgrp -R sybase /usr/local/sybase
设置sybase用户口令
#passwd sybase
退出系统,用sybase用户登录,系统会给一个提示,选择n并回车;
创建sybase数据库文件存在的目录
#mkdir /usr/local/Sybase/data
在/usr/local/sybase/bin目录中创建数据库创建和运行需要的两个文件
编辑srvbuild.adaptive_server.rs和srvbuild.backup_server.rs文件
srvbuild.adaptive_server.rs文件范例如下:
sybinit.release_directory: /usr/local/sybase
sybinit.product: sqlsrv
sqlsrv.server_name: kevin_sybase (此处设置为你想使用的sybase数据库服务名)
sqlsrv.new_config: yes
sqlsrv.do_add_server: yes
sqlsrv.network_protocol_list: tcp
sqlsrv.network_hostname_list: 192.168.18.19(此处设置为您的服务器ip地址)
sqlsrv.network_port_list: 4000(sybase数据库使用的端口)
sqlsrv.master_device_physical_name: /usr/local/sybase/data/master.dat
sqlsrv.master_device_size: USE_DEFAULT
sqlsrv.master_database_size: USE_DEFAULT
sqlsrv.errorlog: USE_DEFAULT
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name:
/usr/local/sybase/data/sybsystem.dat
sqlsrv.sybsystemprocs_device_size: USE_DEFAULT
sqlsrv.sybsystemprocs_database_size: USE_DEFAULT
sqlsrv.sybsystemdb_device_physical_name:
/usr/local/sybase/data/sybsystemdb.dat
sqlsrv.sybsystemdb_device_size: USE_DEFAULT
sqlsrv.sybsystemdb_database_size: USE_DEFAULT
sqlsrv.default_backup_server:
kevin_sybase_bk(此处设置为您的sybase数据库对应的backup服务名)
srvbuild.backup_server.rs文件范例如下:
sybinit.release_directory: /sybase
sybinit.product: bsrv
bsrv.server_name: kevin_sybase_bk(此处设置为在上门设置的backup服务名)
bsrv.do_add_backup_server: yes
bsrv.network_protocol_list: tcp
bsrv.network_hostname_list: 192.168.18.19(服务器的ip地址)
bsrv.network_port_list: 4100(sybase备份服务器使用的端口)
bsrv.language: USE_DEFAULT
bsrv.character_set: USE_DEFAULT
bsrv.tape_config_file: USE_DEFAULT
bsrv.errorlog: USE_DEFAULT
创建数据库(当前用户仍然是sybase)
#cd /usr/local/sybase/bin
#./srvbuild -r ./srvbuild.adaptive_server.rs
#./srvbuild -r ./srvbuild.backup_server.rs
运行完成后,将会在/usr/local/sybase/install目录中生成两个新文件RUN_kevin_sybase和RUN_kevin_sybase_bk
&n