diff --git a/Home.md b/Home.md index ef50234..9ba1605 100644 --- a/Home.md +++ b/Home.md @@ -6,12 +6,19 @@ These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. -### Install required software +### Step1: install required system tools and programming languages * [System Tools Installation (Ubuntu)](SystemToolsUbuntu) -* [Solr](Solr) -## Installation +### Step 2. install PostgreSQL database: + +* [PostgreSQL Installation an database creation (Ubuntu)](SystemToolsUbuntu) + +### Step 3. install and configure Solr + +* [Solr on Ubuntu](Solr) + +### Step 4. Download and Install Tethys: Please check the official laravel installation guide for server requirements before you start. [Official Documentation](https://laravel.com/docs/6.x/installation#installation) diff --git a/installs/PostgreSQL.md b/installs/PostgreSQL.md new file mode 100644 index 0000000..af91ae3 --- /dev/null +++ b/installs/PostgreSQL.md @@ -0,0 +1,94 @@ +## Install PostgreSQL + +`sudo apt install postgresql postgresql-contrib` + +response: +The following additional packages will be installed:\ + libllvm10 postgresql-12 postgresql-client-12 postgresql-client-common postgresql-common ssl-cert sysstat\ +Suggested packages:\ + postgresql-doc postgresql-doc-12 libjson-perl openssl-blacklist isag\ +The following NEW packages will be installed:\ + libllvm10 postgresql postgresql-12 postgresql-client-12 postgresql-client-common postgresql-common\ + postgresql-contrib ssl-cert sysstat\ +0 upgraded, 9 newly installed, 0 to remove and 10 not upgraded. + +After installing PostgreSQL, the commands below can be used to stop, start, enable and check its status: + +```bash +sudo systemctl stop postgresql.service +sudo systemctl start postgresql.service +sudo systemctl enable postgresql.service +sudo systemctl status postgresql.service +``` + +Viewing the server version\ +`/usr/lib/postgresql/12/bin/postgres -V`\ +response:\ +postgres (PostgreSQL) 12.2 (Ubuntu 12.2-4) + +## Create PostgreSQL Linux User Password + +After installing PostgreSQL, it’s a good idea to create / change the default PostgreSQL user password + +`sudo passwd postgres` + +You should be prompted to create a new Linux password for postgres user. + +```bash +New password: +Retype new password: +passwd: password updated successfully +``` + +## Accessing PostgreSQL and create TETHYS database + +log in as the postgres user… to do that run the commands below:\ +`sudo su -l postgres` + +Then use the psql command in an interactive shell when you want to create and manage PostgreSQL databases:\ +`psql` + +On psql shell, run below command to change database admin password:\ +`alter user postgres password 'new_db_admin_password';` + +Create a admin user called tethys_admin with new password:\ +`postgres=# create user tethys_admin with encrypted password 'new_password_here';` + +Create an app user called tethys_app with new password:\ +`postgres=# create user tethys_app with encrypted password 'new_password_here';` + +then create a database called tethys via psql:\ +`postgres=# create database tethys;`\ +use postgres ist default owner of db tethys + +exit psql:\ +`\q` + +and re-login into tethys db:\ +`psql -d tethys -U postgres -p 5432` + +create a schemma 'gba' for all tethys tabels with full authorization for the user 'tethys_admin':\ +`tethys=# CREATE SCHEMA IF NOT EXISTS gba AUTHORIZATION tethys_admin;` + +grant select, insert, update and delete privileges for the user 'tethys_app':\ + +```sql +grant usage on schema gba to tethys_app; + +grant select, insert, update, delete on all tables in schema gba to tethys_app; +alter default privileges for role tethys_admin in schema gba grant select, insert, update, delete on tables to tethys_app; + +grant usage on all sequences in schema gba to tethys_app; +alter default privileges for role tethys_admin in schema gba grant usage on sequences to tethys_app; + +grant execute on all functions in schema gba to tethys_app; +alter default privileges for role tethys_admin in schema gba grant execute on functions to tethys_app; +``` + +exit psql:\ +`\q` + +switch back to your os user:\ +`exit` + +[go mack to main installation](https://github.com/geolba/tethys/wiki#step-4.-download-and-install-tethys) diff --git a/installs/SystemToolsUbuntu.md b/installs/SystemToolsUbuntu.md index 528b5e7..30f2c94 100644 --- a/installs/SystemToolsUbuntu.md +++ b/installs/SystemToolsUbuntu.md @@ -4,11 +4,11 @@ **install git:** - sudo apt install git +`sudo apt install git` **install curl:** - sudo apt install curl, unzip +`sudo apt install curl, unzip' ## Installation Nginx WebServer @@ -49,11 +49,11 @@ The following NEW packages will be installed:\ php7.4-curl php7.4-fpm php7.4-gd php7.4-json php7.4-mbstring php7.4-opcache php7.4-pgsql php7.4-readline php7.4-xml php7.4-xsl\ 0 upgraded, 21 newly installed, 0 to remove and 0 not upgraded. -**php settings for nginx:** +After installing PHP 7.4, run the commands below to open PHP default config file for Nginx... + Open configuration file:\ `sudo nano /etc/php/7.4/fpm/php.ini` -+ Update the configuration file with these and save… ++ Then make the changes on the following lines below in the file and save. The value below are great settings to apply in your environments. ```ini file_uploads = On @@ -101,3 +101,6 @@ Test your installation:\ + Set adoptopjdk as default java version:\ `sudo update-alternatives --config java` + ++ test java installation:\ +`java -version`