How to install a sTeam server (version 2.0)
Installing a sTeam server (version 2.2)
This document will describe how to install a sTeam server. If there is already a steam package available with your linux distribution, then you can just install this, as it will usually take care of all the dependencies, etc. If there is no installation package, or if you want to install a newer version of the server, then this text will assist you in setting up your own server. We will describe how to obtain the server source code, how to compile and install it.
Requirements
The sTeam server depends on some other software components. Most of these are available as installation packages in most linux distributions, so they should be fairly easy to install.
- Pike - To be able to run the server, you will need the Pike programming language, version 7.4. sTeam-2.2 does work well with Pike 7.6.69+ (check if there is already a binary release for this version). Refer to the Pike documentation on how to install Pike. If your distribution offers a Pike 7.4 package, then you may just use that. You will need the pike-core, pike-image and pike-mysql packages.
- libxml2, libxslt - These libraries are provided by most linux distributions. Be sure to install the development packages, too.
- autoconf, automake, gcc, make, flex - These packages are needed for software development. You will need them to be able to compile the server source code.
- cvs - This is the client that you need to obtain the server source code from our source code revision control system.
- mysql-server - This is the database used by the sTeam server. You will need to install it and ensure it is started before installing and running the server.
Installation
Once you have installed the required software, you can obtain and install the sTeam server. You can obtain (check-out) the source code from our cvs server (the password is steam):
cvs -d :pserver:steam@cvs.open-steam.org:/cvs login cvs -d :pserver:steam@cvs.open-steam.org:/cvs co steam-2_2
This will create a directory called steam-2_2 and put the server source code in it.
If you just want to install the server with the default options, change to the steam-2_2 directory and do:
./install
The server will be installed to /usr/local/lib/steam/, the configuration files will be put int /etc/steam/ and the log files will be written to /var/log/steam/. You can start the server by changing to /usr/local/lib/steam/ and running ./start and stop it by running ./stop.
You will now most probably want to install the web interface, so that you can access your server via http and https. First check for the most recent version of the web interface:
/usr/local/lib/steam/bin/spm -l
Then note the name of the version of the web interface that you want to install and install it, e.g.:
/usr/local/lib/steam/bin/spm -i web-1_76.spm.gz
Note that the default passwort for the root user of the server is steam.
This will take some time. When it is finished you should be able to access the server with a web browser: http://localhost or https://localhost (or the hostname of your machine).
init.d scripts
You can also use a service script to start the server as a system service. These scripts are usually installed in /etc/init.d/. There are currently init.d scripts for Debian, SuSE and RedHat/Fedora, in the debian/, suse/ and redhat/ folders in the source code. You will need to copy the correct script to your /etc/init.d/ folder and you will most likely have to customize it to your setup. You might then be able to start your server by running service steam start or invoke-rc steam start (depending on your distribution).
install options
If you don't want to install to the default directories, then you can customize the installation process via several command line arguments to the ./install script. Just run ./build --help to see a list of the parameters (note: the ./build and ./configure scripts use the same arguments as ./install. In fact, ./build runs ./configure to compile the source code, and ./install runs ./build before installing the software). Here are some of the options most likely of interest to you:
- --with-configdir=/usr/local/etc/steam - You can specify the directory to use for configuration files.
- --with-logdir=/home/steamadmin/logs - You can specify the directory to use for log files.
- --with-installdir=/var/tmp/steam-build - You can specify a different installation directory (default is '/'). This might be useful when building an installation package for your distribution. When building installation packages, software is often installed into a temporary directory, where it is packed into an installation file.
- --with-brand=mysteam - You can brand your server to make it use a different name than steam for its installation folders and database. This might be useful if you want to run more than one sTeam server on one machine.
Problem solving
If an error occurs at some stage during installation, check whether you have all the required packages installed. Also, your MySQL server must be running.
- MySQL password - One common problem is that your MySQL server requires a password for database access. The install script will not be able to create a database in that case. If this happens, then install the sTeam server, then go to the directory where the server was installed to (default: /usr/local/lib/steam) and run bin/setup --help. This will tell you some option for the database setup tool.
- Server certificate for SSL - The install script creates a certificate to use for SSL (secure socket layer) connections. You need this when accessing the server via https://. The script tries to get your machine's hostname and put it in the certificate. If you need to use a different hostname (or several hostnames) in the certificate, you can create a new certificate by running pike /usr/local/lib/steam/tools/create_cert.pike myhostname1 myhostname2. This will create a file called steam.cer in your current directory. Move this file into your sTeam config directory and restart the server.
- Port conflicts - If you already have a webserver, ftp- or smtp-server running on your system, then the corresponding ports might already be in use. The sTeam server will complain about this in its log files. You can specify which ports sTeam should use in the steam.cnf file in your config directory. Be sure to remove the hbs(...) tags from any values that you change there, and be sure to stop the server before editing that file. The server will write its current configuration to that file when it shuts down (because those values can also be changed via the web interface). The hbs(...) tag means 'handled by server', indicating that the value should be fetched from the database, not from the config file.