Requires:
-
Git (
git
)
-
PostgreSQL 8.2 or later (
psql
)
-
Python 2.5 or later (
python
)
-
Psycopg2 - Python driver for PostgreSQL
-
Wget (
wget
)
- simplejson - Fast JSON codec for Python
Note: "Pharos", the name of the lighthouse of Alexandria, is the internal name for the Open Library.
Setup:
$ export DB=openlibrary
$ git clone git://github.com/openlibrary/openlibrary.git
$ cd openlibrary
$ ./setup.sh
$ createdb $DB
$ cd pharos
$ python schema.py | psql $DB
$ cp sample_run.py run.py
$# Edit run.py to change database settings, including db="$DB"
$ python run.py --create
$ python run.py movefiles
$ wget http://openlibrary.org/static/sampledump.txt.gz
$ python run.py sampleload sampledump.txt.gz
Run:
$ python run.py startserver [your server IP address] [port number]
For example, if you want to run it on port 9070, you'd run:
$ python run.py startserver 9070
cygwin users may need to specify an IP; i.e. if your server IP is 192.168.1.100, run:
$ python run.py startserver 192.168.1.100
History
- Created June 15, 2010
- 80 revisions
June 26, 2018 | Edited by Mek | Edited without comment. |
December 30, 2014 | Edited by Anand Chitipothu | Edited without comment. |
December 30, 2014 | Edited by Anand Chitipothu | Edited without comment. |
December 30, 2014 | Edited by Anand Chitipothu | Edited without comment. |
June 15, 2010 | Edited by mangtronix | python-genshi is an optional package that is used for output sanitization |