From: wbudic Date: Wed, 11 Aug 2021 06:57:01 +0000 (+1000) Subject: rem. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=4a6837f9331bf00e8139a13b11f68cd06d7e6036;p=LifeLog.git rem. --- diff --git a/Installation_ProgresSQL.txt b/Installation_ProgresSQL.txt deleted file mode 100644 index bdb3232..0000000 --- a/Installation_ProgresSQL.txt +++ /dev/null @@ -1,81 +0,0 @@ -# Notes - -PostgreSQL Server is a full database service solution (RDBSM). Handling interaction, like multiple enterprise schemas, databases, users and backups. -These all are and can be handled outside the scope of the LifeLog application. -However, it is not required or recommended to have a fully managed database system service, just to use for the LifeLog app. - - -Modify the following anon driver property tag in dbLifeLog/main.cnf to specify: -< - -The alias is by default assumed the actual database name as well as the user. - -Modify the following anon property, to have the SQL Server provide multiple users as different aliases for the loging into a specified single database. -< -to something like, to make logins now for the database users: -< -Where 'lifelog' is the server managed database. - -Hope all works for you, and happy logging! - - -# Install ProgreSQL -sudo mkdir /usr/include/postgresql -## Create the file repository configuration: -sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - -## Import the repository signing key: -wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - - -## Update the package lists: -sudo apt-get update -y -sudo apt upgrade -y - -## Install the latest version of PostgreSQL. -## If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql': -sudo apt-get -y install libpq-dev -sudo apt-get -y install postgresql-12 - -## Optional -> Enable port 5432 for PG server for local network on server. -sudo uwf allow 5432/tcp -sudo vim /etc/postgresql/12/main/postgresql.conf to modify--> listen_addresses = '*' -sudo vim pg_hba.conf -> -host all all 0.0.0.0/0 md5 -host all all ::/0 md5 -sudo service postgresql restart - -## Install required libpq-dev to compile test perl driver, later. -sudo apt install libpq-dev - -## Install perl driver. -sudo cpan DBD::Pg; - - -# To assign default Postgres SQL user roles. -sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" -sudo -u postgres psql -c "CREATE ROLE lifelog WITH LOGIN SUPERUSER CREATEDB CREATEROLE INHERIT NOREPLICATION CONNECTION LIMIT -1 PASSWORD 'xxxxxxx'"; -sudo -u postgres psql -c "CREATE DATABASE lifelog;" -sudo -u postgres psql -c "grant all privileges on database lifelog to lifelog;" - -## Start stop Postgres SQL -sudo service postgresql start - -## Manually Obtain dep. if encountering lib problems. with i.e.: -wget https://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-12/libpq-dev_12.4-1.pgdg20.04+1_amd64.deb -dpkg -i libpq-dev_12.4-1.pgdg20.04+1_amd64.deb -###Than run again driver install -sudo cpan DBD::Pg; - -# Installing pgAdmin4 -sudo apt install python3-pip -sudo python3 -m pip install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v4.30/pip/pgadmin4-4.30-py3-none-any.whl - -# Data directory location for backup -sudo -u postgres psql -c "SHOW data_directory;" | grep -G / -## Quick tar all -sudo tar czvf ~/postgresql.db.backup.tar $(sudo -u postgres psql -c "SHOW data_directory;" | grep -G /) - - - - -