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

Tidak ada komentar: