-
Notifications
You must be signed in to change notification settings - Fork 5
/
INSTALL
145 lines (107 loc) · 4.71 KB
/
INSTALL
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
$Id: INSTALL,v 1.4.2.2 2011/06/22 05:35:58 ak Exp $
-------------------------------------------------------------------------------
To install this system; bounceHammer, cd to the directory that contains this
file and type the following commands:
# ./configure
# make
# make test
# make install
-------------------------------------------------------------------------------
1. Check required perl modules, Use Modules.PL script at the top directory
# perl ./Modules.PL check
*[ NG ] Class::Accessor::Fast::XS
[ OK ] File::Spec VERSION = 3.12
*[ NG ] Term::ProgressBar
*[ NG ] Time::Piece
...
*[ NG ] is missing module, [ OK ] is installed module.
-------------------------------------------------------------------------------
2. Install all of the missing perl modules
If 'Time::Piece' module does not exist, Install the module by executing the
following command.
# cpan Time::Piece
or
# perl -MCPAN -e 'install Time::Piece'
...
Then, Check again.
# perl ./Modules.PL check
------ OR IF YOU USE cpanm COMMAND ------
# cpanm -l /usr/local/bouncehammer Time::Piece
or
# perl ./Modules.PL missing | cut -d' ' -f4 | cpanm -l /usr/local/bouncehammer
-------------------------------------------------------------------------------
3. Build: configure and make
* Available configure options
--prefix <dir> Install directory, Default is /usr/local/bouncehammer
--with-perl <path> Path to perl interpreter, If you have multiple perl.
--disable-webui=<yes|no> Disable WebUI, Default is no.
e.g.)
# ./configure --prefix=/usr/local/bouncehammer --with-perl=/usr/local/bin/perl
# make && make test && make install
...
------ OR IF YOU INSTALLED REQUIRED PERL MODULES BY cpanm COMMAND ------
# PERL5LIB=/usr/local/bouncehammer/lib/perl5 ./configure
# make
# PERL5LIB=/usr/local/bouncehammer/lib/perl5 make test && make install
...
-------------------------------------------------------------------------------
4. Setting up database
e.g.)
- Database name = bouncehammer
- Database hostname = 127.0.0.1
- Database username = bouncehammer
- Database password = 794-uguisu-heiankyo
* MySQL
# /usr/local/bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1537
Server version: 5.1.44 Source distribution
...
mysql> CREATE DATABASE bouncehammer;
mysql> GRANT ALL PRIVILEGES ON bouncehammer.* TO bouncehammer@127.0.0.1 IDENTIFIED BY '794-uguisu-heiankyo';
mysql> FLUSH PRIVILEGES;
* PostgreSQL
% su - postgres
$ cd /usr/local/pgsql
$ ./bin/createuser bouncehammer
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) y
$ ./bin/createdb -Obouncehammer bouncehammer
$ ./bin/psql
psql (8.4.4)
Type "help" for help.
postgres=# ALTER USER bouncehammer password '794-uguisu-heiankyo';
ALTER ROLE
* SQLite
# touch /usr/local/bouncehammer/var/db/bouncehammer.db
-------------------------------------------------------------------------------
5. Setting up tables of the database
# cd /usr/local/bouncehammer/share/script
* MySQL
# cat ./MySQL*.sql | /usr/local/mysql/bin/mysql -ubouncehammer -Dbouncehammer -h127.0.0.1 -p
Enter password: 794-uguisu-heiankyo
# cat ./mastertable-* | /usr/local/mysql/bin/mysql -ubouncehammer -Dbouncehammer -h127.0.0.1 -p
Enter password: 794-uguisu-heiankyo
* PostgreSQL
# cat ./PostgreSQL*.sql | /usr/local/pgsq/bin/psql -Ubouncehammer -dbouncehammer
# cat ./mastertable-* | /usr/local/pgsq/bin/psql -Ubouncehammer -dbouncehammer
* SQLite
# cat ./SQLite*.sql | sqlite3 /usr/local/bouncehammer/var/db/bouncehammer
# cat ./mastertable-* | sqlite3 /usr/local/bouncehammer/var/db/bouncehammer
-------------------------------------------------------------------------------
6. Configuration files
# cd /usr/local/bouncehammer/etc
# cp ./bouncehammer.cf-example ./bouncehammer.cf
# cp ./webui.cf-example ./webui.cf
And edit database sction at bouncehammer.cf
The following files are optional.
# cp ./neighbor-domains-example ./neighbor-domains
# cp ./available-countries-example ./available-countries
-------------------------------------------------------------------------------
7. Copy CGI script file to the document root
# cd /usr/local/bouncehammer/share/script
# cp ./bouncehammer.cgi /path/to/docroot-of-webui/
# chmod a+x /path/to/docroot-of-webui/bouncehammer.cgi
# cp ./api.cgi /path/to/docroot-of-httpapi/
# chmod a+x /path/to/docroot-of-httpapi/api.cgi