This HowTo describes the installation of the mix server and related software for RedHat Linux. For Debian and Ubuntu servers JonDos GmbH provides packages to simplify the installation. See: Mix Installation (Debian and Ubuntu).
The software for mix servers is distributed as source code.
In order to compile the mix sources the libraries OpenSSL (at least v.0.9.7) and Xerces-C++ are required. Additionally a C++ compiler, make, automake, autoconf and subversion are required, too. You can install all that stuff with the package manager of your operating system.
RedHat: yum install g++ make automake libssl-devel libxerces-c2-devel subversion
For premium mixes PostgreSQL database server, client and C-libraries for PostgreSQL clients are required, too.
RedHat: yum install postgresql postgresql-client libpq-devel
Checkout the latest stable version from our subversion repository. We recommend the use of the directory /home/mix for sources.
mkdir /home/mix
cd /home/mix
svn checkout https://svn.jondos.de/svn/proxytest/proxytest/branches/stable
You can compile and install the mix software using make. Please enable the required compile options for your mix:
cd /home/mix/stable
./configure --enable-payment ...
make
make install
The mix source code contains a maintenace script and parameter file in misc/Linux/rc-scripts for simplify installation and software updates. First copy the files to their default destinations:
cd /home/mix/stable
cp misc/Linux/rc-scripts/etc_default_mix /etc/default/mix
cp misc/Linux/rc-scripts/etc_init.d_mix /etc/init.d/mix
Edit the settings in /etc/default/mix to fit your preferences. Very important: choose the correct compile options for your mix. Two examples are prepared: one for free mixes and one for premium mixes.
SOURCE_PATH="/home/mix/"
# compile optins for free mixes COMPILE_OPTIONS="--enable-server_monitoring"
MIXCONF="/etc/mix/config.xml" MAXFILEDESCRIPTORS=32768
Afterwards you can compile and install the mix:
/etc/init.d/mix compile
/etc/init.d/mix install
Depending on the features needed by your mix, you can enable some more features for your mix with COMPILE_OPTIONS:
./configure --enable-payment .... ....
Mandatory feature for premium services:
Mandatory feature for free entry mixes:
Monitoring your mix:
Disable infoservice threads:
Additional Logging features:
It is not a good solution to run the mix server with root privileges. Create a new system user account (recommended name: mix) and specify this user account in the mix configuration file. After startup, the mix server will switch to this UID.
Create a system user account with useradd:
adduser --quiet --system --disabled-password --shell=/bin/false --group mix
The directory and file for log messages will be specified in the mix configuration file. You have to create the directory and set safe permissions:
mkdir /var/log/mix
chown mix:adm /var/log/mix
chmod 0750 /var/log/mix
No logrotate configuration is necessary. The mix server creates a new file, if the log file size exceeds the configured limit.
You have to create a mix configuration, save the config in /etc/mix/config.xml and start or stop the mix:
start: /etc/init.d/mix start
stop: /etc/init.d/mix stop
Alternativly you can raise the number of max. open descriptors to the value specified in the mix configuration file and you can start the mix at command line:
start: ulimit -SHn 32768
mix -c /path/to/config.xml
stop: killall mix
After startup the mix server will switch to the sytem UID specified in the mix configuration file.
Like other software the mix is updated time by time. New features will be added, bugs will be fixed ... and so on. Join the operator mailing list to stay up-to-date about software updates. If an update is announced, run the following steps.
/etc/init.d/mix upgrade
/etc/init.d/mix restart
The update creates a backup of the old mix binary in $SOURCE_PATH/backup. If you were run in trouble with the new version, you can restore the old version by:
/etc/init.d/mix restore
/etc/init.d/mix restart
Alternatively you can update the mix by hand. You have to know the compile options.
cd /home/mix/stable
make distclean
svn update
./configure --enable-server_monitoring --enable-payment .... ....
make
make install
After successful update restart the mix.
