Install Caché to Gentoo Linux (1)
キャッシュじゃないよ、キャシェDB だよ(語呂悪)
とりあえず SUSE Linux Enterprise Server 11 SP1 for x86-64 で実験。*1
.tar.gz 形式をダウンロード
設定 | 値 | 補足 |
---|---|---|
インストールタイプ | サーバオンリー | クライアントは Windows から遠隔の予定 |
Cache Unicode support | yes | 日本語使う |
セキュリティレベル | Minimal | とりあえず実験 |
インストールディレクトリ | /usr/cachesys | 上記インストール補足資料に従う |
起動グループ | root | とりあえず |
CSP Gateway | yes | Perl とか外部からの利用実験に |
WebServer | Apache | Web 屋なので他に選びようがない |
license key | No | とりあえず実験なので無償版 |
ダウンロードしたアーカイブを /tmp/cachekit に展開して chmod go+w /tmp/cachekit
とりあえずやってみる
/tmp/cachekit/cinstall を実行
# /tmp/cachekit/cinstall Warning: The installer can't find a platform in this distribution supported by your system. Searching for platforms that might install in unsupported mode... 1) SuSE Linux Enterprise Server 10 (x64) Enter the number for your system: 1 Your system type is 'SuSE Linux Enterprise Server 10 (x64)'. Enter instance name: Enter a destination directory for the new instance. Directory: /usr/cachesys Select installation type. 1) Development - Install Cache server and all language bindings 2) Server only - Install Cache server 3) Custom Setup type <1>? 2 Disk blocks required = 1556144 Disk blocks available = 90587536 Do you want to install Cache Unicode support ? yes How restrictive do you want the initial Security settings to be? "Minimal" is the least restrictive, "Locked Down" is the most secure. 1) Minimal 2) Normal 3) Locked Down Initial Security settings <1>? 1 What group should be allowed to start and stop this instance? root Do you want to configure the CSP Gateway to use an existing web server ? yes Specify the WebServer type. Choose "None" if you want to configure your WebServer manually. 1) Apache 2) SunOne 3) None WebServer type <1>? 1 Please enter location of Apache configuration file : Cache did not detect a license key in directory /usr/cachesys/mgr. Do you want to enter a license key ? Please review the installation options: Instance name: CACHE Destination directory: /usr/cachesys Cache version to install: 2010.2.3.702.0 Installation type: Server Unicode support: Y Initial Security settings: Minimal User who owns instance: root Group allowed to start and stop instance: root Effective group for Cache processes: cacheusr Effective user for Cache SuperServer: cacheusr SuperServer port: 1972 WebServer port: 57772 JDBC Gateway port: 62972 CSP Gateway: installed into /opt/cspgateway Apache web server will be configured for CSP Gateway Client components: none
- -
Do you want to proceed with the installation
- -
? Starting installation... killing CSPnsd process to upgrade ... cp: cannot create regular file `/opt/cspgateway/bin/CSPnsd': Text file busy Updating Apache configuration file ... - /etc/apache2/httpd.conf * You need to restart your Apache server before any configuration changes will take effect. You may need to restart CSPnsd by typing './CSPnsd' from /opt/cspgateway/bin cachessh.so failed Couldn't find DLL [800401F8] libssl.so.0.9.8: cannot open shared object file: No such file or directory Couldn't install all projects.
libssl.so.0.9.8 がないとか言われた。
libssl.so.0.9.8 ?
インストールされている openssl は dev-libs/openssl-1.0.0d で、存在するライブラリは /usr/lib64/libssl.so.1.0.0 。
正直、良く分からないので、とりあえず 0.9.8 をインストールしてみる。
# emerge -1va =dev-libs/openssl-0.9.8r These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild NS ] dev-libs/openssl-0.9.8r [1.0.0d] USE="(sse2) zlib -bindist -gmp -kerberos -test" 3,686 kB Total: 1 package (1 in new slot), Size of downloads: 3,686 kB Would you like to merge these packages? [Yes/No]
マージしていい? と聞かれる。 ローカルな開発環境だし、多少ぶっ壊れてもいいか。ということで Yes 。
再度、cinstall を実行。
Starting installation... killing CSPnsd process to upgrade ... Updating Apache configuration file ... - /etc/apache2/httpd.conf * You need to restart your Apache server before any configuration changes will take effect. You may need to restart CSPnsd by typing './CSPnsd' from /opt/cspgateway/bin Starting up Cache for loading... Unable to allocate 72 MB shared memory... Unable to allocate 65 MB shared memory... Unable to allocate 65 MB shared memory... Configuring minimum system... Unable to allocate 58 MB shared memory... Unable to allocate shared memory minimum of 58MB Startup aborted. Startup error. See cconsole.log for more information. Call InterSystems Technical Support if you need assistance. Cache failed to start. Check /usr/cachesys/mgr/cconsole.log for more details. Call InterSystems Technical Support if you need assistance. ** Installation aborted ** Post-installation tasks failed, installation is not complete
libssl のエラーは消えたが、今度は共有メモリがどうとか言われる。
そういえばマニュアルにカーネルオプションがどうとか書いてあったなぁ。
共有メモリの変更
インストールガイドによると、
補足1: RedHat Linux でのカーネルパラメータ shmall と shmmax の設定方法
共有メモリサイズを128MB に設定する場合は次のようにします。
1) 起動時のみ設定を行う場合(再起動後はリセットされる)
$ echo 134217728 >/proc/sys/kernel/shmall
$ echo 134217728 >/proc/sys/kernel/shmmax
この場合、再起動は必要ありません
2) 永続的に値を変更する場合(推奨)
/etc/sysctl.conf ファイルに以下のエントリを追加します。
kernel.shmall = 134217728
kernel.shmmax = 134217728
この場合、設定を反映させるためには別途1 を実行するか、システムを再起動しま
す。
何も考えずにインストールした gentoo の設定はというと
# cat /proc/sys/kernel/shmall 2097152 # cat /proc/sys/kernel/shmmax 33554432 # grep kernel.shm /etc/sysctl.conf
sysctl.conf に値がないってことは、既定値のままかな?
とりあえずは proc ファイルだけいじって再実行。
Starting installation... killing CSPnsd process to upgrade ... Updating Apache configuration file ... - /etc/apache2/httpd.conf * You need to restart your Apache server before any configuration changes will take effect. You may need to restart CSPnsd by typing './CSPnsd' from /opt/cspgateway/bin Starting up Cache for loading... Allocated 64MB shared memory: 2MB global buffers, 24MB routine buffers This copy of Cache has been licensed for use exclusively by: Cache Evaluation Copyright (c) 1986-2011 by InterSystems Corporation Any other use is a violation of your license agreement ^^/usr/cachesys/mgr/> ^^/usr/cachesys/mgr/> Start of Cache initialization Loading system routines Updating Cachetemp and Cache database Installing National Language support Loading system classes Loading system source code Building system indices Updating Security database Updating Audit database Updating Journal directory Updating User database Scheduling inventory scan Cache initialization complete See the cboot.log file for a record of the installation. Starting up Cache... Once this completes, users may access Cache Starting CACHE using 'cache.cpf' configuration file Automatically configuring buffers Unable to allocate 317 MB shared memory... Unable to allocate 285 MB shared memory... Unable to allocate 253 MB shared memory... Unable to allocate 221 MB shared memory... Unable to allocate 189 MB shared memory... Unable to allocate 157 MB shared memory... Allocated 125MB shared memory: 61MB global buffers, 24MB routine buffers This copy of Cache has been licensed for use exclusively by: Cache Evaluation Copyright (c) 1986-2011 by InterSystems Corporation Any other use is a violation of your license agreement You can point your browser to http://localhost:57772/csp/sys/UtilHome.csp to access the system management portal. Installation completed successfully
おめでとう、おれ。
起動しました?
本当に動いているか確認するため、クライアント予定のPCから http://192.168.1.***:57772/csp/sys/UtilHome.csp にアクセスしたらちゃんと見えた。
これで一段落。
そして力尽きた。
補足:httpd.conf に追加された内容
#### BEGIN-ApacheCSP-SECTION #### #### Next part used to invoke CSPcgi executable #### Do not use with CSP Shared Object access ScriptAliasMatch ^/csp/.*/*.((C|c)(S|s)(P|p)|(C|c)(L|l)(S|s)|(Z|z)(E|e)(N|n))$ "/opt/cspgateway/bin/nph-CSPcgi" Alias /csp/ "/usr/cachesys/csp/" <Directory "/opt/cspgateway/bin/"> AllowOverride None Options None Order allow,deny Allow from all <Files CSPnsd> Deny from all </Files> <Files CSP.ini> Deny from all </Files> <Files CSP.log> Deny from all </Files> <Files CSPnsd.ini> Deny from all </Files> <Files CSPnsd.pid> Deny from all </Files> <FilesMatch "\.(log|ini|pid)$"> Deny from all </FilesMatch> </Directory> #### END-ApacheCSP-SECTION #### #### BEGIN-ApacheCSP-SECTION-CACHE #### ScriptAliasMatch ^/cache/csp/.*/*.([Cc][Ss][Pp]|[Cc][Ll][Ss]|[Zz][Ee][Nn])$ "/opt/cspgateway/bin/nph-CSPcgi" Alias /cache/csp/ "/usr/cachesys/csp/" <Directory "/usr/cachesys/csp/"> AllowOverride None Options None Order allow,deny Allow from all <Files CSPnsd> Deny from all </Files> <Files CSP.ini> Deny from all </Files> <Files CSP.log> Deny from all </Files> <Files CSPnsd.ini> Deny from all </Files> <Files CSPnsd.pid> Deny from all </Files> <FilesMatch "\.(log|ini|pid)$"> Deny from all </FilesMatch> </Directory> #### END-ApacheCSP-SECTION-CACHE ####
*1:なぜか実験機が64bit