-
Notifications
You must be signed in to change notification settings - Fork 7
/
INSTALL-CENTOS7
69 lines (44 loc) · 1.81 KB
/
INSTALL-CENTOS7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Install on CentOS7:
This bot is intended to run in a dedicated host/container.
yum groupinstall "Development Tools"
yum install mariadb mariadb-libs mariadb-server aspell aspell-devel perl-App-cpanminus
# SETUP DB SERVER
$ secure_mysql_setup
$ mysql -uroot -p
CREATE DATABASE $MYSQL_DATABASE
CREATE USER '$MYSQL_USERNAME'@'localhost';
GRANT ALL ON $MYSQL_DATABASE.* to '$MYSQL_USERNAME'@'localhost';
SET PASSWORD for '$MYSQL_USERNAME'@'localhost' = PASSWORD('$MYSQL_PASSWORD');
$ sudo -u $user
$ vi .my.cnf (create .my.cnf)
$ exit
DSN LINE IS: 'dsn' => ['DBI:mysql:database=$MYSQL_DATABASE;host=localhost', '$MYSQL_USERNAME', '$MYSQL_PASSWORD', {}, { 'quote_names' => 1 }],
# INSTALL PERL DEPS
$ cpanm Bot::BasicBot DBIx::Class JSON Net::Twitter DBD::mysql DateTime::Format::MySQL DateTime JSON Hailo Date::Parse Text::Aspell URI::Find HTML::TreeBuilder::XPath JSON::XS HTTP::Tiny WWW::Wunderground::API File::Cache SQL::Translator Hail Text::
# git clone
git clone https://github.com/MattDees/GeckBot.git
# Install mysql schema
perl create_scemas.pl
mysql freenode_towele < dbscriptdir/GeckBot-Logger-0.2-MySQL.sql
# copy script
cp geckbot.pl.sample mybot.pl
# edit config
The config is stored in the .pl file itself:
$ vi mybot.pl
required fields to edit:
server => "irc.freenode.net",
channels => ["#geckbot"],
nick => "skagbot",
'dsn' => ['DBI:mysql:database=$MYSQL_DATABASE;host=localhost', '$MYSQL_USERNAME', '$MYSQL_PASSWORD', {}, { 'quote_names' => 1 }],
#plugin specific configs:
Weather:
wunderground_api => { 'key' => ' WUNDERGROUND API KEY ' },
Reddit:
reddit_config => {
'#geckbot' => 'funny',
},
Hailo:
'hailo' => { brn_path => 'towel-e-new.brn' },
# RUN THE BOT
If you incantations have been correct, this should get your bot running
$ perl mybot.pl