- exact postgresql installation
parent
ee31c11542
commit
a33582b737
11
Home.md
11
Home.md
|
@ -22,13 +22,14 @@ These instructions will get you a copy of the project up and running on your loc
|
||||||
|
|
||||||
Please check the official laravel installation guide for server requirements before you start. [Official Documentation](https://laravel.com/docs/6.x/installation#installation)
|
Please check the official laravel installation guide for server requirements before you start. [Official Documentation](https://laravel.com/docs/6.x/installation#installation)
|
||||||
|
|
||||||
Clone the repository
|
Create web folder:\
|
||||||
|
`sudo mkdir -p /var/www/tethys-app/`
|
||||||
|
|
||||||
git clone git@github.com:geolba/tethys.git
|
Clone the repository to your web folder:\
|
||||||
|
`git clone git@github.com:geolba/tethys.git /var/www/tethys-app/`
|
||||||
|
|
||||||
Switch to the repo folder
|
Switch to the repo folder:\
|
||||||
|
`cd /var/www/tethys-app/`
|
||||||
cd tethys-app
|
|
||||||
|
|
||||||
Install all the dependencies using composer
|
Install all the dependencies using composer
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,42 @@ Retype new password:
|
||||||
passwd: password updated successfully
|
passwd: password updated successfully
|
||||||
```
|
```
|
||||||
|
|
||||||
## Accessing PostgreSQL and create TETHYS database
|
## CONNECTIONS AND AUTHENTICATION
|
||||||
|
|
||||||
log in as the postgres user… to do that run the commands below:\
|
### postgresql.conf
|
||||||
|
|
||||||
|
Most global configuration settings are stored in postgresql.conf, which is created automatically when you install PostgreSQL. Open this file in your preferred text editor:\
|
||||||
|
`sudo nano /etc/postgresql/10/main/postgresql.conf`
|
||||||
|
|
||||||
|
By default, Postgres only listens on localhost. However, by editing the listen_addresses-section and replacing localhost with an IP, you can force Postgres to listen on another IP. Use '*' to listen on all IP addresses, restrict access via firewall.\
|
||||||
|
`listen_addresses= '*'`
|
||||||
|
|
||||||
|
### pg_hba.conf
|
||||||
|
|
||||||
|
It’s now time to open the (in)famous pg_hba.conf configuration file, located at /etc/postgresql/10/main/pg_hba.conf:
|
||||||
|
|
||||||
|
`sudo nano /etc/postgresql/10/main/pg_hba.conf`
|
||||||
|
|
||||||
|
HBA stands for host-based authentication. Basically, this file is used to control how PostgreSQL users are authenticated.\
|
||||||
|
`host all all 127.0.0.1/32 md5`\
|
||||||
|
This line allows "all" users to login using TCP/IP ("host") from the localhost "127.0.0.1/32" to "all" databases, if they succeed in password authentication using the "md5" method. There are more password authentication methods (md5, scram-sha-256, gss, ldap, …) than we can cover, so let’s just get back to simpler examples.
|
||||||
|
|
||||||
|
In most cases the access is restricted to localhost and the clients vlan e.g.:
|
||||||
|
|
||||||
|
```ini
|
||||||
|
# existing entry, allows connections from localhost
|
||||||
|
host all all 127.0.0.1/32 md5
|
||||||
|
|
||||||
|
# new entry to allow connections from 192.168.101.1/24 subnet,
|
||||||
|
host all all 192.168.101.1/24 md5
|
||||||
|
|
||||||
|
# ip of your webserver
|
||||||
|
host all all xxx.xxx.xxx.xxx/24 md5
|
||||||
|
```
|
||||||
|
|
||||||
|
## App setup
|
||||||
|
|
||||||
|
let’s connect as the superuser “postgres” to make the changes:\
|
||||||
`sudo su -l postgres`
|
`sudo su -l postgres`
|
||||||
|
|
||||||
Then use the psql command in an interactive shell when you want to create and manage PostgreSQL databases:\
|
Then use the psql command in an interactive shell when you want to create and manage PostgreSQL databases:\
|
||||||
|
|
|
@ -2,11 +2,16 @@
|
||||||
|
|
||||||
## System Tools
|
## System Tools
|
||||||
|
|
||||||
**install git:**
|
**install and configure git with your name:**
|
||||||
|
|
||||||
`sudo apt install git`
|
```bash
|
||||||
|
sudo apt install git
|
||||||
|
git config --global user.name "John Doe"
|
||||||
|
git config --global user.email john.doe@example.com
|
||||||
|
git config --list --show-origin
|
||||||
|
```
|
||||||
|
|
||||||
**install curl:**
|
**other useful tools:**
|
||||||
|
|
||||||
`sudo apt install curl, unzip`
|
`sudo apt install curl, unzip`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user