Phppgadmin DSM 6 e 6.1

Language plugins e scripts (Java, Node.js, Pearl, PHP, Python, Ruby, ?sh)
Rispondi
Enry71
Utente
Utente
Messaggi: 163
Iscritto il: martedì 20 agosto 2013, 18:52

Phppgadmin DSM 6 e 6.1

Messaggio da Enry71 »

Dopo tante ricerche sono riuscito a trovare una guida per far funzionare Phppgadmin su DSM 6.0 e 6.1, ho provato e perfettamente funzionante, anche se dopo un aggiornamento ho dovuto rifare la procedura per farlo funzionare.
Non mi assumo nessuna responsabilità in caso di problemi.
ecco la guida:

Login to Putty as admin. Get permanent sudo
sudo -i

create folder:
mkdir /usr/syno/synoman/phpsrc

download and install in DSM6.x:
PhpPgAdmin

Create file:
vi /usr/local/etc/nginx/conf.d/www.phppgadmin.conf

Instert:

location ~ ^/phpPgAdmin/ {
fastcgi_read_timeout 300;
root /usr/syno/synoman/phpsrc;
location ~ ^/phpPgAdmin/(.*)/\. {
deny all;
}
location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
expires max;
log_not_found off;
}

location ~* \.php(/|$) {
include fastcgi.conf;
fastcgi_pass unix:/run/php-fpm/php56-fpm.sock;
fastcgi_index index.php;
}
}
location = /phpPgAdmin {
fastcgi_read_timeout 300;
root /usr/syno/synoman/phpsrc;
try_files $uri/ /phpPgAdmin/index.php$is_args$args;
}


alter rights:
chmod 755 /usr/local/etc/nginx/conf.d/www.phppgadmin.conf

reload nginx:
nginx -s reload

vi /usr/local/etc/php56/conf.d/user-settings.ini

add after ".....home"
::/usr/syno/synoman/phpsrc/phpPgAdmin

"Esc" :wq

reboot synology

login to putty and get permanent sudo:
sudo -i

login postgres:
su - postgres
psql

list user and roles:
\du

create admin user in postgres:
CREATE USER admin PASSWORD 'xyz';
ALTER USER admin WITH SUPERUSER;
ALTER USER admin WITH CREATEDB;
ALTER USER admin WITH CREATEROLE;
\du

add 'localhost# to phppgadmin:
cd /usr/syno/synoman/phpsrc/phpPgAdmin/conf
vi config.inc.php

change the line: $conf['servers'][0]['host'] = '';
to: $conf['servers'][0]['host'] = 'localhost';

change extra_login_security to false:
$conf['extra_login_security'] = false;

Exit with :wq

vi /etc/postgresql/pg_hba.conf

i for insert:
host all admin 127.0.0.1/32 trust
GTW: Fritzbox 7490 (6.80) ISP:ADSL Wind Provider(100M) IP: Static
SWC: hp 1810 v2 8 porte
NAS: Synology ds 713+ 4 Gb Ram hd 2X3 WD red, sempre aggiornato ultima versione
CLI: Imac 27 fine 2013, Ubuntu
Smart Tv Samsung, Iphone 6, Ipad Air 2
Rispondi

Torna a “Language plugins e scripts (Java, Node.js, Pearl, PHP, Python, Ruby, ?sh)”