![]() Create a new default infx instance called infx01. infx inst func=new newinst=infx01This creates the directories and files needed by infx, adds entries to the sqlhosts file and creates a new onconfig file. initialize instanceUse the init function of the instance service to initialize the new instance, and bring it online.infx inst infx01 func=init squiggle=yes
instanceYou now have a blank instance called infx01.
infx01@bobii:/home/informix>infx statusinfx01@bobii(192.168.0.34) 11.50.FC7DE online up: 00:00:28host user memory space write profname bobii total 15 total 186.94mb total 0.10gb total 638 read 99.66% cpu 2/2 max 15 resident 120.85mb free 0.01gb fg 0 write 95.37% mem 3.89gb active 15 virtual 65.54mb temp 0.00gb lru 597 ckpts 2free 0.26gb threads 15 virt free 36.54mb free 0.00gb chunk 41 waits 0space pg status chks size mb used mb free mb used % read mb write mbroot 2k OK 1 100.00 87.82 12.18 87.82% 0.27 88.83took: 0.07secs template: /infx/template/infx-cli/infx-cli-status.htmltconfiginfx uses config files to control exactly what is created for a new instance. The included file infx-config.inst specifies a default infx instance. Make your own .inst files to create customized instances.infx-config.instThe supplied file, /infx/etc/infx-config.inst is the most basic prototype for an instance. You can use this as a basis to create instances and then manually modify them to your needs. You can also create new versions of this ini file to create whatever instance layouts you require.
Information about this file is here: infx-config.inst
infx-small.onconfigThis supplied file, /infx/etc/infx-small.onconfig is an example template to generate a new onconfig file. You can use this template and make changes manually to the resulting onconfig file. Or you can create your own templates and use them when creating new instances.
Information about this file is here: onconfig template
using different configThe new function supports parameters that allow you to override the default config files and build the instance based on a different definition.infx inst func=new newinst=infx01 config=myconfig onconfig=myonconfig servernum=10 sw=XXX
default instanceDefault instance layout, created under /infx/inst/infx01
infx inst func=new newinst=infx01
directories, links & filesThis is the section of the infx-config.inst that defined the directories, files and links. All paths are relative to the instance specific directory. Specify absolute paths for files outside of that.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; instance directories, create under instance dir /infx/inst/${inst}[[ dir path="chks" mode="755" note="where to store chunk files" ]][[ dir path="backup" mode="755" note="backup files" ]][[ dir path="backup/db" mode="775" note="dbspace backup files" ]][[ dir path="backup/logs" mode="775" note="logical log backup files" ]][[ dir path="logs" mode="755" note="instance, command and service log files" ]][[ dir path="etc" mode="755" note="instance specific config files" ]][[ dir path="tmp" mode="755" note="temporary file location" ]][[ dir path="dump" mode="755" note="instance diagnostic dumps, can be large" ]];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; instance links created within instance tree[[ link path="informixdir" source="/infx/sw/latest" note="informix product binaries" ]];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; files created within instance tree[[ file path="chks/root.001" mode="660" note="create file for root chunk" ]][[ file path="informixdir/etc/sysadmin/stop" mode="660" note="stop dbworker/dbscheduler" ]][[ file path="etc/allow-autostart" mode="660" note="start instance when server starts" ]][[ file path="etc/allow-autobackup" mode="660" note="include instance in auto backups" ]]sqlhostsThis section describes what sqlhosts entries will be created for the instance. This step is skipped if the entries are already in the sqlhosts file.If you want to create multiple instances with TCP connections, you need to assign a unique port for each instance. When you specify a base port number, infx adds the server number to generate a unique port for the instance.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; create sqlhosts entries; create shared memory connection[[sqlhosts]]server=${newinst}protocol=onipcshmhost=${host}service=${newinst}options=note=local shared memory connection; create tcp based sqlhosts entry; ${port} translated to $baseport+$servernum[[sqlhosts]]server=${newinst}tcpprotocol=onsoctcphost=${host}baseport=62000service=${port}options=note=connect via tcpThe sqlhosts file is created in the INFORMIXDIR by default, you can override this in the config.ini file and specify a central location.
Set central sqlhosts file for all instances on this host, in /infx/etc/config.ini
INFORMIXSQLHOSTS = /infx/etc/sqlhostsonconfigA new onconfig file is generated for the instance based on the onconfig template. This file has exactly the same format as the standard onconfig file. This step is skipped If an onconfig file already exists for this instance.
The following tokens will be replaced when the onconfig file is generated.
The onconfig file is created in the INFORMIXDIR and is named onconfig.${inst}.
|

squiggle=yes is a special token that you have to add to some commands as confirmation that you really mean it.