Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Remove the old version of postgres:
    1. sudo apt-get purge postgresql*
  2. Create the file /etc/apt/sources.list.d/pgdg.list
  3. Add the lineĀ  deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main to that
  4. Add the repo key with this command
    1. wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
  5. sudo apt-get update
  6. sudo apt-get install postgresql-9.5
  7. Log in as postgres and enter psql
    1. sudo su postgres
    2. psql
  8. In Postgres create the chf_hydra and fcrepo databases
    1. CREATE DATABASE chf_hydra;
    2. CREATE DATABASE fcrepo;
  9. In Postgres create the needed users
    1. CREATE USER chf_pg_hydra WITH PASSWORD 'SEE ANSIBLE GROUPVARS/ALL';
    2. CREATE USER trilby WITH PASSWORD 'porkpie2';
  10. Grant each user access to their table
    1. GRANT Create,Connect,Temporary ON DATABASE chf_hydra TO chf_pg_hydra;
    2. GRANT All Privileges ON DATABASE fcrepo TO trilby;
  11. Set the user password for postgres
    1. \password postgres
    2. Enter password from groupvars/all
  12. sudo nano /etc/postgresql/9.5/main/pg_hba.conf
  13. Change the sections under "Database administrative login by Unix domain socket"
    1. peer should be set to md5 for
      1. local all postgres
      2. local all all
      3. host all all
  14. Restart postgres, try to log in with
    1. psql -U postgres
  15. If it lets you use the password, it works!

Fedora

  • Stop Tomcat
    • sudo service tomcat7 stop
  • Replace the current /etc/default/tomcat7 with

# A backup of the original file with addition options is at /etc/default/tomcat7.bak
TOMCAT7_USER=tomcat7
TOMCAT7_GROUP=tomcat7
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
#Postgres
JAVA_OPTS="-Dfcrepo.home=/opt/fedora-data -Dfcrepo.modeshape.configuration=classpath:/config/jdbc-postgresql/repository.json -Dfcrepo.postgresql.username=trilby -Dfcrepo.postgresql.password=porkpie2 -Dfcrepo.postgresql.host=localhost -Dfcrepo.postgresql.port=5432 -Djava.awt.headless=true -XX:+UseG1GC -XX:+UseCompressedOops -XX:-UseLargePagesIndividualAllocation -XX:MaxPermSize=128M -Xms512m -Xmx4096m -Djava.util.logging.config.file=/etc/tomcat7/logging.properties -server"

  • Start Tomcat
    • sudo service tomcat7 start

Fedora export

In sufia 6 instance:

...