$ sysctl kernel.shmmax kernel.shmmax = 68719476736 $ sysctl kernel.shmall kernel.shmall = 4294967296
$ sysctl kernel.shmmax=68719476736 $ sysctl kernel.shmall=4294967296
or so $ echo 68719476736 > /proc/sys/kernel/shmmax $ echo 4294967296 > /proc/sys/kernel/shmall
/etc/sysctl.conf
file. You should add such lines, or find and change the corresponding parameters if they are already there. # Controls the maximum shared segment size, in bytes kernel.shmmax = 68719476736 # Controls the maximum number of shared memory segments, in pages kernel.shmall = 4294967296
$ ulimit -l 64
Set the value valid before the reboot: $ ulimit -l 4096000
The value that will be saved after the reboot should be set in the /etc/security/limits.conf
file. root soft memlock 4096000 root hard memlock 4096000
$ mkdir cache-2014.1.0.608.0su-lnxrhx64 $ tar -zxf cache-2014.1.0.608.0su-lnxrhx64.tar.gz -C ./cache-2014.1.0.608.0su-lnxrhx64
Run the installation $ cd cache-2014.1.0.608.0su-lnxrhx64 $ ./cinstall Your system type is 'Red Hat Enterprise Linux 6 (x64)'. Currently defined instances: Enter instance name:
Well, our system is recognized as supported, now you can fill in the necessary parameters. The parameters entered further are already at your discretion. Installation Type I think you should choose the first. Unicode support, depends on the need to use old projects on 8 bits, but I recommend to include unicode support, especially since there are already options for migrating from 8 bits to unicode. Security level can be set to the minimum. At this level, the SYS password will be set for all users, and unauthorized input will be active. The security level can then be increased if necessary.Enter instance name: CACHE Do you want to create a cache instance 'CACHE' <Yes>? Enter a destination directory for the new instance. Directory: / opt / cache Directory '/ opt / cache' does not exist. Do you want to create it? -------------------------------------------------- - NOTE: Users should not attempt to access while cache the installation is in progress. -------------------------------------------------- - Select installation type. 1) Development - Install Cache Server 2) Server only - Install Cache server 3) Custom Setup type <1>? Disk blocks required = 2372204 Disk blocks available = 22197288 Do you want to install Cache Unicode support <No>? yes How restrictive do you want? "Minimal" is the least restrictive, "Locked Down" is the most secure. 1) Minimal 2) Normal 3) Locked Down Initial Security settings <1>? What group should be allowed to start and stop this instance? root Cache did not detect a license key in directory / opt / cache / mgr. Do you want to enter a license key <No>? Please review the installation options: -------------------------------------------------- ---------------- Instance name: CACHE Destination directory: / opt / cache Cache version to install: 2014.1.0.608.0su Installation type: Development 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: using built-in web server Client components: all -------------------------------------------------- ---------------- Do you want to proceed with the installation?
Starting up Cache... Once this completes, users may access Cache Starting CACHE using 'cache.cpf' configuration file Automatically configuring buffers Allocated 351MB shared memory: 256MB global buffers, 24MB routine buffers Creating a WIJ file to hold 31 megabytes of data This copy of Cache has been licensed for use exclusively by: Cache Evaluation Copyright (c) 1986-2014 by InterSystems Corporation Any other use is a violation of your license agreement You can point your browser to http://localhost.localdomain:57772/csp/sys/UtilHome.csp to access the management portal. Installation completed successfully
$ csession cache
And to the Caché management portal via the link http: // localhost: 57772 / csp / sys / UtilHome.csp $ ccontrol start cache $ ccontrol stop cache
The last parameter is the name of the instance that we specified during installation. $ mkdir globals_2013.2.0.350.0_unix $ tar -zxf globals_2013.2.0.350.0_unix.tar.gz -C ./globals_2013.2.0.350.0_unix
Run the installation: $ cd ./globals_2013.2.0.350.0_unix/kit_unix_globals/ $ ./installGlobals Enter the number for your system:
We are offered to enter the number of our system from the list, but there is no choice. This is due to the fact that the installation is performed on CentOS, the same problem may occur when installing on Ubuntu version other than 11.04, since the installer code has a hard link to the version number. To solve this problem, apply the patch. Create a file in the current folder named cplatname.patch$ nano cplatname.patch
--- cplatname 2013-05-02 17:50:01.000000000 -0700 +++ cplatname.new 2014-04-05 11:43:21.676624274 -0700 @@ -114,13 +114,13 @@ distName=`cat /etc/issue | cut -f1 -d" "` version=`cat /etc/issue | cut -f2 -d" " | cut -f1-2 -d"."` proc=`uname -m` - if [ "$distName" = "Ubuntu" -a "$version" = "11.04" -a "$proc" = "x86_64" ] ; then + if [ "$distName" = "Ubuntu" -a "$proc" = "x86_64" ] ; then plat="lnxsusex64" fi fi if [ -f /etc/redhat-release ] then - grep -P 'Red Hat Enterprise Linux .* release 6' /etc/redhat-release > /dev/null 2>&1 + grep -P '.* release 6' /etc/redhat-release > /dev/null 2>&1 if [ $? = 0 ] then proc=`uname -m`
$ patch < cplatname.patch
$ ./installGlobals Installing Globals for Red Hat Enterprise Linux 6 (x64) Enter destination directory name for this installation. Directory :
Ok, now it works, you can install it. Unlike Caché, here the installer will ask only the installation path from us, and then immediately install and run the installed GlobalsDB. $ cd /opt/globalsdb/mgr/ $ ../bin/cache -s ./ ^^/opt/globalsdb/mgr/>w $zv Globals for UNIX (Red Hat Enterprise Linux for x86-64) 2013.2 (Build 350U) Thu May 2 2013 19:28:54 EDT
Starting and stopping the GlobalsDB server is performed by commands in the mgr subfolder where GlobalsDB was installed: $ cd /opt/globalsdb/mgr/ $ ./startGlobals $ ./stopGlobals
If necessary, you can specify the size of the buffer globals, for example 1024MB $ ./startGlobals memory=1024
$ wget https://raw.githubusercontent.com/unix-junkie/ccontrol-scripts/master/etc/init.d/cache $ cp cache /etc/init.d/cache $ chown root:root /etc/init.d/cache $ chmod 755 /etc/init.d/cache
now you need to activate the cache service. So it can be done in CentOS. $ chkconfig --add cache $ chkconfig --list cache cache 0:off 1:off 2:off 3:on 4:off 5:on 6:off
And so in Ubuntu. update-rc.d cache defaults
I note that the service depends on another InterSystems service, for which there is still such a script, this is the ISCAgent service. And if it is stopped then Caché will not start. This may be after stopping Caché. #!/bin/bash # ## Example of /etc/sysconfig/globalsdb # ## Globals home directory # GLOBALS_HOME=/opt/globalsdb # ## Configure MB of database buffers (default=256) # MEMORY=1024 # ### BEGIN INIT INFO # Provides: GlobalsDB # Required-Start: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Starts GlobalsDB # Description: Starts GlobalsDB ### END INIT INFO . /etc/rc.d/init.d/functions [ -f /etc/sysconfig/globalsdb ] && . /etc/sysconfig/globalsdb if [ "$GLOBALS_HOME" ]; then if [ ! -d "$GLOBALS_HOME/mgr" ]; then echo "$GLOBLAS_HOME/mgr directory not found!" >&2 ; exit 1 fi cd $GLOBALS_HOME/mgr else echo "GLOBALS_HOME is empty" >&2 ; exit 1 fi mgrdir=`pwd` start() { echo -n "Starting Globals in $mgrdir:" args="" test "$MEMORY" && args=$args' memory='$MEMORY ./startGlobals quietly $args 1>/dev/null 2>/dev/null status=$? if [ $status -eq 0 ] ; then success else failure fi echo return $status } stop() { echo -n "Stopping Globals in $mgrdir: " ./stopGlobals 1>/dev/null 2>/dev/null status=$? if [ $status -eq 0 ] ; then success else failure fi echo return $status } restart() { stop status=$? if [ $status -ne 0 ] ; then return $status fi start status=$? if [ $status -ne 0 ] ; then return $status fi return ${status} } status() { ../bin/cache -s . -cV 1>/dev/null 2>/dev/null status=$? case $status in 225) echo "Globals in $mgrdir is stopped" exit 1 ;; *) echo "Globals in $mgrdir is running" exit 1 ;; esac return 0 } usage() { echo "Usage: `basename $0` {start|stop|restart|status|help}" return 0 } if [ $# -ne 1 ] then usage exit 1 fi case "$1" in start) start exit $? ;; stop) stop exit $? ;; restart) restart exit $? ;; status) status exit $? ;; help) usage exit $? ;; *) usage exit 1 ;; esac
$ wget https://gist.githubusercontent.com/daimor/10009450/raw/84856a0c360ebd91ecf442715737f51e81ccf154/globalsdb $ chmod 755 globalsdb $ chown root:root globalsdb $ cp globalsdb /etc/init.d/globalsdb
Need to prepare a file with the settings # GlobalsDB, $ echo "GLOBALS_HOME=/opt/globalsdb" > /etc/sysconfig/globalsdb # , 256 $ echo "MEMORY=1024" >>/etc/sysconfig/globalsdb
Now you can enable the service. CentOS. $ chkconfig --add globalsdb $ chkconfig --list globalsdb globalsdb 0:off 1:off 2:off 3:on 4:off 5:on 6:off
Ubuntu update-rc.d globalsdb defaults
csession
after authorization. But this path is not for everyone and may not always be convenient. I will consider how to make a remote connection immediately to the Caché terminal./usr/bin/cachesession
and contents, in which you need to specify the correct instance, and the other parameters to your taste. Up to the possibility of starting immediately some routine. #!/bin/bash /usr/bin/csession cache -U USER
Making it executable and verifying, by a simple launch, should get to the terminal. $ chmod 755 /usr/bin/cachesession $ chown root:root /usr/bin/cachesession
Now create a user $ useradd -s /usr/bin/cachesession cachesession $ passwd cachesession
now when logging in via ssh / telnet, under the user cachesession we will immediately get into Caché.Source: https://habr.com/ru/post/217567/
All Articles