On Mac:
- Install Postgresql
- Start the postgres service
- Find and click the "Postgres" Elephant icon in you applications, then click "open psql"
- Or, in terminal, run
'/Applications/Postgres.app/Contents/Versions/14.4/bin'/psql -p5432
- -p = port number
- Setup your blake database
- In the postgres terminal, run
CREATE DATABASE blake_archive;
- In the postgres terminal, run
On Unix:
- Install Postgresql
- sudo apt-get install postgresql
- Configure postgresql
- sudo -u postgres psql template1
- ALTER USER postgres with encrypted password 'blake_archive';
- Restart postgresql service
- sudo systemctl restart postgresql.service
- Start psql
- sudo -u postgres psql template1
- Setup your blake database
- In the postgres terminal, run
CREATE DATABASE blake_archive;
- In the postgres terminal, run
- Have Ruby?
ruby -v
- Then
gem install capistrano
- Have Python?
python --version
sudo apt-get install libxml2-dev libxslt-dev gcc zlib1g-dev
easy_install pip #install pip
pip install virtualenv #install virtualenv
cd /place/where/you/want/blake/to/live # you do not need to make a dir, that is the next step
virtualenv blake #create the virtual environment
cd blake #cd into the env
source bin/activate #activate the env
git clone https://github.com/blakearchive/data.git #clone the blakearchive/data repo
git clone https://github.com/blakearchive/archive.git #clone the blakearchvie/archive repo
cd archive #cd into the repo
pip install -r requirements.txt #install the python requirements
or python3 -m pip install -r requirements.txt
In /blake/archive/
cp config.py.example blakearchive/config.py
- Edit db_connection_string with your postgres info
- the postgres app uses
postgres
as the default username with no password, unless you've set your postgres up differently. - keep the
:
if you have no password [host]
should belocalhost
[dbname]
should be the database name you created in step 3 of the postgres instructions
- the postgres app uses
- Add the dir where you keep the blake images
rsync -rv <user>@<server>:<img dir> <local_image_path>
cd ~/path/to/solr/instance # if you followed the apache install instructions, it's likely at ~/solr-5.3.0
bin/solr start
cd server/solr
mkdir blake_object
ln -s <path-to-repo>(probably ~/Sites/blake)/archive/solr/blake-object/conf <path-to-solr-install>/server/solr/blake_object/conf
mkdir blake_work
ln -s <path-to-repo>(probably ~/Sites/blake)/archive/solr/blake-work/conf <path-to-solr-install>/server/solr/blake_work/conf
mkdir blake_copy
ln -s <path-to-repo>(probably ~/Sites/blake)/archive/solr/blake-copy/conf <path-to-solr-install>/server/solr/blake_copy/conf
Go to https://localhost:8983/solr/admin Click "Core Admin" Click "Add Core" Change name and instanceDir to blake_object and click "Add Core" (repeat for blake_copy & blake_work)
You'll need a working copy of the data repo. In /blake/
git clone https://github.com/blakearchive/data.git
Virtualenv needs to be active for any python scripts to work. To instantiate virtualenv, run source bin/activate
in the blake/ directory
In /blake/archive/blakearchive
python import.py '../../data'
python solrimport.py
python homepageimport.py '../../data'
In blake/archive
python run.py