Kamis, 21 Januari 2021

Cara Install PgAdmin dan Postgresql di Linux Centos 8

 


Melanjutkan instalasi server Centos kemarin, dimana ada cara instalasi baru di Linux Centos 8, yaitu dengan menggunakan "dnf". Kali ini saya akan sedikit share cara install PgAdmin dan Postgresql di Linux Centos 8.

Cara nya adalah :

1. Disable modul postgresql :

# dnf -qy module disable postgresql

Failed to set locale, defaulting to C.UTF-8

2. Download dan install PgAdmin dengan dnf :

# dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 1:02:16 ago on Mon Jan 18 23:04:16 2021.
pgdg-redhat-repo-latest.noarch.rpm                                                                                    2.9 kB/s |  11 kB     00:03    
Dependencies resolved.
======================================================================================================================================================
 Package                                  Architecture                   Version                           Repository                            Size
======================================================================================================================================================
Installing:
 pgdg-redhat-repo                         noarch                         42.0-14                           @commandline                          11 k

Transaction Summary
======================================================================================================================================================
Install  1 Package

Total size: 11 k
Installed size: 11 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                              1/1 
  Installing       : pgdg-redhat-repo-42.0-14.noarch                                                                                              1/1 
  Verifying        : pgdg-redhat-repo-42.0-14.noarch                                                                                              1/1 
Installed products updated.

Installed:
  pgdg-redhat-repo-42.0-14.noarch                                                                                                                     

Complete!

3. Install postgresql dengan dnf dari repository :

# dnf install postgresql12 postgresql12-server

Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:00:31 ago on Tue Jan 19 00:07:12 2021.
Dependencies resolved.
======================================================================================================================================================
 Package                                    Architecture                  Version                                 Repository                     Size
======================================================================================================================================================
Installing:
 postgresql12                               x86_64                        12.5-1PGDG.rhel8                        pgdg12                        1.7 M
 postgresql12-server                        x86_64                        12.5-1PGDG.rhel8                        pgdg12                        5.2 M
Installing dependencies:
 postgresql12-libs                          x86_64                        12.5-1PGDG.rhel8                        pgdg12                        396 k

Transaction Summary
======================================================================================================================================================
Install  3 Packages

Total download size: 7.3 M
Installed size: 31 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): postgresql12-libs-12.5-1PGDG.rhel8.x86_64.rpm                                                                  201 kB/s | 396 kB     00:01    
(2/3): postgresql12-12.5-1PGDG.rhel8.x86_64.rpm                                                                       492 kB/s | 1.7 MB     00:03    
(3/3): postgresql12-server-12.5-1PGDG.rhel8.x86_64.rpm                                                                780 kB/s | 5.2 MB     00:06    
------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                 1.1 MB/s | 7.3 MB     00:06     
warning: /var/cache/dnf/pgdg12-64e2194e85277659/packages/postgresql12-12.5-1PGDG.rhel8.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY
PostgreSQL 12 for RHEL/CentOS 8 - x86_64                                                                              1.6 MB/s | 1.7 kB     00:00    
Importing GPG key 0x442DF0F8:
 Userid     : "PostgreSQL RPM Building Project <pgsqlrpms-hackers@pgfoundry.org>"
 Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                              1/1 
  Installing       : postgresql12-libs-12.5-1PGDG.rhel8.x86_64                                                                                    1/3 
  Running scriptlet: postgresql12-libs-12.5-1PGDG.rhel8.x86_64                                                                                    1/3 
  Installing       : postgresql12-12.5-1PGDG.rhel8.x86_64                                                                                         2/3 
  Running scriptlet: postgresql12-12.5-1PGDG.rhel8.x86_64                                                                                         2/3 
  Running scriptlet: postgresql12-server-12.5-1PGDG.rhel8.x86_64                                                                                  3/3 
  Installing       : postgresql12-server-12.5-1PGDG.rhel8.x86_64                                                                                  3/3 
  Running scriptlet: postgresql12-server-12.5-1PGDG.rhel8.x86_64                                                                                  3/3 
  Verifying        : postgresql12-12.5-1PGDG.rhel8.x86_64                                                                                         1/3 
  Verifying        : postgresql12-libs-12.5-1PGDG.rhel8.x86_64                                                                                    2/3 
  Verifying        : postgresql12-server-12.5-1PGDG.rhel8.x86_64                                                                                  3/3 
Installed products updated.

Installed:
  postgresql12-12.5-1PGDG.rhel8.x86_64         postgresql12-libs-12.5-1PGDG.rhel8.x86_64         postgresql12-server-12.5-1PGDG.rhel8.x86_64        

Complete!


Semoga bermanfaat untuk pembaca semua.

Dony Ramansyah
site : http://donyramansyah.net
blog : dony-ramansyah.blogspot.com
email : dony.ramansyah[at]gmail.com
Registered linux user : ID 40017

Rabu, 20 Januari 2021

Cara Install Apache dan PHP di Linux Centos 8

 


