mirror of
https://github.com/anope/anope.git
synced 2026-06-23 08:26:38 +02:00
8efb093193
git-svn-id: svn://svn.anope.org/anope/trunk@17 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@10 5417fbe8-f217-4b02-8779-1006273d7864
104 lines
3.8 KiB
Plaintext
104 lines
3.8 KiB
Plaintext
Anope MySQL Support
|
|
-------------------
|
|
|
|
Introduction:
|
|
|
|
Anope 1.6 onwards supports MySQL databases. On Anope 1.6.0 only PHASE 1
|
|
has been implemented. Since the next phases require major changes in the
|
|
core, we decided to save it for 2.0. However, having your db's easily
|
|
accessible on your website is still a great feature.
|
|
|
|
PHASE 1:Anope will be able to save all it's databases to MySQL. It will
|
|
happen in conjuction with the current FFF databases. This first step is
|
|
nothing more than a MySQL dump of the databases (i.e. read-only), since
|
|
Anope will not (for now) read from Mysql. (COMPLETED)
|
|
|
|
PHASE 2:The next step is load the databases from mysql, being able to
|
|
replace the FFF completely as an archive method (since all changes to
|
|
the mysql db would be lost on the next Services save). All, while keeping
|
|
FFF intact. This is still not the final goal, but it's a milestone.
|
|
(COMPLETED)
|
|
|
|
UPDATE: Anope 1.7.0 (Revision 11 and above) finally supports phase 2!
|
|
A new config directive called 'UseRDB' has been added.
|
|
If you enable this, anope will automatically try to load its
|
|
data from MySQL (if configured and compiled with).
|
|
|
|
PHASE 3:The next step, and most convoluted of all (since we'll need to
|
|
modify pretty much all the source) is to load/save (SELECT/INSERT) data
|
|
in realtime. That way the mysql db could be modified externaly (web?).
|
|
Again, the FFF will be kept intact.
|
|
|
|
Requirements:
|
|
|
|
1. MySQL server version 3.23.32 or greater
|
|
2. MySQL libs and development files (usualy called mysql-dev).
|
|
3. A MySQL user account
|
|
4. A MySQL database
|
|
|
|
Installation:
|
|
|
|
1. You need to configure Anope to be compiled with MySQL support. To
|
|
do so you must run ./configure and answer "Yes" when asked for
|
|
MySQL Support.
|
|
|
|
Notes:
|
|
|
|
* MySQL is not supported on the following platforms: Windows.
|
|
* You might need to run "make distclean" prior to running ./configure
|
|
|
|
2. Compile Anope as usual. The gmake process will now compile MySQL
|
|
support into Anope.
|
|
|
|
3. Install Anope as usual.
|
|
|
|
Configuration:
|
|
|
|
1. Run bin/mydbgen to help on the schema creation and adjustments.
|
|
|
|
2. Edit services.conf and add your mysql data to the MySQL configuration
|
|
block.
|
|
|
|
3. Start or restart services to make use of the new Anope executable.
|
|
|
|
Security:
|
|
|
|
To add a layer of security you have the option of encrypting or encoding
|
|
all passwords for nicks and chans. Use the "MysqlSecure" directive on your
|
|
services.conf file to enable it. The availabe storage methods are:
|
|
|
|
#MysqlSecure "" or MysqlSecure ""
|
|
|
|
Disables security. All passwords will be saved on the MySQL database
|
|
as clear text, with no encryption or encoding. FASTEST
|
|
|
|
MysqlSecure "des"
|
|
|
|
Encrypts all passwords using a unix DES encription. This is a one way
|
|
encryption algorithm. You can only validate it agains another DES
|
|
encrypted string, using the same "salt" (the first two characters of
|
|
the encrypted string). FAST
|
|
|
|
MysqlSecure "md5"
|
|
|
|
Calculates an MD5 128-bit checksum for the password. The value is
|
|
returned as a 32-digit hex number that may be used as a hash key.
|
|
SLOW
|
|
|
|
MysqlSecure "sha"
|
|
|
|
Calculates an SHA 160-bit checksum for the password. The value is
|
|
returned as a 40-digit hex number. SLOWEST
|
|
|
|
MysqlSecure "mykey"
|
|
|
|
Encodes the passwords using "mykey" as the encryption password. It
|
|
produces a binary string and can be decoded using the MySQL builtit
|
|
function DECODE(crypt_str,mykey). VARIABLE
|
|
|
|
Caveat: Keep in mind that this if you use any method other than clear
|
|
text, services will need to encrypt/encode every single password on
|
|
every database save. On large networks, it may impact responsiveness
|
|
during the saves.
|
|
|