Installing Textual Communities on your own computer

This installation is designed and tested for use on a Mac OS X computer running Mavericks.  It should work on earlier Mac OS X systems (later than 10.5) also, and on Linux and Unix systems.  We have not tested this for Windows computers, though all components are known to work on Windows machines. You will need to know how to use the Macintosh Terminal application (in /Applications/Utiliities on your Mac.)

Before you start, you need to install rather a lot of software on your computer:

        ruby -e "$(curl -fsSL"

The versions of Python and Mysl pre-installed on the Macintosh are not adequate for our purposes. We require development tools which are not part of the standard Mac installation. We use Python as the scripting language to hold it all together, Mysql as the database to hold all data. At the terminal prompt type the following lines one at a time, hitting return after each line:

        brew install python
        brew install mysql

At this point, you will be prompted to create a root password, by running the command mysql_secure_installation.  Paste the following into the terminal, and press return:


IMPORTANT. Take note of the password you create here: you will need it later.

You now need rabbitMQ (to handle messaging between parts of Textual Communities), Bower (to handle javascript libraries), libjpeg (to handle jpeg images), and Git (to grab our code off the internet). Type or paste the following lines into the terminal window one at a time, with a return after each:

           brew install rabbitmq
           brew install npm
           npm install -g bower
           brew install git
           brew install libjpeg

You are now ready to pull our Textual Commmunities code onto your computer. You need to create a directory on your computer into which the code will be placed:

  1. Create a directory from the finder in the Mac, for example TCInstall in the Applications folder (thus, with the path /Applications/TCInstall
  • At the terminal: move into this directory by typing the following at the terminal prompt, and hitting the return key
        cd /Applications/TCInstall

Now, get the code and install it, by pasting the following lines at the terminal prompt, with a return after each line (it helps to cross your fingers at this moment).

         git clone|
         cd api

Now, presuming all is in order, we have to configure what we have loaded. Start the mysql server, by typing the following at the terminal prompt:

          mysql.server start

Not, type at the terminal prompt:

           mysql -u root -p  

You will be prompted for the root password you created a few steps ago. Enter this. The prompt will now change to mysql> prompt.  Paste the following commands at this prompt, making sure you include the trailing semi-colon, and pressing return after each:

          CREATE DATABASE api CHARACTER SET utf8 COLLATE utf8_bin;
          CREATE USER 'api'@'localhost' IDENTIFIED BY 'api';
          GRANT ALL ON api.* TO 'api'@'localhost';

You should be back at the api> prompt now.  You now need to activate the virtual environment.  This was created for you, within the api directory, so that Textual Communities can run in its own envelope without affecting anything else on your computer. At the terminal prompt, type or paste (followed by a return, and being sure to include the opening period) 

          . venv/bin/activate

You now should install the default specimen database which comes with this starter kit.  Type the following into the terminal and press return:

          mysql -u api -p api < setup/dbspecimen.sql

You will be prompted for a password. Use the password 'api' (the password for user api which you just created).

Your installation is now ready!  You can now start up the various pieces which make the TC puzzle work:

  1. Open a new terminal window. Type rabbitmq-server into the terminal (followed by return).  This starts the messaging system (you might need to give the full path to rabbitmq, typically /usr/local/sbin/rabbitmq-server)
  2. Start the celery server, in its own venv.  Start a new terminal window.  Move into the same api folder you created earlier (by cd /Applications/TCInstall/api), and type . venv/bin/activate into the terminal, and then celery worker --app=mycelery -l info (followed by return in each case)
  3. Go back to first terminal window, which should be showing a prompt such as "(venv)PeterMac:api".  Type the following into the terminal followed by the return
          python runserver & ./collatex/collatex-tools-1.5/bin/collatex-server & 

You should get a happy series of messages!

If all is well: you are ready to start using the specimen database:

  1. Go to a web browser, and type localhost:8000 into the address bar.  You should see links to the fundamental api calls underlying the whole TC system
  2. Type http://localhost:8000/client/index.html into your browser.  You should get the base TC home page
  3. Click on "Sign in" in the top right.  Use 'admin' for both user name and password.
  4. You can add users and assign them roles, etc, via the fundamental django administrative interface: localhost:8000/admin

You now have access through this interface to all the basic functions of the system.

0 Attachments
Average (0 Votes)
No comments yet. Be the first.