Ini pengalaman saya pertama kali Install Server dengan Linux Centos 8, saya melakukan instalasi nya dalam mode server tanpa GUI. Untuk pengalamannya tidak berbeda jauh dengan Centos 7, ada sedikit perbedaan dalam cara instalasi paket software nya saja.

Kali ini saya akan coba install Apache dan PHP di Linux Centos 8 menggunakan yum :

[root@localhost ~]# yum install httpd php

Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 1:00:06 ago on Mon Jan 18 23:04:16 2021.
Dependencies resolved.
======================================================================================================================================================
 Package                             Architecture            Version                                                 Repository                  Size
======================================================================================================================================================
Installing:
 httpd                               x86_64                  2.4.37-30.module_el8.3.0+561+97fdbbcc                   appstream                  1.7 M
 php                                 x86_64                  7.2.24-1.module_el8.2.0+313+b04d0a66                    appstream                  1.5 M
Installing dependencies:
 apr                                 x86_64                  1.6.3-11.el8                                            appstream                  125 k
 apr-util                            x86_64                  1.6.1-6.el8                                             appstream                  105 k
 centos-logos-httpd                  noarch                  80.5-2.el8                                              baseos                      24 k
 httpd-filesystem                    noarch                  2.4.37-30.module_el8.3.0+561+97fdbbcc                   appstream                   37 k
 httpd-tools                         x86_64                  2.4.37-30.module_el8.3.0+561+97fdbbcc                   appstream                  104 k
 mod_http2                           x86_64                  1.15.7-2.module_el8.3.0+477+498bb568                    appstream                  154 k
 nginx-filesystem                    noarch                  1:1.14.1-9.module_el8.0.0+184+e34fea82                  appstream                   24 k
 php-cli                             x86_64                  7.2.24-1.module_el8.2.0+313+b04d0a66                    appstream                  3.1 M
 php-common                          x86_64                  7.2.24-1.module_el8.2.0+313+b04d0a66                    appstream                  661 k
Installing weak dependencies:
 apr-util-bdb                        x86_64                  1.6.1-6.el8                                             appstream                   25 k
 apr-util-openssl                    x86_64                  1.6.1-6.el8                                             appstream                   27 k
 php-fpm                             x86_64                  7.2.24-1.module_el8.2.0+313+b04d0a66                    appstream                  1.6 M
Enabling module streams:
 httpd                                                       2.4                                                                                     
 nginx                                                       1.14                                                                                    
 php                                                         7.2                                                                                     

Transaction Summary
======================================================================================================================================================
Install  14 Packages

Total download size: 9.2 M
Installed size: 31 M
Is this ok [y/N]: y
Downloading Packages:
(1/14): apr-util-1.6.1-6.el8.x86_64.rpm                                                                               1.4 MB/s | 105 kB     00:00    
(2/14): apr-1.6.3-11.el8.x86_64.rpm                                                                                   1.6 MB/s | 125 kB     00:00    
(3/14): apr-util-bdb-1.6.1-6.el8.x86_64.rpm                                                                           304 kB/s |  25 kB     00:00    
(4/14): apr-util-openssl-1.6.1-6.el8.x86_64.rpm                                                                       500 kB/s |  27 kB     00:00    
(5/14): httpd-filesystem-2.4.37-30.module_el8.3.0+561+97fdbbcc.noarch.rpm                                             270 kB/s |  37 kB     00:00    
(6/14): httpd-tools-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64.rpm                                                  1.1 MB/s | 104 kB     00:00    
(7/14): nginx-filesystem-1.14.1-9.module_el8.0.0+184+e34fea82.noarch.rpm                                              694 kB/s |  24 kB     00:00    
(8/14): mod_http2-1.15.7-2.module_el8.3.0+477+498bb568.x86_64.rpm                                                     3.3 MB/s | 154 kB     00:00    
(9/14): httpd-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64.rpm                                                        3.7 MB/s | 1.7 MB     00:00    
(10/14): php-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64.rpm                                                          4.1 MB/s | 1.5 MB     00:00    
(11/14): php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64.rpm                                                   4.5 MB/s | 661 kB     00:00    
(12/14): centos-logos-httpd-80.5-2.el8.noarch.rpm                                                                     1.3 MB/s |  24 kB     00:00    
(13/14): php-cli-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64.rpm                                                      4.6 MB/s | 3.1 MB     00:00    
(14/14): php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64.rpm                                                      4.4 MB/s | 1.6 MB     00:00    
------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                 4.6 MB/s | 9.2 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                              1/1 
  Installing       : php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                                      1/14 
  Running scriptlet: httpd-filesystem-2.4.37-30.module_el8.3.0+561+97fdbbcc.noarch                                                               2/14 
  Installing       : httpd-filesystem-2.4.37-30.module_el8.3.0+561+97fdbbcc.noarch                                                               2/14 
  Installing       : apr-1.6.3-11.el8.x86_64                                                                                                     3/14 
  Running scriptlet: apr-1.6.3-11.el8.x86_64                                                                                                     3/14 
  Installing       : apr-util-bdb-1.6.1-6.el8.x86_64                                                                                             4/14 
  Installing       : apr-util-openssl-1.6.1-6.el8.x86_64                                                                                         5/14 
  Installing       : apr-util-1.6.1-6.el8.x86_64                                                                                                 6/14 
  Running scriptlet: apr-util-1.6.1-6.el8.x86_64                                                                                                 6/14 
  Installing       : httpd-tools-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64                                                                    7/14 
  Installing       : php-cli-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                                         8/14 
  Installing       : centos-logos-httpd-80.5-2.el8.noarch                                                                                        9/14 
  Installing       : mod_http2-1.15.7-2.module_el8.3.0+477+498bb568.x86_64                                                                      10/14 
  Installing       : httpd-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64                                                                         11/14 
  Running scriptlet: httpd-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64                                                                         11/14 
  Running scriptlet: nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch                                                             12/14 
  Installing       : nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch                                                             12/14 
  Installing       : php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                                        13/14 
  Running scriptlet: php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                                        13/14 
  Installing       : php-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                                            14/14 
  Running scriptlet: httpd-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64                                                                         14/14 
  Running scriptlet: php-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                                            14/14 
  Running scriptlet: php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                                        14/14 
  Verifying        : apr-1.6.3-11.el8.x86_64                                                                                                     1/14 
  Verifying        : apr-util-1.6.1-6.el8.x86_64                                                                                                 2/14 
  Verifying        : apr-util-bdb-1.6.1-6.el8.x86_64                                                                                             3/14 
  Verifying        : apr-util-openssl-1.6.1-6.el8.x86_64                                                                                         4/14 
  Verifying        : httpd-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64                                                                          5/14 
  Verifying        : httpd-filesystem-2.4.37-30.module_el8.3.0+561+97fdbbcc.noarch                                                               6/14 
  Verifying        : httpd-tools-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64                                                                    7/14 
  Verifying        : mod_http2-1.15.7-2.module_el8.3.0+477+498bb568.x86_64                                                                       8/14 
  Verifying        : nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch                                                              9/14 
  Verifying        : php-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                                            10/14 
  Verifying        : php-cli-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                                        11/14 
  Verifying        : php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                                     12/14 
  Verifying        : php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                                        13/14 
  Verifying        : centos-logos-httpd-80.5-2.el8.noarch                                                                                       14/14 
