(编辑:jimmy 日期: 2024/11/15 浏览:2)
作者:SOLARIS小兵
MAIL:solarisxb@hotmail.com
FROM:WWW.CHINAUNIX.NET
一、系统信息:
1、安装solaris8
solaris8 02/4(三张盘)
# uname -a
SunOS BJ-APP1 5.8 Generic_117350-15 sun4u sparc SUNW,Sun-Blade-1000
2、打补丁:
8_Recommended(149MB)
3、系统tcp优化:
修改系统参数/etc/system
set rlim_fd_cur=81920
set rlim_fd_max=81920
/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 2048
/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q0 8192
二、安装apache2软件:
1、安装系统软件:运行apache2软件需要如下软件包:
apache-2.0.52-sol8-sparc-local
libiconv-1.8-sol8-sparc-local
db-4.2.52.NC-sol8-sparc-local
libtool-1.5-sol8-sparc-local
expat-1.95.5-sol8-sparc-local
gcc-3.4.2-sol8-sparc-local
openssl-0.9.7e-sol8-sparc-local
gdb-6.0-sol8-sparc-local
gdbm-1.8.3-sol8-sparc-local
glib-2.2.3-sol8-sparc-local
libghttp-1.0.6-sol8-sparc-local
2、安装管理软件包:
top-3.5beta12-sol8-sparc3264-local
nmap-2.54BETA28-sol8-sparc-local
ssh-3.2.5.tar.gz
3、安装ssl临时证书:
ssl.ca-0.1.tar.gz
生成临时ssl的key。可以参考:http://dev.csdn.net/develop/article/33/33020.shtm
现在没有这个工具了,只能自己动手生成了,对证书不熟悉的人,有一个工具可以使用:http://www.openssl.org/contrib/ssl.ca-
0.1.tar.gz
# cd /usr/local/apache2/conf
# tar zxvf ssl.ca-0.1.tar.gz
# cd ssl.ca-0.1
# ./new-root-ca.sh (生成根证书)
No Root CA key round. Generating one
Generating RSA private key, 1024 bit long modulus
...........................++++++
....++++++
e is 65537 (0x10001)
Enter pass phrase for ca.key: (输入一个密码)
Verifying - Enter pass phrase for ca.key: (再输入一次密码)
......
Self-sign the root CA... (签署根证书)
Enter pass phrase for ca.key: (输入刚刚设置的密码)
........
........ (下面开始签署)
Country Name (2 letter code) [MY]:CN
State or Province Name (full name) [Perak]:JiangSu
Locality Name (eg, city) [Sitiawan]:NanJing
Organization Name (eg, company) [My Directory Sdn Bhd]:Wiscom System Co.,Ltd
Organizational Unit Name (eg, section) [Certification Services Division]:ACSTAR
Common Name (eg, MD Root CA) []:WISCOM CA
Email Address []:acmail@wiscom.com.cn
这样就生成了ca.key和ca.crt两个文件,下面还要为我们的服务器生成一个证书:
# ./new-server-cert.sh server (这个证书的名字是server)
......
......
Country Name (2 letter code) [MY]:CN
State or Province Name (full name) [Perak]:JiangSu
Locality Name (eg, city) [Sitiawan]:NanJing
Organization Name (eg, company) [My Directory Sdn Bhd]:Wiscom System Co.,Ltd
Organizational Unit Name (eg, section) [Secure Web Server]:ACSTAR
Common Name (eg, www.domain.com) []:acmail.wiscom.com.cn
Email Address []:acmail@wiscom.com.cn
这样就生成了server.csr和server.key这两个文件。
还需要签署一下才能使用的:
# ./sign-server-cert.sh server
CA signing: server.csr -> server.crt:
Using configuration from ca.config
Enter pass phrase for ./ca.key: (输入上面设置的根证书密码)
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'CN'
stateOrProvinceName :PRINTABLE:'JiangSu'
localityName :PRINTABLE:'NanJing'
organizationName :PRINTABLE:'Wiscom System Co.,Ltd'
organizationalUnitName:PRINTABLE:'ACSTAR'
commonName :PRINTABLE:'acmail.wiscom.com.cn'
emailAddress :IA5STRING:'acmail@wiscom.com.cn'
Certificate is to be certified until Jul 16 12:55:34 2005 GMT (365 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
CA verifying: server.crt <-> CA cert
server.crt: OK
(如果这里出现错误,最好重新来过,删除ssl.ca-0.1这个目录,从解压缩处重新开始。)
下面要按照ssl.conf里面的设置,将证书放在适当的位置。
# chmod 400 server.key
# cd ..
# mkdir ssl.key
# mv ssl.ca-0.1/server.key ssl.key
# mkdir ssl.crt
# mv ssl.ca-0.1/server.crt ssl.crt
然后就可以启动啦!
# cd /usr/local/apache2
# ./bin/apachectl startssl
4、安装weblogic 软件:weblogic 813
重要声明:weblogic 812以前的版本不支持ssl 128位加密,只有weblogic 813以后的版本支持ssl 128位加密
安装bea软件:server813_solaris32.bin
创建server:
/export/home/bea/weblogic81/common/bin/config.sh
三、整合apache2和weblogic813
1、修改apache2配置文件httpd.conf
修改启动组:Group nobody
ServerName 192.0.0.188
2、拷贝so文件:
cd /usr/local/apache2/modules
cp /export/home/bea/weblogic81/server/lib/solaris/mod_wl128_20.so .
vi httpd.conf
LoadModule weblogic_module modules/mod_wl128_20.so
#<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
#</IfDefine>
3、添加weblogic连接文件:
<Location />
SetHandler weblogic-handler
</Location>
<IfModule mod_weblogic.c>
WebLogicHost 127.0.0.1
WebLogicPort 7001
MatchExpression *.jsp
ConnectTimeoutSecs 60
</IfModule>
4、配置域名解析
vi /etc/resolv.conf
nameserver 211.94.69.34
vi /etc/nsswitch.conf
hosts: files dns
备注:
报错信息:start: .[Tue Mar 01 21:15:30 2005] [crit] [Tue Mar 01 21:15:30 2005] file vhost.c, line 189, assertion "rv ==
APR_SUCCESS" failed
解决方法:把/etc/resolv.conf和/etc/nsswitch.conf做了相应的改动后,就ok了
5、添加证书:配置ssl证书:我们买的是verisign的128位ssl证书。
vi ssl.conf
#SSLCertificateFile /usr/local/apache2/public.crt
#SSLCertificateKeyFile /usr/local/apache2/private.key
#SSLCertificateChainFile /usr/local/apache2/intermediate.crt
四、DB2数据库客户端安装:
1、安装db2数据库for solaris 64为客户端:
修改系统参数/etc/system
set msgsys:msginfo_msgmax = 65535
set msgsys:msginfo_msgmnb = 65535
set msgsys:msginfo_msgssz = 32
set msgsys:msginfo_msgseg = 32767
set msgsys:msginfo_msgmap = 2562
set msgsys:msginfo_msgmni = 2560
set msgsys:msginfo_msgtql = 2560
set semsys:seminfo_semmap = 3074
set semsys:seminfo_semmni = 3072
set semsys:seminfo_semmns = 6452
set semsys:seminfo_semmnu = 3072
set semsys:seminfo_semume = 600
set shmsys:shminfo_shmmax = 2134020096
set shmsys:shminfo_shmmni = 3072
set shmsys:shminfo_shmseg = 600
2、数据库客户端安装:
/soft/076_ADCL_SUN_3264_NLV/adcl/db2setup
注意:选择32位的客户端就可以!
1、db2 catalog tcpip node dbnode remote 192.0.0.160 server 50001
db2 terminate
db2 catalog database mbidb2 as mbidb2 at node dbnode
db2 terminate
2、 db2连接
db2 connect to mbidb21 user db2inst1 using password
3、db2客户端问题解决:
db2set DB2CODEPAGE=1383
报错问题解决:
$ db2 connect to mbidb26 user db2inst1 using password
SQL0 2N There is no available conversion for the source code page "1383" to
the target code page "819". Reason Code "1". SQLSTATE=57017
$
解决方法:
db2set DB2CODEPAGE=1383
备注:有错之处希望大家指正!