{"id":7367,"date":"2018-05-03T10:05:37","date_gmt":"2018-05-03T02:05:37","guid":{"rendered":"http:\/\/rmohan.com\/?p=7367"},"modified":"2018-05-03T10:05:37","modified_gmt":"2018-05-03T02:05:37","slug":"install-and-configure-postgresql-10-on-fedora-27","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=7367","title":{"rendered":"Install and Configure PostgreSQL 10 on Fedora 27"},"content":{"rendered":"<p>add software source<br \/>\nrmohan.com@fedora1 ~ $ sudo dnf install https:\/\/download.postgresql.org\/pub\/repos\/yum\/10\/fedora\/fedora-27-x86_64\/pgdg-fedora10-10-3.noarch.rpm<br \/>\nLast metadata expiration check: 7:30:40 ago on Tue 02 Jan 2018 10:32:40 AM CST.<br \/>\npgdg-fedora10-10-3.noarch.rpm 6.9 kB\/s | 8.8 kB 00:01<br \/>\nDependencies resolved.<br \/>\n==============================================================================================================================================================================================================================================<br \/>\nPackage Arch Version Repository Size<br \/>\n==============================================================================================================================================================================================================================================<br \/>\nInstalling:<br \/>\npgdg-fedora10 noarch 10-3 @commandline 8.8 k<\/p>\n<p>Transaction Summary<br \/>\n==============================================================================================================================================================================================================================================<br \/>\nInstall 1 Package<\/p>\n<p>Total size: 8.8 k<br \/>\nInstalled size: 3.2 k<br \/>\nIs this ok [y\/N]: y<br \/>\nDownloading Packages:<br \/>\nRunning transaction check<br \/>\nTransaction check succeeded.<br \/>\nRunning transaction test<br \/>\nTransaction test succeeded.<br \/>\nRunning transaction<br \/>\nPreparing : 1\/1<br \/>\nInstalling : pgdg-fedora10-10-3.noarch 1\/1<br \/>\nVerifying : pgdg-fedora10-10-3.noarch 1\/1<\/p>\n<p>Installed:<br \/>\npgdg-fedora10.noarch 10-3<\/p>\n<p>Complete!<br \/>\n1.2, install the server and client<br \/>\nrmohan.com@fedora1 ~ $ sudo dnf install postgresql10-server postgresql10<br \/>\nPostgreSQL 10 27 &#8211; x86_64 76 kB\/s | 164 kB 00:02<br \/>\nLast metadata expiration check: 0:00:00 ago on Tue 02 Jan 2018 06:03:33 PM CST.<br \/>\nDependencies resolved.<br \/>\n==============================================================================================================================================================================================================================================<br \/>\nPackage Arch Version Repository Size<br \/>\n==============================================================================================================================================================================================================================================<br \/>\nInstalling:<br \/>\npostgresql10 x86_64 10.1-1PGDG.f27 pgdg10 1.5 M<br \/>\npostgresql10-server x86_64 10.1-1PGDG.f27 pgdg10 4.4 M<br \/>\nInstalling dependencies:<br \/>\nlibicu x86_64 57.1-9.fc27 updates 8.4 M<br \/>\npostgresql10-libs x86_64 10.1-1PGDG.f27 pgdg10 354 k<\/p>\n<p>Transaction Summary<br \/>\n==============================================================================================================================================================================================================================================<br \/>\nInstall 4 Packages<\/p>\n<p>Total download size: 15 M<br \/>\nInstalled size: 54 M<br \/>\nIs this ok [y\/N]: y<br \/>\nDownloading Packages:<br \/>\n(1\/4): postgresql10-10.1-1PGDG.f27.x86_64.rpm 203 kB\/s | 1.5 MB 00:07<br \/>\n(2\/4): libicu-57.1-9.fc27.x86_64.rpm 3.8 MB\/s | 8.4 MB 00:02<br \/>\n(3\/4): postgresql10-libs-10.1-1PGDG.f27.x86_64.rpm 36 kB\/s | 354 kB 00:09<br \/>\n(4\/4): postgresql10-server-10.1-1PGDG.f27.x86_64.rpm 138 kB\/s | 4.4 MB 00:32<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nTotal 460 kB\/s | 15 MB 00:32<br \/>\nRunning transaction check<br \/>\nTransaction check succeeded.<br \/>\nRunning transaction test<br \/>\nTransaction test succeeded.<br \/>\nRunning transaction<br \/>\nPreparing : 1\/1<br \/>\nInstalling : libicu-57.1-9.fc27.x86_64 1\/4<br \/>\nRunning scriptlet: libicu-57.1-9.fc27.x86_64 1\/4<br \/>\nInstalling : postgresql10-libs-10.1-1PGDG.f27.x86_64 2\/4<br \/>\nRunning scriptlet: postgresql10-libs-10.1-1PGDG.f27.x86_64 2\/4<br \/>\nInstalling : postgresql10-10.1-1PGDG.f27.x86_64 3\/4<br \/>\nRunning scriptlet: postgresql10-10.1-1PGDG.f27.x86_64 3\/4<br \/>\nRunning scriptlet: postgresql10-server-10.1-1PGDG.f27.x86_64 4\/4<br \/>\nInstalling : postgresql10-server-10.1-1PGDG.f27.x86_64 4\/4<br \/>\nRunning scriptlet: postgresql10-server-10.1-1PGDG.f27.x86_64 4\/4<br \/>\nVerifying : postgresql10-server-10.1-1PGDG.f27.x86_64 1\/4<br \/>\nVerifying : postgresql10-10.1-1PGDG.f27.x86_64 2\/4<br \/>\nVerifying : postgresql10-libs-10.1-1PGDG.f27.x86_64 3\/4<br \/>\nVerifying : libicu-57.1-9.fc27.x86_64 4\/4<\/p>\n<p>Installed:<br \/>\npostgresql10.x86_64 10.1-1PGDG.f27 postgresql10-server.x86_64 10.1-1PGDG.f27 libicu.x86_64 57.1-9.fc27 postgresql10-libs.x86_64 10.1-1PGDG.f27<\/p>\n<p>Complete!<br \/>\nWhat we have to say here is that dnf and yum are similar, and they are more efficient than yum in performance. This is also the mainstream package management tool for<br \/>\nRedHat &#8216;s distribution suites.<\/p>\n<p>1.3, initialization<br \/>\nrmohan.com@fedora1 ~ $ sudo \/usr\/pgsql-10\/bin\/postgresql-10-setup initdb<br \/>\nInitializing database &#8230; OK<\/p>\n<p>rmohan.com@fedora1 ~ $ sudo systemctl enable postgresql-10.service<br \/>\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/postgresql-10.service ? \/usr\/lib\/systemd\/system\/postgresql-10.service.<br \/>\nrmohan.com@fedora1 ~ $ sudo systemctl start postgresql-10.service<br \/>\nrmohan.com@fedora1 ~ $ sudo systemctl status postgresql-10.service<br \/>\n? postgresql-10.service &#8211; PostgreSQL 10 database server<br \/>\nLoaded: loaded (\/usr\/lib\/systemd\/system\/postgresql-10.service; enabled; vendor preset: disabled)<br \/>\nActive: active (running) since Tue 2018-01-02 18:07:03 CST; 12s ago<br \/>\nDocs: https:\/\/www.postgresql.org\/docs\/10\/static\/<br \/>\nProcess: 4654 ExecStartPre=\/usr\/pgsql-10\/bin\/postgresql-10-check-db-dir ${PGDATA} (code=exited, status=0\/SUCCESS)<br \/>\nMain PID: 4659 (postmaster)<br \/>\nTasks: 8 (limit: 4915)<br \/>\nCGroup: \/system.slice\/postgresql-10.service<br \/>\n??4659 \/usr\/pgsql-10\/bin\/postmaster -D \/var\/lib\/pgsql\/10\/data\/<br \/>\n??4660 postgres: logger process<br \/>\n??4662 postgres: checkpointer process<br \/>\n??4663 postgres: writer process<br \/>\n??4664 postgres: wal writer process<br \/>\n??4665 postgres: autovacuum launcher process<br \/>\n??4666 postgres: stats collector process<br \/>\n??4667 postgres: bgworker: logical replication launcher<\/p>\n<p>Jan 02 18:07:03 fedora1 systemd[1]: Starting PostgreSQL 10 database server&#8230;<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.166 CST [4659] LOG: listening on IPv6 address &#8220;::1&#8221;, port 5432<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.166 CST [4659] LOG: listening on IPv4 address &#8220;127.0.0.1&#8221;, port 5432<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.168 CST [4659] LOG: listening on Unix socket &#8220;\/var\/run\/postgresql\/.s.PGSQL.5432&#8221;<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.170 CST [4659] LOG: listening on Unix socket &#8220;\/tmp\/.s.PGSQL.5432&#8221;<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.176 CST [4659] LOG: redirecting log output to logging collector process<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.176 CST [4659] HINT: Future log output will appear in directory &#8220;log&#8221;.<br \/>\nJan 02 18:07:03 fedora1 systemd[1]: Started PostgreSQL 10 database server.<br \/>\n1.4, local access<br \/>\npostgres@fedora1 ~ $ psql<br \/>\npsql (10.1)<br \/>\nType &#8220;help&#8221; for help.<\/p>\n<p>postgres=# \\l<br \/>\nList of databases<br \/>\nName | Owner | Encoding | Collate | Ctype | Access privileges<br \/>\n&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\npostgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |<br \/>\ntemplate0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres +<br \/>\n| | | | | postgres=CTc\/postgres<br \/>\ntemplate1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres +<br \/>\n| | | | | postgres=CTc\/postgres<br \/>\n(3 rows)<\/p>\n<p>postgres=#<br \/>\n2, configuration<br \/>\nWe know that under normal circumstances, you need to access the postgresql service on a host other than the host. However, by default, postgresql only provides local access. To allow other hosts to access, you need to configure the following.<\/p>\n<p>2.1. Open support for non-local visits.<br \/>\nPostgresql configuration files in fedora&#8217;s distribution suite are mainly in the data directory, ie \/var\/lib\/pgsql\/10\/data\/<\/p>\n<p>postgres@fedora1 ~ $ psql<br \/>\npsql (10.1)<br \/>\nType &#8220;help&#8221; for help.<\/p>\n<p>postgres=# \\l<br \/>\nList of databases<br \/>\nName | Owner | Encoding | Collate | Ctype | Access privileges<br \/>\n&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\npostgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |<br \/>\ntemplate0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres +<br \/>\n| | | | | postgres=CTc\/postgres<br \/>\ntemplate1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres +<br \/>\n| | | | | postgres=CTc\/postgres<br \/>\n(3 rows)<\/p>\n<p>postgres=# \\q<br \/>\npostgres@fedora1 ~ $ ll \/var\/lib\/pgsql\/10\/data\/<br \/>\ntotal 136<br \/>\ndrwx&#8212;&#8212;. 20 postgres postgres 4096 Jan 2 18:07 .<br \/>\ndrwx&#8212;&#8212;. 4 postgres postgres 4096 Jan 2 18:06 ..<br \/>\ndrwx&#8212;&#8212;. 5 postgres postgres 4096 Jan 2 18:06 base<br \/>\n-rw&#8212;&#8212;-. 1 postgres postgres 30 Jan 2 18:07 current_logfiles<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:08 global<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:07 log<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:06 pg_commit_ts<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:06 pg_dynshmem<br \/>\n-rw&#8212;&#8212;-. 1 postgres postgres 4269 Jan 2 18:06 pg_hba.conf<br \/>\n-rw&#8212;&#8212;-. 1 postgres postgres 1636 Jan 2 18:06 pg_ident.conf<br \/>\ndrwx&#8212;&#8212;. 4 postgres postgres 4096 Jan 2 18:12 pg_logical<br \/>\ndrwx&#8212;&#8212;. 4 postgres postgres 4096 Jan 2 18:06 pg_multixact<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:07 pg_notify<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:06 pg_replslot<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:06 pg_serial<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:06 pg_snapshots<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:06 pg_stat<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:21 pg_stat_tmp<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:06 pg_subtrans<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:06 pg_tblspc<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:06 pg_twophase<br \/>\n-rw&#8212;&#8212;-. 1 postgres postgres 3 Jan 2 18:06 PG_VERSION<br \/>\ndrwx&#8212;&#8212;. 3 postgres postgres 4096 Jan 2 18:06 pg_wal<br \/>\ndrwx&#8212;&#8212;. 2 postgres postgres 4096 Jan 2 18:06 pg_xact<br \/>\n-rw&#8212;&#8212;-. 1 postgres postgres 88 Jan 2 18:06 postgresql.auto.conf<br \/>\n-rw&#8212;&#8212;-. 1 postgres postgres 22761 Jan 2 18:06 postgresql.conf<br \/>\n-rw&#8212;&#8212;-. 1 postgres postgres 58 Jan 2 18:07 postmaster.opts<br \/>\n-rw&#8212;&#8212;-. 1 postgres postgres 103 Jan 2 18:07 postmaster.pid<br \/>\npostgres@fedora1 ~ $<br \/>\nWe first modify the configuration postgresql.conf, open the restrictions on non-host access, open the file with vim,<\/p>\n<p>59 #listen_addresses = &#8216;localhost&#8217; # what IP address(es) to listen on;<br \/>\n???<br \/>\n59 #listen_addresses = &#8216;*&#8217; # what IP address(es) to listen on;<\/p>\n<p>Then use vim to open the file pg_hba.conf, find 82 lines<\/p>\n<p>82 host all all 127.0.0.1\/32 ident<br \/>\nAdd later<\/p>\n<p>83 host all all 192.168.1.0\/24 trust<br \/>\nAt this point, restart the postgresql database.<\/p>\n<p>postgres@fedora1 ~ $ vim \/var\/lib\/pgsql\/10\/data\/postgresql.conf<br \/>\npostgres@fedora1 ~ $ vim \/var\/lib\/pgsql\/10\/data\/pg_hba.conf<br \/>\npostgres@fedora1 ~ $ exit<br \/>\nlogout<br \/>\nrmohan.com@fedora1 ~ $ sudo systemctl start postgresql-10.service<br \/>\n[sudo] password for rmohan.com:<br \/>\nlwk@fedora1 ~ $ sudo systemctl status postgresql-10.service<br \/>\n? postgresql-10.service &#8211; PostgreSQL 10 database server<br \/>\nLoaded: loaded (\/usr\/lib\/systemd\/system\/postgresql-10.service; enabled; vendor preset: disabled)<br \/>\nActive: active (running) since Tue 2018-01-02 18:07:03 CST; 29min ago<br \/>\nDocs: https:\/\/www.postgresql.org\/docs\/10\/static\/<br \/>\nProcess: 4654 ExecStartPre=\/usr\/pgsql-10\/bin\/postgresql-10-check-db-dir ${PGDATA} (code=exited, status=0\/SUCCESS)<br \/>\nMain PID: 4659 (postmaster)<br \/>\nTasks: 8 (limit: 4915)<br \/>\nCGroup: \/system.slice\/postgresql-10.service<br \/>\n??4659 \/usr\/pgsql-10\/bin\/postmaster -D \/var\/lib\/pgsql\/10\/data\/<br \/>\n??4660 postgres: logger process<br \/>\n??4662 postgres: checkpointer process<br \/>\n??4663 postgres: writer process<br \/>\n??4664 postgres: wal writer process<br \/>\n??4665 postgres: autovacuum launcher process<br \/>\n??4666 postgres: stats collector process<br \/>\n??4667 postgres: bgworker: logical replication launcher<\/p>\n<p>Jan 02 18:07:03 fedora1 systemd[1]: Starting PostgreSQL 10 database server&#8230;<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.166 CST [4659] LOG: listening on IPv6 address &#8220;::1&#8221;, port 5432<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.166 CST [4659] LOG: listening on IPv4 address &#8220;127.0.0.1&#8221;, port 5432<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.168 CST [4659] LOG: listening on Unix socket &#8220;\/var\/run\/postgresql\/.s.PGSQL.5432&#8221;<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.170 CST [4659] LOG: listening on Unix socket &#8220;\/tmp\/.s.PGSQL.5432&#8221;<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.176 CST [4659] LOG: redirecting log output to logging collector process<br \/>\nJan 02 18:07:03 fedora1 postmaster[4659]: 2018-01-02 18:07:03.176 CST [4659] HINT: Future log output will appear in directory &#8220;log&#8221;.<br \/>\nJan 02 18:07:03 fedora1 systemd[1]: Started PostgreSQL 10 database server.<br \/>\nrmohan.com@fedora1 ~ $<br \/>\n2.1. Modify the firewall configuration.<br \/>\nModifying the firewall configuration will add port number 5432 to the firewall whitelist. There are many ways to use ufw<\/p>\n<p>rmohan.com@fedora1 ~ $ dnf list ufw<br \/>\nLast metadata expiration check: 0:00:36 ago on Tue 02 Jan 2018 06:41:47 PM CST.<br \/>\nAvailable Packages<br \/>\nufw.noarch 0.35-9.fc27 fedora<br \/>\nrmohan.com@fedora1 ~ $ sudo dnf install ufw<br \/>\nLast metadata expiration check: 0:39:13 ago on Tue 02 Jan 2018 06:03:33 PM CST.<br \/>\nDependencies resolved.<br \/>\n==============================================================================================================================================================================================================================================<br \/>\nPackage Arch Version Repository Size<br \/>\n==============================================================================================================================================================================================================================================<br \/>\nInstalling:<br \/>\nufw noarch 0.35-9.fc27 fedora 222 k<\/p>\n<p>Transaction Summary<br \/>\n==============================================================================================================================================================================================================================================<br \/>\nInstall 1 Package<\/p>\n<p>Total download size: 222 k<br \/>\nInstalled size: 978 k<br \/>\nIs this ok [y\/N]: y<br \/>\nDownloading Packages:<br \/>\nufw-0.35-9.fc27.noarch.rpm 99 kB\/s | 222 kB 00:02<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nTotal 98 kB\/s | 222 kB 00:02<br \/>\nRunning transaction check<br \/>\nTransaction check succeeded.<br \/>\nRunning transaction test<br \/>\nTransaction test succeeded.<br \/>\nRunning transaction<br \/>\nPreparing : 1\/1<br \/>\nInstalling : ufw-0.35-9.fc27.noarch 1\/1<br \/>\nRunning scriptlet: ufw-0.35-9.fc27.noarch 1\/1<br \/>\nRunning as unit: run-rcf2b3a65bf7d43b78a6d1e515b174178.service<br \/>\nVerifying : ufw-0.35-9.fc27.noarch 1\/1<\/p>\n<p>Installed:<br \/>\nufw.noarch 0.35-9.fc27<\/p>\n<p>Complete!<br \/>\nrmohan.com@fedora1 ~ $<br \/>\nrmohan.com@fedora1 ~ $ sudo ufw status<br \/>\nStatus: inactive<br \/>\nrmohan.com@fedora1 ~ $ sudo ufw enable<br \/>\nCommand may disrupt existing ssh connections. Proceed with operation (y|n)? y<br \/>\nFirewall is active and enabled on system startup<br \/>\nrmohan.com@fedora1 ~ $ sudo ufw status<br \/>\nStatus: active<\/p>\n<p>To Action From<br \/>\n&#8212; &#8212;&#8212; &#8212;-<br \/>\nSSH ALLOW Anywhere<br \/>\n224.0.0.251 mDNS ALLOW Anywhere<br \/>\nSSH (v6) ALLOW Anywhere (v6)<br \/>\nff02::fb mDNS ALLOW Anywhere (v6)<\/p>\n<p>rmohan.com@fedora1 ~ $ sudo ufw allow 5432<br \/>\nRule added<br \/>\nRule added (v6)<br \/>\nrmohan.com@fedora1 ~ $ sudo ufw default deny<br \/>\nDefault incoming policy changed to &#8216;deny&#8217;<br \/>\n(be sure to update your rules accordingly)<br \/>\nrmohan.com@fedora1 ~ $ sudo systemctl enable ufw.service<br \/>\nCreated symlink \/etc\/systemd\/system\/basic.target.wants\/ufw.service ? \/usr\/lib\/systemd\/system\/ufw.service.<br \/>\nrmohan.com@fedora1 ~ $ sudo systemctl restart ufw.service<br \/>\nrmohan.com@fedora1 ~ $ sudo systemctl status ufw.service<br \/>\n? ufw.service &#8211; Uncomplicated firewall<br \/>\nLoaded: loaded (\/usr\/lib\/systemd\/system\/ufw.service; enabled; vendor preset: disabled)<br \/>\nActive: active (exited) since Tue 2018-01-02 18:47:35 CST; 13s ago<br \/>\nDocs: man:ufw(8)<br \/>\nman:ufw-framework(8)<br \/>\nfile:\/\/usr\/share\/doc\/ufw\/README<br \/>\nProcess: 6171 ExecStart=\/usr\/libexec\/ufw\/ufw-init start (code=exited, status=0\/SUCCESS)<br \/>\nMain PID: 6171 (code=exited, status=0\/SUCCESS)<\/p>\n<p>Jan 02 18:47:34 fedora1 systemd[1]: Starting Uncomplicated firewall&#8230;<br \/>\nJan 02 18:47:35 fedora1 systemd[1]: Started Uncomplicated firewall.<br \/>\nrmohan.com@fedora1 ~ $ sudo ufw status<br \/>\nStatus: active<\/p>\n<p>To Action From<br \/>\n&#8212; &#8212;&#8212; &#8212;-<br \/>\nSSH ALLOW Anywhere<br \/>\n224.0.0.251 mDNS ALLOW Anywhere<br \/>\n5432 ALLOW Anywhere<br \/>\nSSH (v6) ALLOW Anywhere (v6)<br \/>\nff02::fb mDNS ALLOW Anywhere (v6)<br \/>\n5432 (v6) ALLOW Anywhere (v6)<\/p>\n<p>rmohan.com@fedora1 ~ $<\/p>\n","protected":false},"excerpt":{"rendered":"<p>add software source rmohan.com@fedora1 ~ $ sudo dnf install https:\/\/download.postgresql.org\/pub\/repos\/yum\/10\/fedora\/fedora-27-x86_64\/pgdg-fedora10-10-3.noarch.rpm Last metadata expiration check: 7:30:40 ago on Tue 02 Jan 2018 10:32:40 AM CST. pgdg-fedora10-10-3.noarch.rpm 6.9 kB\/s | 8.8 kB 00:01 Dependencies resolved. ============================================================================================================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================================================================================================== Installing: pgdg-fedora10 noarch 10-3 @commandline 8.8 k<\/p>\n<p>Transaction Summary ============================================================================================================================================================================================================================================== Install 1 Package<\/p>\n<p>Total size: [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[93],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7367"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7367"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7367\/revisions"}],"predecessor-version":[{"id":7368,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7367\/revisions\/7368"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}