1 --------------------------
2 -- General Installation --
3 --------------------------
5 This file contains some general guidelines for installing infobot on your
6 system. At this point it is very basic, but should hopefully clear up some of
11 - Copy files/sample/* to files/
13 - Edit files/infobot.config, modify to taste.
14 - Edit files/infobot.servers to modify list of IRC servers to connect.
15 - Edit files/infobot.chan to set which channels to join.
17 Required Perl modules:
19 - Net::IRC perl module
20 - Debian: (apt-get install libnet-irc-perl)
22 - Debian: (apt-get install libwww-search-perl)
24 - Debian: (apt-get install libwww-perl)
26 - Debian: (apt-get install libhtml-parser-perl)
28 - Debian: (apt-get install libxml-feed-perl)
31 - MySQL, read the section MySQL below
32 - SQLite or SQLite2, read the section SQLite below
33 - PgSQL, read the section PostgreSQL below
35 NOTE: There are "bugs" in the perl modules. Read the section "Patches" below, on how to fix.
37 Finally, start your bot by changing to the base dir and type:
47 - apply *.patch patches inside patches/
48 - cd /usr/lib/perl5/WWW/Search
49 - patch -p0 < WWW::Search::Google.patch
51 - alternatively, move the files from patches/
52 - mv patches/Google.pm /usr/lib/perl5/WWW/Search/
57 Unfortunately, Net::IRC 0.70 has buggy code that does not detect DCC CHAT
59 - cd /usr/share/perl5/Net/IRC/
60 - cat ~bot/patches/Net_IRC_Connection_pm.patch | patch -p0
69 - Debian: (apt-get install postgresql)
70 - Debian: (apt-get install libpg-perl)
73 As of now, infobot has full pgsql support. It seems to be working 100%, but it
74 assumes that you have precreated the database and user for now. As long as you
75 already created the database and user and stored this info in the
76 infobot.config, then the tables will automatically be created on startup. Until
77 I get setup.pl fixed, run the following commands as root (or postgres if root
78 doesnt have permission to create users/db's):
80 > createuser --no-adduser --no-createdb --pwprompt --encrypted <user>
81 > createdb --owner=<user> <dbname> [<description>]
83 Dont forget to replace <user> and so forth with actual values you intend to use,
84 and dont include the <>'s ;) If you run these commands, you should get a user
85 with an encrypted password that cannot create new db's or user's (as it should
86 be!), and the user will own the newly created database <dbname>. Congrats!
88 If everything went fine, you should have everything infobot needs to use pgsql.
89 Next simply cd to the base directory you installed the bot to and type:
94 Thats it! Everything the bot needs should be automatically created when it loads
97 In the future I will try to get around to editing the setup.pl file to ask the
98 same questions it does for mysql (your root password etc) so that you can skip
99 manually creating the database/user. But for now, this should be just fine for
100 most of you techies out there.
109 - Install a MySQL server and the DBI Perl modules.
110 - Debian: (apt-get install mysql-server libdbd-mysql-perl)
112 - Run 'mysqladmin -u root -p create <DB NAME>'
113 Where <DB NAME> is the same as specified in infobot.config.
115 - Run 'setup/setup.pl'
116 FIXME: This script is horribly broken! Do NOT use it! The bot will
117 automatically create the tables when it starts. You just need to ensure that
118 the database and the login information are correct, and start the bot.
122 - if connection to localhost is (short) refused, run
123 '/etc/init.d/mysql stop'
124 '/etc/init.d/mysql start'
125 - if connection for user is refused, reload grant tables with
126 'mysqladmin -u root -p reload'
129 - run 'scripts/dbm2mysql.pl old-db' to convert dbm database file
135 You can add a new user manually by connecting to MySQL and performing these
140 mysql> CREATE DATABASE infobot;
141 mysql> GRANT USAGE ON *.* TO 'user'@'localhost' IDENTIFIED BY 'yourpassword';
142 mysql> GRANT ALL PRIVILEGES ON infobot.* TO 'user'@'localhost';
144 FULL FACTOID DATABASE
145 ---------------------
146 You can get the data from the MySQL database that the apt bot uses on
147 #debian at freenode (irc.freenode.net), at:
149 http://lain.cheme.cmu.edu/~apt/infobot/apt.sql.bz2
158 SQLite is a C library that implements an embeddable SQL database engine.
159 Programs that link with the SQLite library can have SQL database access without
160 running a separate RDBMS process. The distribution comes with a standalone
161 command-line access program (sqlite) that can be used to administer an SQLite
162 database and which serves as an example of how to use the SQLite library.
164 infobot will create a file called <DBname>.sqlite and populate the tables for
165 you if they do not already exist.
167 - Install SQLite libraries and DBI Perl modules.
168 - Debian: (apt-get install libsqlite0 libdbd-sqlite-perl)
170 other distros might need to build from sources.
172 You may use either DBD::SQLite or DBD::SQLite2
176 http://www.hwaci.com/sw/sqlite/
180 http://search.cpan.org/author/MSERGEANT/DBD-SQLite/
182 You will also need the normal Perl DBD stuff which should be included in your
185 # vim:ts=4:sw=4:expandtab:tw=80