Internet Relay Chat

Tuesday, July 17, 2007

How to setup Anope

- Download Anope - Download the Anope

- Now Type: cd anope-1.7.19


- Now Type: ./configure

Otherwise, we will type:

./Config

- During configuration, the program may require additional options to be set, such as location of libmysql and includes.

Follow all the onscreen instructions, telling the program where you want to install, your IRCD type, and what additional features you want to enable. Once this is complete, we need to type:

- make followed by make install

If there are no errors, and services compile and install successfully, we can move onto Configuring Anope's config file.

Ok, so you have your installation of Anope. Now comes probably the most important part, you MUST get this right, or the services may not run as you expect, or at the worst, not at all. So lets get started by getting back to your services root directory:

cd ~/services - Or the directory you installed Anope into.

The configuration files name is services.conf and you need to now open this and configure it to your services needs. When Anope is first installed, services.conf doesn't exist, So:

cp example.conf services.conf

This will copy the default, example config file to services.conf, the file that Anope reads in. Now we can move onto editing it:

pico services.conf - You can substitute pico for your prefered text editor, for example, nano/vi/vim/joe/emacs etc.


-------------------------------------------------------------------------------------

If this is your first time editing a config file, then take this warning:

READ EVERYTHING CAREFULLY

We cannot stress enough that everything that you are using needs to be read and understood before being used.

-------------------------------------------------------------------------------------
The config file is explained with comments throughout, so it shouldn't be too much trouble, but below, there are a few examples of how to do it if you are unsure.

If you haven't taken notice of the first area below, then you should of done. This will help you to understand what you do and don't need and what is optional etc.

# [REQUIRED]
# Indicates a directive which must be given. Without it, Services will
# not start.
#
# [RECOMMENDED]
# Indicates a directive which may be omitted, but omitting it may cause
# undesirable side effects.
#
# [OPTIONAL]
# Indicates a directive which is optional. If not given, the feature
# will typically be disabled. If this is not the case, more
# information will be given in the documentation.
#
# [DISCOURAGED]
# Indicates a directive which may cause undesirable side effects if
# specified.
#
# [DEPRECATED]
# Indicates a directive which will disappear in a future version of
# Services, usually because its functionality has been either
# superseded by that of other directives or incorporated into the main
# program.



The first thing you come across in the config is the server linking configuration, which is covered in more depth in the 'linking tutorial'.


RemoteServer localhost 6667 "mypass"
#RemoteServer2 localhost 6667 "mypass"
#RemoteServer3 localhost 6667 "mypass"



The top one is the one you use. If your services are going to connect to another server, then uncomment the other one or two, depending.

(Comment is the # at the start of the line - means that line is ignored, unless removed)

Normally, you can leave the host as localhost (ie. if you run services on the same box as the IRCD). If you are unsure of your IP, consult your ISP or Service Provider. The port MUST be the LISTENING port for SERVERS on your IRCD. If this is incorrect, you will receive errors such as "Connection Refused", or "Unable to Connect". The password should be a unique password. This prevents unauthorized servers from connecting, and this should be the same as the RECEIVE password in the IRCD Config File.

If the services you are running need to connect to another seperate server, then use the address of the server like this:

It's always recommended that you use an IP Address in the field below.

RemoteServer 192.168.0.2 6667 "mypass"

-------------------------------------------------------------------------------------

Hints and tips for setting up:

Right, now you have that setup just a few hints and tips when creating your configuration:

1. Make sure you always edit any option with [REQUIRED] next to it. One of the most important is ServicesRoot. Make sure you put YOUR nickname, and the nicknames of any other ServicesRoot's you want here, seperated by a space.

PLEASE NOTE: You MUST register the ServicesRoot nicknames, otherwise any user may be able to gain ServicesRoot access. It is also recommended that the number of ServicesRoot's is kept to a minimum. You can add Services Admin's via OperServ later.

2. Always make sure, and sure again that you have made all the changes you need to suit your particular setup. If you don't this could impare your services full abilities to do their jobs.

3. When modifying a line, whether required or not, if you want that line to be a part of the config, you need to make sure you remove the comment (#) at the start of the line. If you don't that line will be ignored by the services.

4. Important: again, when modifying a line, always make sure you edit it completely, never half-edit a line if its not suitable for your setup.

5. Always make sure that you reload the config file after changes if the services are running, otherwise - they will NOT take effect!

-------------------------------------------------------------------------------------

So, thats about it. The config lines are explained anyway in reasonable depth, so you shouldn't have too much trouble. Of course, if you do need support check the main website. Our next step is to make our IRCD recognise Anope..

-------------------------------------------------------------------------------------

The next step in our journey is to make the IRCD recognise that Anope is a friendly server, and allow it to connect up to the IRC Server. The way we do this, is via Link Blocks.

If you are unsure of how to make a link block, please Click Here for a Link Maker

First thing, is to open the IRCD Configuration file, to do this, type:

pico unrealircd.conf - Or another suitable text editor (nano/vi/vim/joe/emacs/mcedit etc.)

You will now need to place YOUR link blocks, which should look like this:

link [services-name]
{
username [username];
hostname [services-ip];
port [services-port|*];
bind-ip [bind-ip];
password-connect "[password]";
password-receive "[password]";
class [class];
};

ulines {
[services-name];
};

into your configuration file. Either copy and paste them to the file, or copy them VERY CAREFULLY. One single typo could cause the servers not to link.

Once the information is in the file, you need to save it, and then rehash your IRCD. You can rehash by going onto IRCD, identifying yourself as an operator (via /oper), and then typing:

/rehash - If you are remote rehashing, you may wish to try: /rehash irc.server.net - Where irc.server.net is the server you wish to rehash

Once the configuration file is reloaded, you can check that everything is alright, by typing the following in IRC:

/quote stats c

You should see a list of your IRCD link blocks, one of which should say the address of your services. If it doesn't, try repeating this step. If it does, congratulations, you may now move onto the last step..

-------------------------------------------------------------------------------------
Right, so now you have everything setup, your config is sorted and you are ready to go. Whats next you ask? Well, now all you have to do is start Anope!

Lets get started with going to the services directory. So, type:

cd ~/services - Or the directory you installed your services to.

Now you should be back in your main Anope directory. To run the services, simple type:

./services

If you aren't already, connect to your IRC Server and check that the services are there. (/whois ChanServ for example)


Hope this helps you

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home