Installing Services
Prev | Chapter 2. Getting Started | Next

## Installing Services

- Untar the package (where XXX is the version number)

      				gunzip services-XXX.tar.gz
      				tar xvf services-XXX.tar

- Build the package.

  - cd services

  - Run configure with appropriate options (see ./configure --help)

    Example:

        		./configure --with-cfgpath=/usr/local/lib/services \
        			    --with-help=/usr/local/lib/services/help \
        			    --with-network='sorcery.net' \
        			    --with-klinemail='kline@example.net' \
        			    --with-md5 \
        			    --with-opsemail='ircops@bogus.example.net' \
        			    --with-sendmail='/usr/sbin/sendmail -T' \
        			    --disable-grpops

  - Run make

- Install the services binary in the configuration directory by copying it there; alternatively, run make install after building services.

- Switch to the directory you named in the 'cfgpath' compilation option, and create blank databases to be used when services runs. For example:

      		cd /usr/local/lib/services
      		mkdir chanserv nickserv memoserv operserv
      		      nickserv/backups chanserv/backups
      		echo 'done' > nickserv/nickserv.db
      		echo 'done' > chanserv/chanserv.db
      		echo 'done' > memoserv/memoserv.db
      		echo 'done' > operserv/trigger.db

- Write a services.conf file and place it within the directory named in the --with-cfgpath option.

- To install the services helpfiles, unpack the help tarball one level above the directory named in the --with-help configure option. For example:

      		cd /usr/local/lib/services
      		gunzip < /path/to/tarball/services-help.tar.gz | tar -xvf -

- Add appropriate matching C and N lines for your services.conf configuration to your IRC server. The C-line and the N-line should be identical. The N-line password should match the W-line in services.conf, and the server name in the C and N-lines should match the H-line in services.conf. Example C/N-line pair (supposing that you are using Y-line class 32 for hub connection class):

      		C:127.0.0.1:mypasswd:services.hostname_here.net::32
      		N:127.0.0.1:mypasswd:services.hostname_here.net::32

- Add a U-line and a H-line for services to your IRC server's configuration file, and have all other servers on the network do the same. Be certain the U-line and H-lines are added before starting services, or you will need to restart services after adding the lines (and doing a server /rehash) for changes to take effect. Sample U/H-lines:

      		U:services.hostname_here.net:*:*
      		H:*::services.hostname_here.net

After services have been installed, in this manner, you should be able to start them by running the binary. If the IRC server is running and both services and your IRC server are properly configured, services will then activate. However, if you have been installing services using administrative access on your machine, stop now , make a separate services account, and ensure that the databases and database directories where the logfiles will be written are all owned by that account. Never run services as root for any reason.

To gain administrative access within services during the first services session, start services, register your nickname with NickServ, add a line that reads 'SRA:nickname_here' to your services.conf file, and finally, restart services. Once you have administrative access, new configuration options can be added and helpfiles can be updated with the /OperServ reset command.

Once services start, and you are able to interact with services, the installation is completed. It is, however, a good idea to test services functions that required special actions on your part to work properly: Test to ensure that requests such as /NickServ HELP work (if it fails, you may not have installed the helpfiles properly, see the section called “Installing Services”.), and register sample nicks, channels, memos, triggers, and restart services to ensure all databases are being written: if they are not, ensure that the permissions on the files and directories allow the services user full access to those files.

If services fail to start, core.log, and notices sent to +s users on the IRC server you were trying to connect services to are good places to start looking for information on why the startup failed.

Prev | Up | Next
Chapter 2. Getting Started | Home | Chapter 3. Configuring Services