From 47cae94db3714799a1924997a6739f70b8cf1ad5 Mon Sep 17 00:00:00 2001 From: djmcgrath Date: Thu, 1 Nov 2007 21:22:57 +0000 Subject: [PATCH] * Merge all INSTALL files into single one git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1611 c11ca15a-4712-0410-83d8-924469b57eb5 --- INSTALL | 211 +++++++++++++++++++++++++++++++++++++++++------- INSTALL.mysql | 41 ---------- INSTALL.patches | 18 ----- INSTALL.pgsql | 39 --------- INSTALL.sqlite | 31 ------- 5 files changed, 183 insertions(+), 157 deletions(-) delete mode 100644 INSTALL.mysql delete mode 100644 INSTALL.patches delete mode 100644 INSTALL.pgsql delete mode 100644 INSTALL.sqlite diff --git a/INSTALL b/INSTALL index 3a9aabc..12f1b3e 100644 --- a/INSTALL +++ b/INSTALL @@ -1,30 +1,185 @@ -Method of installation. ------------------------ - -- Copy files/sample/* to files/ - -- Edit files/infobot.config, modify to taste. -- Edit files/infobot.servers to modify list of IRC servers to connect. -- Edit files/infobot.chan to set which channels to join. - -- Install the following Perl modules: - - Net::IRC perl module - - Debian: (apt-get install libnet-irc-perl) - - WWW::Search - - Debian: (apt-get install libwww-search-perl) - - LWP - - Debian: (apt-get install libwww-perl) - - HTML::Parser - - Debian: (apt-get install libhtml-parser-perl) - -- Choose your database: - - MySQL, read INSTALL.mysql (supported) - - SQLite, read INSTALL.sqlite (supported) - - SQLite2, read INSTALL.sqlite (supported) - - PgSQL, read INSTALL.pgsql (unsupported, may work) - -- There are "bugs" in the perl modules. Read INSTALL.patches on how to fix. - -- Finally, './infobot' + -------------------------- + -- General Installation -- + -------------------------- + +This file contains some general guidelines for installing infobot on your +system. At this point it is very basic, but should hopefully clear up some of +your confusion. + +Configuration: + + - Copy files/sample/* to files/ + + - Edit files/infobot.config, modify to taste. + - Edit files/infobot.servers to modify list of IRC servers to connect. + - Edit files/infobot.chan to set which channels to join. + +Required Perl modules: + + - Net::IRC perl module + - Debian: (apt-get install libnet-irc-perl) + - WWW::Search + - Debian: (apt-get install libwww-search-perl) + - LWP + - Debian: (apt-get install libwww-perl) + - HTML::Parser + - Debian: (apt-get install libhtml-parser-perl) + - XML::Feed + - Debian: (apt-get install libxml-feed-perl) + +Choose your database: + - MySQL, read the section MySQL below + - SQLite or SQLite2, read the section SQLite below + - PgSQL, read the section PostgreSQL below + +NOTE: There are "bugs" in the perl modules. Read the section "Patches" below, on how to fix. + +Finally, start your bot by changing to the base dir and type: + + ./infobot + + + + ------------- + -- Patches -- + ------------- + +- apply *.patch patches inside patches/ + - cd /usr/lib/perl5/WWW/Search + - patch -p0 < WWW::Search::Google.patch + +- alternatively, move the files from patches/ + - mv patches/Google.pm /usr/lib/perl5/WWW/Search/ + + +Net::IRC DCC CHAT +----------------- +Unfortunately, Net::IRC 0.70 has buggy code that does not detect DCC CHAT +properly. to patch: + - cd /usr/share/perl5/Net/IRC/ + - cat ~bot/patches/Net_IRC_Connection_pm.patch | patch -p0 + + + + + ---------------- + -- PostgreSQL -- + ---------------- + +- Debian: (apt-get install postgresql) +- Debian: (apt-get install libpg-perl) + + +As of now, infobot has full pgsql support. It seems to be working 100%, but it +assumes that you have precreated the database and user for now. As long as you +already created the database and user and stored this info in the +infobot.config, then the tables will automatically be created on startup. Until +I get setup.pl fixed, run the following commands as root (or postgres if root +doesnt have permission to create users/db's): + + > createuser --no-adduser --no-createdb --pwprompt --encrypted + > createdb --owner= [] + +Dont forget to replace and so forth with actual values you intend to use, +and dont include the <>'s ;) If you run these commands, you should get a user +with an encrypted password that cannot create new db's or user's (as it should +be!), and the user will own the newly created database . Congrats! + +If everything went fine, you should have everything infobot needs to use pgsql. +Next simply cd to the base directory you installed the bot to and type: + + ./infobot + + +Thats it! Everything the bot needs should be automatically created when it loads +for the first time. + +In the future I will try to get around to editing the setup.pl file to ask the +same questions it does for mysql (your root password etc) so that you can skip +manually creating the database/user. But for now, this should be just fine for +most of you techies out there. + + + + + ----------- + -- MySQL -- + ----------- + +- Install a MySQL server and the DBI Perl modules. + - Debian: (apt-get install mysql-server libdbd-mysql-perl) + +- Run 'mysqladmin -u root -p create ' + Where is the same as specified in infobot.config. + +- Run 'setup/setup.pl' + FIXME: This script is horribly broken! Do NOT use it! The bot will + automatically create the tables when it starts. You just need to ensure that + the database and the login information are correct, and start the bot. + +Possible problems +----------------- + - if connection to localhost is (short) refused, run + '/etc/init.d/mysql stop' + '/etc/init.d/mysql start' + - if connection for user is refused, reload grant tables with + 'mysqladmin -u root -p reload' + +* [OPTIONAL] + - run 'scripts/dbm2mysql.pl old-db' to convert dbm database file + to mysql. + + +ADDITIONAL NOTES +---------------- +You can add a new user manually by connecting to MySQL and performing these +commands: + + $ mysql -u root -p + + mysql> CREATE DATABASE infobot; + mysql> GRANT USAGE ON *.* TO 'user'@'localhost' IDENTIFIED BY 'yourpassword'; + mysql> GRANT ALL PRIVILEGES ON infobot.* TO 'user'@'localhost'; + +FULL FACTOID DATABASE +--------------------- +You can get the data from the MySQL database that the apt bot uses on +#debian at freenode (irc.freenode.net), at: + + http://lain.cheme.cmu.edu/~apt/infobot/apt.sql.bz2 + + + + + ------------ + -- SQLite -- + ------------ + +SQLite is a C library that implements an embeddable SQL database engine. +Programs that link with the SQLite library can have SQL database access without +running a separate RDBMS process. The distribution comes with a standalone +command-line access program (sqlite) that can be used to administer an SQLite +database and which serves as an example of how to use the SQLite library. + +infobot will create a file called .sqlite and populate the tables for +you if they do not already exist. + +- Install SQLite libraries and DBI Perl modules. + - Debian: (apt-get install libsqlite0 libdbd-sqlite-perl) + +other distros might need to build from sources. + +You may use either DBD::SQLite or DBD::SQLite2 + +SQLite sources: + + http://www.hwaci.com/sw/sqlite/ + +DBD::SQLite sources: + + http://search.cpan.org/author/MSERGEANT/DBD-SQLite/ + +You will also need the normal Perl DBD stuff which should be included in your +Perl distribution. # vim:ts=4:sw=4:expandtab:tw=80 diff --git a/INSTALL.mysql b/INSTALL.mysql deleted file mode 100644 index aac9b46..0000000 --- a/INSTALL.mysql +++ /dev/null @@ -1,41 +0,0 @@ -INSTALL.mysql ----------------- - -- Install a MySQL server and the DBI Perl modules. - - Debian: (apt-get install mysql-server libdbd-mysql-perl) - -- Run 'mysqladmin -u root -p create ' - Where is the same as specified in infobot.config. - -- Run 'setup/setup.pl' - -= Possible problems - - if connection to localhost is (short) refused, run - '/etc/init.d/mysql stop' - '/etc/init.d/mysql start' - - if connection for user is refused, reload grant tables with - 'mysqladmin -u root -p reload' - -* [OPTIONAL] - - run 'scripts/dbm2mysql.pl old-db' to convert dbm database file - to mysql. - -ADDITIONAL NOTES: ------------------ -You can add a new user manually by connecting to MySQL and performing these -commands: - - $ mysql -u root -p - - mysql> CREATE DATABASE infobot; - mysql> GRANT USAGE ON *.* TO 'user'@'localhost' IDENTIFIED BY 'yourpassword'; - mysql> GRANT ALL PRIVILEGES ON infobot.* TO 'user'@'localhost'; - -FULL FACTOID DATABASE: ----------------------- -You can get the data from the MySQL database that the apt bot uses on -#debian at freenode (irc.freenode.net), at: - - http://lain.cheme.cmu.edu/~apt/infobot/apt.sql.bz2 - -# vim:ts=4:sw=4:expandtab:tw=80 diff --git a/INSTALL.patches b/INSTALL.patches deleted file mode 100644 index ab99679..0000000 --- a/INSTALL.patches +++ /dev/null @@ -1,18 +0,0 @@ -INSTALL.patches -------------------- - -- apply *.patch patches inside patches/ - - cd /usr/lib/perl5/WWW/Search - patch -p0 < WWW::Search::Google.patch - -- alternatively, move the files from patches/ - - mv patches/Google.pm /usr/lib/perl5/WWW/Search/ - -Net::IRC DCC CHAT ----------------------- -Unfortunately, Net::IRC 0.70 has buggy code that does not detect DCC CHAT -properly. to patch: - cd /usr/share/perl5/Net/IRC/ - cat ~bot/patches/Net_IRC_Connection_pm.patch | patch -p0 - -# vim:ts=4:sw=4:expandtab:tw=80 diff --git a/INSTALL.pgsql b/INSTALL.pgsql deleted file mode 100644 index 03a3491..0000000 --- a/INSTALL.pgsql +++ /dev/null @@ -1,39 +0,0 @@ -Method of installation. ------------------------ - -- Debian: (apt-get install postgresql) -- Debian: (apt-get install libpg-perl) - - -As of now, infobot has full pgsql support. It seems to be working 100%, but it -assumes that you have precreated the database and user for now. As long as you -already created the database and user and stored this info in the -infobot.config, then the tables will automatically be created on startup. Until -I get setup.pl fixed, run the following commands as root (or postgres if root -doesnt have permission to create users/db's): - -> createuser --no-adduser --no-createdb --pwprompt --encrypted -> createdb --owner= [] - -Dont forget to replace and so forth with actual values you intend to use, -and dont include the <>'s ;) If you run these commands, you should get a user -with an encrypted password that cannot create new db's or user's (as it should -be!), and the user will own the newly created database . Congrats! - -If everything went fine, you should have everything infobot needs to use pgsql. -Next simply cd to the base directory you installed the bot to and type: - -./infobot - - -Thats it! Everything the bot needs should be automatically created when it loads -for the first time. - -In the future I will try to get around to editing the setup.pl file to ask the -same questions it does for mysql (your root password etc) so that you can skip -manually creating the database/user. But for now, this should be just fine for -most of you techies out there. - - ----- -troubled@freenode diff --git a/INSTALL.sqlite b/INSTALL.sqlite deleted file mode 100644 index 34ac090..0000000 --- a/INSTALL.sqlite +++ /dev/null @@ -1,31 +0,0 @@ -INSTALL.sqlite ----------------- - -SQLite is a C library that implements an embeddable SQL database engine. -Programs that link with the SQLite library can have SQL database access without -running a separate RDBMS process. The distribution comes with a standalone -command-line access program (sqlite) that can be used to administer an SQLite -database and which serves as an example of how to use the SQLite library. - -infobot will create a file called .sqlite and populate the tables for -you if they do not already exist. - -- Install SQLite libraries and DBI Perl modules. - - Debian: (apt-get install libsqlite0 libdbd-sqlite-perl) - -other distros might need to build from sources. - -You may use either DBD::SQLite or DBD::SQLite2 - -SQLite sources: - -http://www.hwaci.com/sw/sqlite/ - -DBD::SQLite sources: - -http://search.cpan.org/author/MSERGEANT/DBD-SQLite/ - -You will also need the normal Perl DBD stuff which should be included in your -Perl distribution. - -# vim:ts=4:sw=4:expandtab:tw=80 -- 2.39.5