4
mirror of git://git.acid.vegas/anope.git synced 2024-11-23 08:06:39 +00:00
anope/docs/INSTALL
2023-05-07 13:44:21 -04:00

136 lines
5.6 KiB
Plaintext

Anope Installation Instructions
-------------------------------
1) Installing Anope
2) Upgrading Anope
3) Setting up the IRCd
4) Starting Anope
5) Setting up a crontab
Note: You should also read the README and FAQ files!
1) Installing Anope
IMPORTANT NOTE: it is not recommended to use (and therefore install)
Anope as root. Use an unprivileged user instead -- the
one you're using for the ircd or a dedicated one will
be good enough.
The very first thing you need to do is to get the Anope package (if not
already done). You can find it at:
https://www.anope.org/
Anope requires cmake to build. You can check if CMake is already
installed on your system using the command:
cmake --version
If it's installed, you will get a line that says something similar to
"cmake version 2.8.12.2". If the version is less than 2.4 or you get
an error saying the command was not found, you will not be able to use
CMake unless you install it yourself into your home directory. CMake
can be downloaded from:
https://cmake.org/download/
Next, unpack the package in your home directory, and go into the created
directory.
If there are any extra modules you want to enable, such as m_mysql, run
the 'extras' script to enable them. If you do not know you can come back
later and enable them.
Now type ./Config to start the configuration script. It will ask you a
few questions, and figure out how to compile Anope on your system. If
you are unsure about the answer to a question, use the default value.
Now cd build and type make and make install. This will install
all the needed files in the paths you specified with the configure
script, and setup file permissions. You should ensure that the data
directory is not accessible by other users, as malicious users may
cause trouble on your network if passwords are not encrypted, or read
the memos of any user.
Now go into the conf directory (by default, ~/services/conf). Copy the example
configuration file (example.conf) to services.conf, and open the latter
with your favorite text editor. It contains all the configuration
directives Anope will use at startup. Read the instructions contained in
the file carefully. Using the default values is NOT a good idea, and will
most likely not work!
If you need help, you should visit https://forum.anope.org/ or #anope on
irc.anope.org. Provide *complete* error output, along with other relevant
information eg. OS, compiler and C++ library versions.
See the README file for more information.
2) Upgrading Anope
To upgrade Anope, just follow the installation instructions described in
section 1. There are however a few specific guidelines:
* IMPORTANT: Back up your old databases!
* If you are upgrading to a new major release, ALWAYS restart a
fresh configuration file from example.conf.
3) Setting up the IRCd
Services acts as an IRC server with pseudo-clients on it. To link them to
your network, you'll need to configure your IRCd to allow services to link.
The configuration varies depending on the IRCd, but you will probably need
a link block (also called connect block, or C line), a U line (also called
a shared block), and be sure that the IRCd is listening on the given port
in the link block.
Example link configurations can be found in example.conf for some of the
popular IRCds.
Don't forget to /rehash your IRCd to apply changes.
You may also try our interactive link maker, which is located at:
https://www.anope.org/ilm.php
4) Starting Anope
Go into the directory where binaries were installed (by default, this is
~/services/bin). Type ./services to launch Anope.
If there are syntax errors in the configuration file they will be
displayed on the screen. Correct them until there are no errors anymore.
A successful startup won't generate any message.
Give Services at least one minute to link to your network, as certain
IRCds on some OSes may be really slow for the link process. If nothing
happens after about a minute, it is probably a configuration problem. Try
to launch Anope with ./services -debug -nofork to see any errors that it
encounters, and try to correct them.
If you need help to solve errors, feel free to subscribe to the Anope
mailing list and ask there. See the README file for details.
5) Setting up a crontab
A crontab entry will allow you to check periodically whether Anope is
still running, and restart it if not.
First rename the example.chk script that is in Anope path (by default,
this is ~/services/conf) to services.chk and edit it. You'll need to
modify the CONFIGURATION part of the file. Then ensure that the file is
marked as executable by typing chmod +x services.chk, and try to launch the
script to see if it works (Anope must not be running when you do this ;))
When this is done, you'll have to add the crontab entry. Type crontab -e.
This will open the default text editor with the crontab file. Enter the
following (with correct path):
*/5 * * * * /home/ircd/services/conf/services.chk >/dev/null 2>&1
The */5 at the beginning means "check every 5 minutes". You may replace
the 5 with other another number if you want (but less than 60). Consult
your system's manual pages for more details on the syntax of the crontab
file. Interesting manpages are crontab(5), crontab(1) and cron(8).
Save and exit, and it's installed.