一、準備工作
調整內核參數
如果你的FreeBSD是缺省安裝的,為了在FreeBSD下運行Sybase11.0.3.3,那么很可能你要重新編譯自己的內核。這是因為缺省情況下,核心提供給Linux使用的最大內存空間不能滿足運行Sybase的需要。筆者在安裝過程中發現,配置完SQL Server后,服務器無法啟動,于是查看了安裝日志(見例1):
00:2001/01/08 09:41:28.02 kernel Max fd 1064 exceeds internal limit of 1024
00:2001/01/08 09:41:28.18 kernel Using config area from primary master device.
00:2001/01/08 09:41:28.18 kernel Configuration Error: Configuration file, @#/usr/opt/sybase/sybase/SYBASE.cfg@#,does not exist.
00:2001/01/08 09:41:28.19 kernel Warning: A configuration file was not specified and the default file @#/usr/opt/sybase/sybase/SYBASE.cfg@# does not exist. SQL Server creates the default file with the default configuration.
00:2001/01/08 09:41:28.19 kernel os_create_region: can@#t allocate 11665408 bytes
00:2001/01/08 09:41:28.19 kernel kbcreate: couldn@#t create kernel region.
00:2001/01/08 09:41:28.19 kernel kistartup: could not create shared memory
很明顯:現在的內核無法分配啟動SQL服務器所需的足夠內存,所以要對核心參數進行調整。
調整FreeBSD核心參數的過程
# cd /usr/src/sys/i386/config
# vi MyKernel (我的核心名為MyKernel,你應該編輯GENERIC這個文件)
在文件中加入如下內容:
options SHMMAXPGS=200000
options SHMMNI=100
options SHMSEG=10
options SEMMNS=200
options SEMMNI=70
options SEMMSL=61
存盤退出
# /usr/sbin/config MyKernel
#cd ../../compile/MyKernel
# make depend
#make
#make install
OK,至此完成核心的編譯與安裝。
重新啟動機器,如果你編譯的核心不能顯示正確的提示,請鍵入命令:
kernel.old
系統將以老的核心再啟動你的FreeBSD系統。
(作者:薛啟康)