Auto-tools/Projects/GrafxBot/Install
< Auto-tools | Projects
Jump to navigation
Jump to search
Installing GrafxBot servers
Prerequisites
- MySQL Community Server 5.x from http://mysql.com/downloads/mysql/; install the server, client utilities, and development libraries
- Python 2.6
- MySQL-Python from http://sourceforge.net/projects/mysql-python/
- Django 1.2.x
- Any webserver supported by Django
Installation Steps
- Download the Django GrafxBot app:
hg clone http://bitbucket.org/jonallengriffin/resultserv
- Edit resultserv/settings.py, and update DATABASE_USER, DATABASE_PASSWORD, and DATABASE_HOST as appropriate.
- Create a database named 'resultserv' in MySQL.
- In the resultserv directory, enter the following command; this should generate the necessary SQL tables. When prompted for a superuser, add one of your choice.
python manage.py syncdb
- Edit your web site's config to serve files for the /resultserv/ url. The way this is done varies depending on your webserver, for nginx this involes adding a block like this to your nginx.conf:
location ~ ^/resultserv/media/(.*)$ {
alias /path/to/resultserv/media/$1;
}
location /resultserv {
fastcgi_pass 127.0.0.1:8090;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
}
- Start the Django GrafxBot server. The command used to do this varies on your website's configuration, but for nginx and the config block above, this might be:
python manage.py runfcgi method=threaded host=127.0.0.1 port=8090
- Start the GrafxBot data insertion daemon, updating the --pidfile and --logfile path as needed; make sure the specified paths exist:
python insert.py --pidfile=/usr/local/logs/insert.pid --logfile=/usr/local/logs/insert.log