]> git.donarmstrong.com Git - infobot.git/blob - INSTALL
dunno
[infobot.git] / INSTALL
1                            --------------------------
2                            -- General Installation --
3                            --------------------------
4
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
7 your confusion.
8
9 Configuration:
10
11     - Copy files/sample/* to files/
12
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.
16
17 Required Perl modules:
18
19     - Net::IRC perl module
20         - Debian: (apt-get install libnet-irc-perl)
21     - WWW::Search
22         - Debian: (apt-get install libwww-search-perl)
23     - LWP
24         - Debian: (apt-get install libwww-perl)
25     - HTML::Parser
26         - Debian: (apt-get install libhtml-parser-perl)
27     - XML::Feed
28         - Debian: (apt-get install libxml-feed-perl)
29
30 Choose your database:
31         - MySQL, read the section MySQL below
32         - SQLite or SQLite2, read the section SQLite below
33         - PgSQL, read the section PostgreSQL below
34
35 NOTE: There are "bugs" in the perl modules.  Read the section "Patches" below, on how to fix.
36
37 Finally, start your bot by changing to the base dir and type:
38
39     ./infobot
40
41
42
43                                 ----------------
44                                 -- PostgreSQL --
45                                 ----------------
46
47 - Debian: (apt-get install postgresql)
48 - Debian: (apt-get install libpg-perl)
49
50
51 As of now, infobot has full pgsql support. It seems to be working 100%, but it
52 assumes that you have precreated the database and user for now. As long as you
53 already created the database and user and stored this info in the
54 infobot.config, then the tables will automatically be created on startup. Until
55 I get setup.pl fixed, run the following commands as root (or postgres if root
56 doesnt have permission to create users/db's):
57
58     > createuser --no-adduser --no-createdb --pwprompt --encrypted <user>
59     > createdb --owner=<user> <dbname> [<description>]
60
61 Dont forget to replace <user> and so forth with actual values you intend to use,
62 and dont include the <>'s ;) If you run these commands, you should get a user
63 with an encrypted password that cannot create new db's or user's (as it should
64 be!), and the user will own the newly created database <dbname>. Congrats!
65
66 If everything went fine, you should have everything infobot needs to use pgsql.
67 Next simply cd to the base directory you installed the bot to and type:
68
69     ./infobot
70
71
72 Thats it! Everything the bot needs should be automatically created when it loads
73 for the first time.
74
75 In the future I will try to get around to editing the setup.pl file to ask the
76 same questions it does for mysql (your root password etc) so that you can skip
77 manually creating the database/user. But for now, this should be just fine for
78 most of you techies out there.
79
80
81
82
83                                   -----------
84                                   -- MySQL --
85                                   -----------
86
87 - Install a MySQL server and the DBI Perl modules.
88     - Debian: (apt-get install mysql-server libdbd-mysql-perl)
89
90 - Run 'mysqladmin -u root -p create <DB NAME>'
91     Where <DB NAME> is the same as specified in infobot.config.
92
93 - Run 'setup/setup.pl'
94     FIXME: This script is horribly broken! Do NOT use it! The bot will
95     automatically create the tables when it starts. You just need to ensure that
96     the database and the login information are correct, and start the bot.
97
98 Possible problems
99 -----------------
100     - if connection to localhost is (short) refused, run
101             '/etc/init.d/mysql stop'
102             '/etc/init.d/mysql start'
103     - if connection for user is refused, reload grant tables with
104             'mysqladmin -u root -p reload'
105
106 * [OPTIONAL]
107     - run 'scripts/dbm2mysql.pl old-db' to convert dbm database file
108     to mysql.
109
110
111 ADDITIONAL NOTES
112 ----------------
113 You can add a new user manually by connecting to MySQL and performing these
114 commands:
115
116   $ mysql -u root -p
117
118   mysql> CREATE DATABASE infobot;
119   mysql> GRANT USAGE ON *.* TO 'user'@'localhost' IDENTIFIED BY 'yourpassword';
120   mysql> GRANT ALL PRIVILEGES ON infobot.* TO 'user'@'localhost';
121
122 FULL FACTOID DATABASE
123 ---------------------
124 You can get the data from the MySQL database that the apt bot uses on
125 #debian at freenode (irc.freenode.net), at:
126
127     http://lain.cheme.cmu.edu/~apt/infobot/apt.sql.bz2
128
129
130
131
132                                   ------------
133                                   -- SQLite --
134                                   ------------
135
136 SQLite is a C library that implements an embeddable SQL database engine.
137 Programs that link with the SQLite library can have SQL database access without
138 running a separate RDBMS process. The distribution comes with a standalone
139 command-line access program (sqlite) that can be used to administer an SQLite
140 database and which serves as an example of how to use the SQLite library.
141
142 infobot will create a file called <DBname>.sqlite and populate the tables for
143 you if they do not already exist.
144
145 - Install SQLite libraries and DBI Perl modules.
146     - Debian: (apt-get install libsqlite0 libdbd-sqlite-perl)
147
148 other distros might need to build from sources.
149
150 You may use either DBD::SQLite or DBD::SQLite2
151
152 SQLite sources:
153
154     http://www.hwaci.com/sw/sqlite/
155
156 DBD::SQLite sources:
157
158     http://search.cpan.org/author/MSERGEANT/DBD-SQLite/
159
160 You will also need the normal Perl DBD stuff which should be included in your
161 Perl distribution.
162
163 # vim:ts=4:sw=4:expandtab:tw=80