1.9:Installation
Contents |
Anope Installation Instructions
These installation instructions are for the 1.9 Development Series of Anope. You should also read 1.9:ReadMe and 1.9:FAQ!
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 Anope
Anope can be built one of two ways. The recommended way is to use CMake. 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.6-patch 1". 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 http://www.cmake.org/cmake/resources/software.html
If you are unable to install CMake yourself (either due to lack of space or restrictions by your hosting provider), you still have the alternative to use the provided configure script. This option is not recommended and will eventually be phased out, but is provided for compatibility for those lacking CMake.
Next, unpack the package in your home directory, and go into the created directory.
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.
NOTE: although you may specify different binary and data paths, it is RECOMMENDED that you use the same value for both.
Once ./Config has run you will be instructed on what to do next, type cd build then make to compile Anope. If there are errors in the Makefile, *try to use gmake* instead. If it still doesn't work, you (or the system administrator if it's a shell) must install GNU make. You may find it at ftp://prep.ai.mit.edu/pub/gnu/ .
Now type make install (or gmake install; see above). 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.
If you see errors during this process, please mail us with the *complete* error output, and don't forget to mention your OS, compiler and C library versions.
Now go into the data directory (by default, ~/services/data). Copy the example.conf file 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. You will have noticed that Anope now has multiple configuration files, for all of the different *Servs, these allow improved configuration flexibility of things such as ChanServ's levels, command access and other modules such as LDAP and SQL. You should read through them, rename and make sure they are included in the services.conf correctly.
If you need help, you should subscribe to the Anope mailing list and mail there to get help from other users. See Documentation:Readme for more information.
Upgrading Anope
If you got a .diff file and want to patch the old Anope sources with it, do the following:
- Copy the .diff file into the root Anope sources directory.
- Type patch -p1 <file.diff
Upgrading a 1.9.x development release with patches from commits in Git may not always work due to the amount of changes being made.
To upgrade Anope, just follow the installation instructions described in section 1. There are however a few specific guidelines:
- IMPORTANT: Back up your old database!
- If you are upgrading to a newer 1.9 release you should start with a new example.conf.
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 add some lines in the ircd.conf of their hub server (as stated in the uplink configuration directive).
For samples below we'll take Services.LocalHost.Net as the name of the Services (as stated in the serverinfo { name } configuration directive).
First, the C/N lines, that allow Services to link. They also need a Y:line to work correctly.
Y:27:180:0:0:4000000 C:127.0.0.1:mypass:Services.LocalHost.Net::30 N:127.0.0.1:mypass:Services.LocalHost.Net::30
mypass is the same password you mentioned in the uplink { password } configuration directive. 127.0.0.1 is the IP from which Services connect from (linking in localhost is the most efficient way to run Services).
Then, you have to set-up an U:line, that will allow Services to change channel modes, topics, and much more without being opped in the channel.
U:Services.LocalHost.Net:*:*
NOTE: if you have more than one server in your network, this line MUST be added on ALL servers, or things won't work. Also note that U:Lines are case-sensitive on some IRCds.
HYBRID: (and other hybrid derived ircds) doesn't use a U:line in the Unreal/Dalnet/Bahamut sense, in that it doesn't require a U:Line in order to enable services to change modes, etc. However, in order to be able to use services akill/qline/sgline (remote KLINE/RESV/XLINE), it needs a shared block in the config for every ircd/server (without it services won't be able to set any of akill/qline/sgline). An example shared block is:
shared {
name = "services.localhost.net";
type = all;
};
NOTE: the type setting is only required for Hybrid 7.2.* and may not be required for other ircds.
Finally, you'll need to add an H:line, to make the OperServ JUPE command work correctly.
H:*::Services.LocalHost.Net
Don't forget to /rehash to apply changes.
A new trend in ircd configuration is popping all over the place, good examples are the latest Hybrid, UnrealIRCd and Bahamut, which use a more "readable" for of configuration. For those, use something like:
link Services.LocalHost.Net
{
username *;
hostname localhost;
bind-ip *;
port 6667;
hub *;
password-connect "mypass";
password-receive "mypass";
class servers;
};
Note that this block-style configuration files differ heavily, depending on the IRCd. Consult the interactive link maker (link is below) for more details on the exact configuration used by your IRCd.
If you're unable to get a link with your IRCd after reading this section, you might try the interactive link maker, which is located at http://anope.org/ilm.php?p=lm
Starting Anope
Go into the directory where binaries were installed (by default, ~/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.
Give to 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 then, 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.
Setting up a crontab
A crontab entry will allow you to check periodically whether Anope is still running, and restart it if not. You'll need to have Anope binaries and data installed in the same directory for this to work without modification.
First rename the example.chk script that is in Anope path (by default, ~/services/data) 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/data/services.chk >/dev/null 2>