Page "BloodhoundInstall" was changed by rjollos Diff URL: <https://issues.apache.org/bloodhound/wiki/BloodhoundInstall?action=diff&version=26> Revision 26 Comment: Added some nice syntax highlighting. Changes: -------8<------8<------8<------8<------8<------8<------8<------8<-------- Index: BloodhoundInstall ========================================================================= --- BloodhoundInstall (version: 25) +++ BloodhoundInstall (version: 26) @@ -17,11 +17,11 @@ Modern linux distributions often already have the required packages available in their repositories: * For Debian (>= 5.0), Ubuntu (>= 9.4), Mint (>= 7) and other Debian or Ubuntu based systems, if you have admin access through sudo you can run - {{{ + {{{#!sh sudo apt-get install python python-virtualenv }}} * For Fedora (>= 11), Centos (>= 6.4), RHEL (>= 6.4) and other distributions that make use of {{{yum}}} you can try - {{{ + {{{#!sh sudo yum install python python-virtualenv }}} @@ -39,14 +39,14 @@ * [http://initd.org/psycopg/ psycopg2] (for windows [http://stickpeople.com/projects/python/win-psycopg/ win-psycopg]) As before, these are likely to be available on your distribution of Linux: - {{{ + {{{#!sh sudo apt-get install postgresql python-psycopg2 }}} Otherwise you should be able to download and find installation instructions from the above links. Alternatively it might be possible to install psycopg2 using pip but this can be expected to depend on tools to compile and build the code along with any required libraries. Next you will need to add a user and database for bloodhound to use, making sure that the created user is able to access the database. For example: - {{{ + {{{#!sh sudo su - postgres createuser -U postgres -S -D -R -E -P bloodhound createdb -U postgres -O bloodhound -E UTF-8 bloodhound @@ -55,14 +55,14 @@ Notes for windows users: * you may need to specify the path to the {{{createuser}}} and {{{createdb}}} programs. For example with PostgreSQL 9.2 that would be: - {{{ + {{{#!bat C:\Program Files\PostgreSQL\9.2\bin\createuser -U postgres -S -D -R -E -P bloodhound C:\Program Files\PostgreSQL\9.2\bin\createdb -U postgres -O bloodhound -E UTF-8 bloodhound }}} * Both these commands should be expected to ask for the password you set for the postgres user, the first command asking for you to set a password for the new role first. Permissions for database users on some systems may need to be altered - for example on ubuntu 11.10 you may find you need to do the following: - {{{ + {{{#!sh sudo vi /etc/postgresql/9.1/main/pg_hba.conf }}} where you should change the line @@ -75,7 +75,7 @@ }}} and after saving, the database will need to be restarted - {{{ + {{{#!sh sudo /etc/init.d/postgresql restart }}} @@ -83,7 +83,7 @@ Note that the Installation Script does not yet allow for installing with a MySQL database. Although MySQL is supported by Bloodhound, the likelihood of success may be expected to be dependent on the version of MySQL you are trying to use. The MySQL 5.0.x versions are recommended at this point but as this is investigated, further this page will be updated. For MySQL these instructions may work on Ubuntu 11.10 (currently using MySQL 5.1.61): - {{{ + {{{#!sh sudo apt-get install mysql-client mysql-server mysql --user=root --password -e "CREATE DATABASE bloodhound DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;" mysql --user=root --password -e "GRANT ALL ON bloodhound.* TO bloodhound@localhost IDENTIFIED BY 'asecurepasswd';" @@ -97,8 +97,7 @@ To install Bloodhound, the following steps represent the current recommended method: - {{{ - #!sh + {{{#!sh tar xvzf apache-bloodhound-<version number>.tar.gz cd apache-bloodhound-<version number>/installer virtualenv --system-site-packages bloodhound @@ -107,27 +106,24 @@ }}} NOTE: for versions before 0.6.1 you will additionally need to: - {{{ - #!sh + {{{#!sh pip install Babel==0.9.6 }}} NOTE: for version 0.5.2, you will additionally need to: - {{{ - #!sh + {{{#!sh pip install ../bloodhound_search }}} Then run the {{{bloodhound_setup.py}}} script: - {{{ - #!sh + {{{#!sh python bloodhound_setup.py }}} and answer the questions based on whether you chose to use SQLite or PostgreSQL. If you choose an SQLite installation, you should only have to specify a username and password to login to Bloodhound with once it is running. For PostgreSQL, the only extra questions will be to specify the database name, database user and the associated password. In fact it is possible to specify all these details on the command line which also allows you to set additional options like the host for the PostgreSQL database and provide a different location for the installation. For more information on these options, run - {{{ + {{{#!sh python bloodhound_setup.py --help }}} @@ -135,7 +131,7 @@ *.tar.gz format is not natively supported by Windows. You have to use external utilities to extract apache-bloodhound-<version number>.tar.gz file. For example, you can use free utility [http://www.7-zip.org 7-Zip] for such purpose. Amongst the other differences you should use - {{{ + {{{#!bat bloodhound\Scripts\activate.bat }}} to activate the bloodhound environment then also skip the " source ./bloodhound/bin/activate" step in the installation instructions @@ -143,7 +139,7 @@ == Testing the Server == If the bloodhound_setup.py script completed successfully, you will be informed of the appropriate command to run the test server and the appropriate url to check. If you did not set any advanced options, you should find that you can start bloodhound using: - {{{ + {{{#!sh tracd ./bloodhound/environments/main --port=8000 }}} @@ -159,25 +155,25 @@ If you have managed to prove that you can run the system with the standalone tracd, you should now also be able to run through a web server. Here we provide details about how to use the Apache webserver. It is currently recommended to use Apache with mod_wsgi (libapache2-mod-wsgi) to serve Bloodhound. The following instructions require apache to be installed along with the wsgi and auth_digest modules. It is possible to get the trac-admin command to reduce some of the work of creating the wsgi file - {{{ + {{{#!sh source ./bloodhound/bin/activate trac-admin ./bloodhound/environments/main/ deploy ./bloodhound/site }}} You should also make sure that the appropriate modules are enabled for wsgi and htdigest authentication. On ubuntu this would be - {{{ + {{{#!sh sudo a2enmod wsgi sudo a2enmod auth_digest }}} You will then need to create a site configuation for Apache. In ubuntu this can be done like this: - {{{ + {{{#!sh sudo vi /etc/apache2/sites-available/bloodhound }}} Add to this something like (Note that /path/to/bloodhound means /path/to/apache-bloodhound-<version number>/installer/bloodhound) : - {{{ + {{{#!apache <VirtualHost *:8080> WSGIDaemonProcess bh_tracker user=bloodhound python-path=/path/to/bloodhound/lib/python2.7/site-packages WSGIScriptAlias /bloodhound /path/to/bloodhound/site/cgi-bin/trac.wsgi @@ -200,7 +196,7 @@ The user referred to in the WSGIDaemonProcess should be the user that you wish bloodhound to be run as and so that user must have the appropriate set of permissions to access the Bloodhound installation. Running with any special system level privileges should not be required and is not recommended. Then enable the new site, check the apache configuration and restart apache - {{{ + {{{#!sh sudo a2ensite bloodhound sudo apachectl configtest sudo apachectl graceful @@ -213,19 +209,19 @@ === Subversion The `python-subversion` bindings are a pre-requisite. Note that the `python-svn` binding will not work. On Debian or Ubuntu based systems, -{{{#!sh -sudo apt-get install python-subversion -}}} + {{{#!sh + sudo apt-get install python-subversion + }}} On Fedora or Redhat based systems, -{{{#!sh -sudo yum install python-subversion -}}} + {{{#!sh + sudo yum install python-subversion + }}} Next, the `SubversionConnector` component must be enabled. This can be done through the web administration page, or by editing trac.ini: -{{{#!ini -[components] -tracopt.versioncontrol.svn.svn_fs.* = enabled -}}} + {{{#!ini + [components] + tracopt.versioncontrol.svn.svn_fs.* = enabled + }}} It should now be possible to add and synchronize repositories as described on the TracRepositoryAdmin page. -------8<------8<------8<------8<------8<------8<------8<------8<--------
-- Page URL: <https://issues.apache.org/bloodhound/wiki/BloodhoundInstall> Apache Bloodhound <https://issues.apache.org/bloodhound/> The Apache Bloodhound issue tracker This is an automated message. Someone added your email address to be notified of changes on 'BloodhoundInstall' page. If it was not you, please report to .
