Understanding Quick Installation
Older multi-product Xi distributions shipped a set of shell INSTALL scripts that accepted command-line options, so that an installation could be driven from a script without answering questions. Current distributions do not work that way.
Neither the Xi-Text nor the Xi-Batch INSTALL script reads any command-line arguments. The wrapper runs exec perl INSTALL.pl without passing anything through, and INSTALL.pl never examines its argument list, so any options you type are silently discarded and the full interactive installation runs regardless. The options documented in the Administration manual (-q, -C, -f, -d, -s, -l, -n, -L, -x, -S, -N, -b, -u, -a and -h) are accepted by no INSTALL script in any current distribution.
The unattended route today is the RPM or Debian package. Package installation runs no questions at all, and the only step left to script afterwards is the licence.
Installation Script Locations
- Tarball distribution
- one product per tarball, named for the product, blend, version and platform it was built for, for example xitext-standard-1.25.2+1.1782476231-x86_64-linux-debian13.tar.gz. Unpack it and it produces a single directory containing INSTALL, INSTALL.pl, README and RELEASE. Run ./INSTALL as root from inside that directory. There is one INSTALL and it installs one product.
- RPM and Debian packages
- no INSTALL script is shipped at all. Everything the interactive installer would do - creating the system user, creating the spool directories, writing the master configuration, adding the services entries, seeding the hosts file, setting a trial licence and installing and enabling the systemd unit - is done by the package scriptlets.
The three-level arrangement described in the Administration manual, with a distribution directory at /usr/spool/xi_distrib and per-product subdirectories under it, belonged to the retired multi-product distribution. No current distribution creates it.
What Can Be Automated
- Tarball
- nothing. The installer puts the terminal into raw mode to read single keystrokes, so it requires a real terminal and cannot be fed from a pipe or a here-document.
- Packages
- everything except the full licence. A package install is non-interactive by construction and leaves the product running under a trial licence.
Interactive Installation Options
Xi-Text
The installer asks, in order: whether you want a full licence; whether to try to download the codes; whether you need a network licence; whether to change any of the installation directories (user path, shared library path, include path, and the main directories either based on one common directory or set individually); then it summarises and asks you to confirm. Later it asks whether to make you a Xi-Text super-user, whether to set up CUPSPY, whether to stop CUPS, whether to set up printers, and about lp replacement.
Xi-Batch
The same licence, network and directory questions, and the super-user question. Xi-Batch has no printer, CUPS or lp questions.
Example Installation Commands
From a tarball:
gunzip -c xitext-standard-1.25.2+1.1782476231-x86_64-linux-debian13.tar.gz | tar xf -
cd xitext-standard-1.25.2
sudo ./INSTALL
Answer the questions. The installer starts the product itself when it finishes. Decompression is a separate step because the tarball is the only distribution form on Solaris, AIX and HP-UX, and their tar has no -z option; on Linux tar xzf does the same thing.
From a package:
# RPM
sudo rpm -i xitext-standard-1.25.2+1.1782476231-x86_64-linux-rockylinux9.rpm
# Debian
sudo dpkg -i xitext-standard-1.25.2+1.1782476231-x86_64-linux-debian13.deb
Nothing is asked. The service is enabled and started, with a trial licence.
Installation Flow
- Tarball
- the installer checks that Perl 5 or later is present, checks that you are root, checks whether the product is already running, creates /etc/xi if needed, creates or adopts the system user, asks the licence and directory questions, writes the master configuration file, creates the directories, copies the programs and help files into place, sets the licence, starts the product, and installs a system start routine.
- Package
- the pre-install scriptlet creates the group and the system user and the spool directories; the post-install scriptlet writes the master configuration, adds the services entries, seeds the hosts file, sets a trial licence, writes the systemd unit and enables and starts it.
When to Run INSTALL
Run ./INSTALL from an unpacked tarball for a first installation on a machine that will not be managed by the package manager, and again from a newer tarball to upgrade. There is no separate distribution-level or product-level script to choose between.
Where the platform has RPM or dpkg, prefer the package: it is the only form that installs unattended, and it is the form the upgrade and removal paths are built around.
User Account Prerequisites
Xi-Text runs as the user spooler and Xi-Batch as the user batch. Both names are fixed at build time and both default as given.
- Tarball
- if the user is absent the installer says it needs to create it and asks permission - this question cannot be skipped. It then picks the first free user id from 50 for Xi-Text or 51 for Xi-Batch, uses the first of the groups daemon, bin or root that exists, and runs useradd with a home directory of /usr/spool. If there is no useradd it stops and asks you to create the user yourself. No Installuser script is shipped with either product.
- Package
- the same identifier search runs in the pre-install scriptlet, without asking, with a home directory of /var/spool. The package also creates the daemon group first if the image lacks it.
Create the user beforehand if you need specific identifiers. These are the Linux forms:
# Xi-Text
useradd -r -g daemon -d /var/spool -c 'Xi-Text Spooler' spooler
# Xi-Batch
useradd -r -g daemon -d /var/spool -c 'Xi-Batch batch processing' batch
The -r option, which asks for a system account below the range used for people, is a Linux one. Solaris and HP-UX have useradd without it, so choose the identifier yourself with -u; AIX creates accounts with mkuser instead.
An existing account is adopted as it stands, with no check on its identifiers or its group. The products do not set or rely on a login shell for these accounts.
Network Setup
From a tarball, the services and hosts files are touched only if you answer yes to Do you need a network licence. A package install always does both.
- Service entries are appended to /etc/services - for Xi-Text: xitext 2000/tcp and 2000/udp, spq 2100/tcp, xtnetsrv 2200/tcp and 2200/udp, xtapi 2210/tcp and 2210/udp; for Xi-Batch: xibatch 2050/tcp and 2050/udp, btq 2150/tcp, xbnetsrv 2250/tcp and 2250/udp, xbapi 2260/tcp and 2260/udp.
- A hosts file is created if it does not exist - /etc/xi/text-hosts or /etc/xi/batch-hosts - containing a single localaddress line taken from hostname -I.
- Xi-Text additionally creates /etc/Xitext-extern if it is absent.
No host editor is launched. Remote hosts are added afterwards by editing the hosts file. The network daemons are xtnetserv for Xi-Text and xbnetserv for Xi-Batch.
Post-Installation
Verify the licence:
# For Xi-Text
xt-checklic
# For Xi-Batch
xb-checklic
Verify the product is running:
# For Xi-Text
splist
# For Xi-Batch
btjlist -H
On a packaged install the service is already running under systemd, so use systemctl status xitext or systemctl status xibatch. On a tarball install the installer starts the product itself; spstart and btstart are the commands to start it by hand afterwards.
Check version:
# Packaged
rpm -qa | grep -Ei 'xitext|xibatch'
dpkg -l | grep -Ei 'xitext|xibatch'
# Tarball
cat RELEASE
The RELEASE file sits at the top of the unpacked distribution directory and names the platform, product, version and build. The installer prints it as its first action.
Review the scheduler report file:
# For Xi-Text
tail /var/spool/xi/spd/spshed_reps
# For Xi-Batch
tail /var/spool/xi/batch/btsched_reps
Those are the default spool directories. The report file is always written in the configured spool directory, so if SPOOLDIR was changed, read it from /etc/xi/textconfig or /etc/xi/batchconfig and look there instead.
Licences
A new installation always starts on a trial licence. The tarball installer sets one when you decline a full licence; the packages set one unconditionally. The trial runs for 45 days from a tarball or RPM installation and for 30 days from a Debian package.
Full licence codes come from the Xi customer portal. Sign in with your account reference, open the serial-number panel for the entitlement, register the system if it is not registered already, wait for Xi to confirm it, then choose Generate licence codes. The codes can be shown on screen or emailed to you.
Apply the codes with xt-vwrite (Xi-Text) or xb-vwrite (Xi-Batch), as root, with the product stopped - the command refuses to run while the scheduler is up. Run it with no arguments and it prompts for your organisation name, serial number and codes.
Given outbound access to the licence service on TCP port 1999, the codes can be fetched instead of typed:
# Xi-Text, non-interactive
sstop -y
xt-vwrite -q -I -s 52210000 -o 'Acme Ltd'
# Xi-Batch, non-interactive
btquit -y
xb-vwrite -q -I -s 52210000 -o 'Acme Ltd'
With -q all three of -I, -s and -o are required; the command exits 20, 21 or 22 if any is missing. Add -N to force a networked licence or -L to force a standalone one; without either, the product decides from the machine's own network configuration.
Troubleshooting Installation
- The options I passed to INSTALL had no effect
- they were discarded. The INSTALL wrapper execs the Perl installer without passing its arguments on, and the Perl installer does not read them. Use the packages if you need an unattended installation.
- Installation stops immediately
- the installer exits with status 101 unless it is run as root, and with status 100 or 101 if Perl 5 is missing.
- "It looks like Xi-Text is running"
- the installer asks whether to stop it, defaulting to no. Answering no ends the installation with status 200. Stop the product first with sstop -y or btquit -y.
- Licence download hangs
- the fetch opens a TCP connection to the licence service on port 1999. Behind a firewall that drops rather than rejects, it will wait. Decline the download and enter the codes from the portal by hand.
- Service entries not created
- the entries are appended only when the product's own service name cannot already be resolved. An existing entry - including a wrong one left by an earlier installation - suppresses the whole block. Check /etc/services by hand before concluding the step failed.
Scripting Installations
Script the package installation and the licence step; there is nothing else to script.
#!/bin/sh
# deploy-xitext.sh
set -e
SERIAL=52210000
ORG='Acme Ltd'
# Install. Non-interactive: the scriptlets create the spooler user,
# the spool directories, the configuration and a trial licence, then
# enable and start the service.
rpm -i /var/tmp/xitext-standard-1.25.2+1.1782476231-x86_64-linux-rockylinux9.rpm
# Replace the trial with the full licence.
sstop -y
xt-vwrite -q -I -s "$SERIAL" -o "$ORG"
spstart
# Verify.
xt-checklic
splist
Substitute dpkg -i for rpm -i on Debian and Ubuntu. On a host with no outbound access to the licence service, drop the -I and supply the codes another way - vwrite will prompt for them, which is the point at which the run stops being unattended.
Best Practices
- Prefer the packages
- they are the only unattended form, and they carry the upgrade and removal paths.
- Stop the product before touching the licence
- vwrite and triallic both refuse to run while the scheduler is up.
- Register the system in the portal before the trial expires
- registration is confirmed by Xi rather than granted immediately, so leave time for it.
- Record any non-default directories
- a tarball installation can be based anywhere, and the resulting paths live in /etc/xi/textconfig or /etc/xi/batchconfig. Anyone reading logs or backups later needs to know where to look.
- Do not expect the manual's option list to work
- the Administration manual's quick-installation chapter describes the retired distribution installer, and following it produces a full interactive installation with none of the options applied.