In order to install and run ht://Check you need a GNU/Linux system with:
However, ht://Check compiles on other POSIX platforms: so please, if you try and successfully install it, please drop me a line with the characteristics of your system. I have used the GNU/GCC compiler in order to build it (version 2.95, 2.96 and 3.0).
You can download ht://Check from
http://htcheck.sourceforge.net/
.
Usually you download ht://Check sources in a 'tar.gz' file. In order to decompress them with the following command:
tar xzvf filename.tar.gz
configure
make
make install
configure
script
For more info on the 'configure
' script, run:
configure --help
By default, ht://Check is installed into the /opt/htcheck directory. And everything is under that directory. Nothing is put out of it. If you want to specify another directory of installation, just use the configuration option --prefix=DIR. For example, if you want to install it into the /myapps/htcheck dir, just run configure with this option too:
configure [other options] --prefix=/myapps/htcheck
ht://Check needs MySQL support. Since newer versions of MySQL installs its various components under /usr/local, this is the default. If you have it under a different location, you can specify it with (assuming in /opt/local):
--with-mysql=/opt/local
Otherwise just use: --with-mysql or nothing.
If you configured ht://Check with dynamic libraries linking (this is the
default), you need to let htcheck
know where they are at run-time.
In order to do this, you have two chances: as root, edit /etc/ld.so.conf
, insert
here the mysql library path (for instance /usr/local/mysql/lib/mysql) and run
ldconfig
. Otherwise, you can just put this path in the environment variable
LD_LIBRARY_PATH
, in this way:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib/mysql
Of course, if you specified a different path for MySQL, just substitute it the path above in order to make it point to the .so files for the client libraries.
The 'php
' directory contains the php scripts that you can put everywhere
into the document root of your web server. By default it's installed into
the php
directory of the application, but you can set it to a different
path with the configure option --with-php-dir=DIR
.
Since version 1.1 you no longer have to set asp_tags
on in order
to make the scripts work; also, you needn't set the handler for .inc files
as long as there are no more files with that extension.
After this, your environment is ready. Now, you have to change the settings
into the 'include/global.inc.php
' file regarding the hostname, and the
authentication credentials for MySQL connections. Of course you need to
have the access granted to the MySQL database server from the computer
you run these scripts.
From version 1.1.0b9-klunk, it's possible to specify in
the 'include/global.inc.php
' file which database/s you want
to query, by editing the $dblist variable. By default, this
variable is empty, so the PHP script performs a query on the
MySQL server in order to get a list of databases which may
belong to ht://Check. By setting this to one or more values,
this passage is skipped.
It is possible to customize the language sentences too. For now I only have 3
language files: english (en.inc.php), italian (it.inc.php) and german
(de.inc.php, thanks to Michael Stenitzer).
They're under the include dir of php scripts: you only have to change
the '$Language
' variable value into the 'global.inc.php
' file or
just leave the script detect it by itself, depending on the language settings of
the browser.
If you feel like adding a new language, feel free to do it and please post it to me and I'll get it downloadable by everyone. Of course your name will be on it for ever ... ;-)
In order to run the htcheck
program, you must connect to the
MySQL server as a valid user, with enough permissions. As long as the spider
needs to create and drop databases, tables and indexes too,
perform insert, update and delete operations you must grant to it these rights
(by altering the 'user' table's contents of the 'mysql' database
on the MySQL server). So, set to 'Y' these fields values:
However, you are suggested to give a look at the following section.
As far as the PHP interface is concerned, you may want to give the user specified in the 'global.inc.php' file at least the select privilege (jump to this paragraph).
In order to access a MySQL server, you got 2 choices:
We were saying that you can create or use an existing option file for MySQL, where you can specify the host to be accessed, the user, the password, the port and the socket.
By default, ht://Check looks for the ~/.my.cnf
file
and if this is not found the global option file for mysql is
searched (/etc/my.cnf
). You can change the prefix ('my') with
the mysql_conf_file_prefix
configuration
option. The group searched is [client] but it can be customised with
mysql_conf_group
.
For example, you can write the /.my.cnf file this way:
[client]
host=mysqlserver.mydomain.com
user=htcheck
password=ht12345
You can also specify a different port
or socket
.
You are strongly recommended to change this file permissions to 600.
It goes without saying that in both cases you have to grant permissions to the user ht://Check is connecting as. See the previous section and MySQL documentation for more info on this subject.