Installed products updated.

Installed:
  apr-1.6.3-11.el8.x86_64                                                   apr-util-1.6.1-6.el8.x86_64                                               
  apr-util-bdb-1.6.1-6.el8.x86_64                                           apr-util-openssl-1.6.1-6.el8.x86_64                                       
  centos-logos-httpd-80.5-2.el8.noarch                                      httpd-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64                        
  httpd-filesystem-2.4.37-30.module_el8.3.0+561+97fdbbcc.noarch             httpd-tools-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64                  
  mod_http2-1.15.7-2.module_el8.3.0+477+498bb568.x86_64                     nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch            
  php-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                           php-cli-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                       
  php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                    php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                       

Complete!

Semoga bermanfaat untuk pembaca semua.

Dony Ramansyah
site : http://donyramansyah.net
blog : dony-ramansyah.blogspot.com
email : dony.ramansyah[at]gmail.com
Registered linux user : ID 40017

Selasa, 12 Januari 2021

Mengatasi Problem "open raw socket permission denied" pada nmap di Ubuntu 20.04 LTS

 


Saya coba melakukan instalasi nmap dari snap, begitu dijalan kan muncul error "Couldn't open a raw socket. Error: Permission denied (13)"

Sepertinya program nmap yang saya install dari snap belum di permit ke network, dan berikut solusi nya jalankan berikut berikut :

$ snap connect nmap:network-control


Semoga bermanfaat untuk pembaca semua.

Dony Ramansyah
site : http://donyramansyah.net
blog : dony-ramansyah.blogspot.com
email : dony.ramansyah[at]gmail.com
Registered linux user : ID 40017

Senin, 11 Januari 2021

Cara Mengganti Hostname di Linux Ubuntu 20.04 LTS

 


Tutorial kali ini hanya ingin sedikit sharing cara untuk mengganti hostname di Linux Ubuntu 20.04 LTS, Cara nya adalah sebagai berikut :

1. Cek dulu nama hostname existing :

$ hostnamectl

2. Ganti nama hosting lama dengan nama hostname baru :

$ sudo hostnamectl set-hostname newNameHere

3. Kemudian cek kembali hasil perubahannya 

$ hostnamectl


Namun untuk merubah hostname secara permanent, kita bisa ikuti langkah berikut :

1. Edit file hosts :

$ sudo nano /etc/hosts

2. Edit isi nya dari nama hostname existing menjadi nama hostname baru yang di inginkan, lalu simpan perubahan file nya

3. Kemudian restart linux nya :

$ sudo reboot

Semoga bermanfaat untuk pembaca semua.

Dony Ramansyah
site : http://donyramansyah.net
blog : dony-ramansyah.blogspot.com
email : dony.ramansyah[at]gmail.com
Registered linux user : ID 40017