zoukankan      html  css  js  c++  java
  • CentOS 8下yum安装LAMP环境

    更换国内yum源

    下载国内yum源

    [root@C8-3 ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
    --2020-11-02 21:58:38--  https://mirrors.aliyun.com/repo/Centos-8.repo
    Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 61.160.228.240, 117.91.177.241, 221.229.165.244, ...
    Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|61.160.228.240|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2595 (2.5K) [application/octet-stream]
    Saving to: ‘/etc/yum.repos.d/CentOS-Base.repo’
    
    /etc/yum.repos.d/Ce 100%[==================>]   2.53K  --.-KB/s    in 0s      
    
    2020-11-02 21:58:46 (61.8 MB/s) - ‘/etc/yum.repos.d/CentOS-Base.repo’ saved [2595/2595]
    

    查看更新后的yum源

    [root@C8-3 ~]# cat /etc/yum.repos.d/CentOS-Base.repo
    # CentOS-Base.repo
    #
    # The mirror system uses the connecting IP address of the client and the
    # update status of each mirror to pick mirrors that are updated to and
    # geographically close to the client.  You should use this for CentOS updates
    # unless you are manually picking other mirrors.
    #
    # If the mirrorlist= does not work for you, as a fall back you can try the 
    # remarked out baseurl= line instead.
    #
    #
     
    [base]
    name=CentOS-$releasever - Base - mirrors.aliyun.com
    failovermethod=priority
    baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/
            http://mirrors.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/
            http://mirrors.cloud.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/
    gpgcheck=1
    gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
     
    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras - mirrors.aliyun.com
    failovermethod=priority
    baseurl=https://mirrors.aliyun.com/centos/$releasever/extras/$basearch/os/
            http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/os/
            http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/os/
    gpgcheck=1
    gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
     
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus - mirrors.aliyun.com
    failovermethod=priority
    baseurl=https://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/os/
            http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/
            http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/
    gpgcheck=1
    enabled=0
    gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
     
    [PowerTools]
    name=CentOS-$releasever - PowerTools - mirrors.aliyun.com
    failovermethod=priority
    baseurl=https://mirrors.aliyun.com/centos/$releasever/PowerTools/$basearch/os/
            http://mirrors.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/
            http://mirrors.cloud.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/
    gpgcheck=1
    enabled=0
    gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
    
    
    [AppStream]
    name=CentOS-$releasever - AppStream - mirrors.aliyun.com
    failovermethod=priority
    baseurl=https://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/
            http://mirrors.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/
            http://mirrors.cloud.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/
    gpgcheck=1
    gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
    

    更新AppStream中内容

    [root@C8-3 ~]# vim /etc/yum.
    yum.conf     yum.repos.d/ 
    [root@C8-3 ~]# vim /etc/yum.repos.d/CentOS-AppStream.repo ##修改为CentOS-Base.repo中[AppStream]内容
    

    清理旧缓存,新建新缓存

    [root@C8-3 ~]# yum clean all
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    11 files removed
    [root@C8-3 ~]# yum makecache
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    CentOS-8 - AppStream - mirrors.aliyun.com      497 kB/s | 5.8 MB     00:11    
    CentOS-8 - Base - mirrors.aliyun.com           223 kB/s | 2.2 MB     00:10    
    CentOS-8 - Extras - mirrors.aliyun.com         857  B/s | 8.1 kB     00:09    
    Metadata cache created.
    

    直接群装报错

    [root@C8-3 ~]# yum -y install httpd mariadb-server mariadb php php-mysql
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Last metadata expiration check: 0:01:31 ago on Mon 02 Nov 2020 10:02:18 PM EST.
    No match for argument: php-mysql
    Error: Unable to find a match: php-mysql
    

    分别安装httpd mariadb-server mariadb php php-mysql

    yum安装httpd

    [root@C8-3 ~]# yum list httpd
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Last metadata expiration check: 0:01:49 ago on Mon 02 Nov 2020 10:02:18 PM EST.
    Available Packages
    httpd.x86_64          2.4.37-21.module_el8.2.0+494+1df74eae           AppStream
    [root@C8-3 ~]# yum -y install httpd
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Last metadata expiration check: 0:02:11 ago on Mon 02 Nov 2020 10:02:18 PM EST.
    Dependencies resolved.
    ===============================================================================
     Package          Arch   Version                               Repo       Size
    ===============================================================================
    Installing:
     httpd            x86_64 2.4.37-21.module_el8.2.0+494+1df74eae AppStream 1.7 M
    Installing dependencies:
     apr              x86_64 1.6.3-9.el8                           AppStream 125 k
     apr-util         x86_64 1.6.1-6.el8                           AppStream 105 k
     httpd-filesystem noarch 2.4.37-21.module_el8.2.0+494+1df74eae AppStream  36 k
     httpd-tools      x86_64 2.4.37-21.module_el8.2.0+494+1df74eae AppStream 103 k
     mod_http2        x86_64 1.11.3-3.module_el8.2.0+486+c01050f0.1
                                                                   AppStream 156 k
     centos-logos-httpd
                      noarch 80.5-2.el8                            base       24 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
    Enabling module streams:
     httpd                   2.4                                                  
    
    Transaction Summary
    ===============================================================================
    Install  9 Packages
    
    Total download size: 2.3 M
    Installed size: 6.0 M
    Downloading Packages:
    (1/9): apr-util-bdb-1.6.1-6.el8.x86_64.rpm     5.2 kB/s |  25 kB     00:04    
    (2/9): apr-util-openssl-1.6.1-6.el8.x86_64.rpm 369 kB/s |  27 kB     00:00    
    (3/9): apr-util-1.6.1-6.el8.x86_64.rpm          22 kB/s | 105 kB     00:04    
    (4/9): apr-1.6.3-9.el8.x86_64.rpm               26 kB/s | 125 kB     00:04    
    (5/9): httpd-filesystem-2.4.37-21.module_el8.2 512 kB/s |  36 kB     00:00    
    (6/9): httpd-tools-2.4.37-21.module_el8.2.0+49 777 kB/s | 103 kB     00:00    
    (7/9): centos-logos-httpd-80.5-2.el8.noarch.rp 169 kB/s |  24 kB     00:00    
    (8/9): mod_http2-1.11.3-3.module_el8.2.0+486+c 649 kB/s | 156 kB     00:00    
    (9/9): httpd-2.4.37-21.module_el8.2.0+494+1df7 1.8 MB/s | 1.7 MB     00:00    
    -------------------------------------------------------------------------------
    Total                                          402 kB/s | 2.3 MB     00:05     
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                       1/1 
      Installing       : apr-1.6.3-9.el8.x86_64                                1/9 
      Running scriptlet: apr-1.6.3-9.el8.x86_64                                1/9 
      Installing       : apr-util-bdb-1.6.1-6.el8.x86_64                       2/9 
      Installing       : apr-util-openssl-1.6.1-6.el8.x86_64                   3/9 
      Installing       : apr-util-1.6.1-6.el8.x86_64                           4/9 
      Running scriptlet: apr-util-1.6.1-6.el8.x86_64                           4/9 
      Installing       : httpd-tools-2.4.37-21.module_el8.2.0+494+1df74eae.x   5/9 
      Installing       : centos-logos-httpd-80.5-2.el8.noarch                  6/9 
      Running scriptlet: httpd-filesystem-2.4.37-21.module_el8.2.0+494+1df74   7/9 
      Installing       : httpd-filesystem-2.4.37-21.module_el8.2.0+494+1df74   7/9 
      Installing       : mod_http2-1.11.3-3.module_el8.2.0+486+c01050f0.1.x8   8/9 
      Installing       : httpd-2.4.37-21.module_el8.2.0+494+1df74eae.x86_64    9/9 
      Running scriptlet: httpd-2.4.37-21.module_el8.2.0+494+1df74eae.x86_64    9/9 
      Verifying        : apr-1.6.3-9.el8.x86_64                                1/9 
      Verifying        : apr-util-1.6.1-6.el8.x86_64                           2/9 
      Verifying        : apr-util-bdb-1.6.1-6.el8.x86_64                       3/9 
      Verifying        : apr-util-openssl-1.6.1-6.el8.x86_64                   4/9 
      Verifying        : httpd-2.4.37-21.module_el8.2.0+494+1df74eae.x86_64    5/9 
      Verifying        : httpd-filesystem-2.4.37-21.module_el8.2.0+494+1df74   6/9 
      Verifying        : httpd-tools-2.4.37-21.module_el8.2.0+494+1df74eae.x   7/9 
      Verifying        : mod_http2-1.11.3-3.module_el8.2.0+486+c01050f0.1.x8   8/9 
      Verifying        : centos-logos-httpd-80.5-2.el8.noarch                  9/9 
    
    Installed:
      httpd-2.4.37-21.module_el8.2.0+494+1df74eae.x86_64                           
      apr-util-bdb-1.6.1-6.el8.x86_64                                              
      apr-util-openssl-1.6.1-6.el8.x86_64                                          
      apr-1.6.3-9.el8.x86_64                                                       
      apr-util-1.6.1-6.el8.x86_64                                                  
      httpd-filesystem-2.4.37-21.module_el8.2.0+494+1df74eae.noarch                
      httpd-tools-2.4.37-21.module_el8.2.0+494+1df74eae.x86_64                     
      mod_http2-1.11.3-3.module_el8.2.0+486+c01050f0.1.x86_64                      
      centos-logos-httpd-80.5-2.el8.noarch                                         
    
    Complete!
    

    yum安装mariadb-server

    [root@C8-3 ~]# yum list mariadb-server
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Last metadata expiration check: 0:02:56 ago on Mon 02 Nov 2020 10:02:18 PM EST.
    Available Packages
    mariadb-server.x86_64     3:10.3.17-1.module_el8.1.0+257+48736ea6     AppStream
    [root@C8-3 ~]# yum -y install mariadb-server
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Last metadata expiration check: 0:03:12 ago on Mon 02 Nov 2020 10:02:18 PM EST.
    Dependencies resolved.
    ===============================================================================
     Package        Arch   Version                                 Repo       Size
    ===============================================================================
    Installing:
     mariadb-server x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6 AppStream  16 M
    Installing dependencies:
     mariadb        x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6 AppStream 6.1 M
     mariadb-common x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6 AppStream  62 k
     mariadb-connector-c
                    x86_64 3.0.7-1.el8                             AppStream 148 k
     mariadb-connector-c-config
                    noarch 3.0.7-1.el8                             AppStream  13 k
     mariadb-errmsg x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6 AppStream 232 k
     perl-DBD-MySQL x86_64 4.046-3.module_el8.1.0+203+e45423dc     AppStream 156 k
     perl-DBI       x86_64 1.641-3.module_el8.1.0+199+8f0a6bbd     AppStream 740 k
     perl-Math-BigInt
                    noarch 1:1.9998.11-7.el8                       base      196 k
     perl-Math-Complex
                    noarch 1.59-416.el8                            base      108 k
    Installing weak dependencies:
     mariadb-backup x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6 AppStream 6.0 M
     mariadb-gssapi-server
                    x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6 AppStream  49 k
     mariadb-server-utils
                    x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6 AppStream 1.6 M
    Enabling module streams:
     mariadb               10.3                                                   
     perl-DBD-MySQL        4.046                                                  
     perl-DBI              1.641                                                  
    
    Transaction Summary
    ===============================================================================
    Install  13 Packages
    
    Total download size: 31 M
    Installed size: 173 M
    Downloading Packages:
    (1/13): mariadb-common-10.3.17-1.module_el8.1. 7.5 kB/s |  62 kB     00:08    
    (2/13): mariadb-connector-c-3.0.7-1.el8.x86_64 820 kB/s | 148 kB     00:00    
    (3/13): mariadb-connector-c-config-3.0.7-1.el8 170 kB/s |  13 kB     00:00    
    (4/13): mariadb-errmsg-10.3.17-1.module_el8.1. 868 kB/s | 232 kB     00:00    
    (5/13): mariadb-gssapi-server-10.3.17-1.module 487 kB/s |  49 kB     00:00    
    (6/13): mariadb-10.3.17-1.module_el8.1.0+257+4 338 kB/s | 6.1 MB     00:18    
    (7/13): mariadb-backup-10.3.17-1.module_el8.1. 335 kB/s | 6.0 MB     00:18    
    (8/13): perl-DBD-MySQL-4.046-3.module_el8.1.0+ 259 kB/s | 156 kB     00:00    
    (9/13): perl-DBI-1.641-3.module_el8.1.0+199+8f 573 kB/s | 740 kB     00:01    
    (10/13): perl-Math-BigInt-1.9998.11-7.el8.noar 501 kB/s | 196 kB     00:00    
    (11/13): mariadb-server-utils-10.3.17-1.module 690 kB/s | 1.6 MB     00:02    
    (12/13): perl-Math-Complex-1.59-416.el8.noarch 571 kB/s | 108 kB     00:00    
    (13/13): mariadb-server-10.3.17-1.module_el8.1 1.2 MB/s |  16 MB     00:12    
    -------------------------------------------------------------------------------
    Total                                          1.4 MB/s |  31 MB     00:21     
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Running scriptlet: mariadb-connector-c-3.0.7-1.el8.x86_64                1/1 
      Preparing        :                                                       1/1 
      Installing       : mariadb-connector-c-config-3.0.7-1.el8.noarch        1/13 
      Installing       : mariadb-common-3:10.3.17-1.module_el8.1.0+257+487    2/13 
      Installing       : mariadb-connector-c-3.0.7-1.el8.x86_64               3/13 
      Installing       : mariadb-errmsg-3:10.3.17-1.module_el8.1.0+257+487    4/13 
      Installing       : perl-Math-Complex-1.59-416.el8.noarch                5/13 
      Installing       : perl-Math-BigInt-1:1.9998.11-7.el8.noarch            6/13 
      Installing       : perl-DBI-1.641-3.module_el8.1.0+199+8f0a6bbd.x86_    7/13 
      Installing       : perl-DBD-MySQL-4.046-3.module_el8.1.0+203+e45423d    8/13 
      Installing       : mariadb-backup-3:10.3.17-1.module_el8.1.0+257+487    9/13 
      Installing       : mariadb-gssapi-server-3:10.3.17-1.module_el8.1.0+   10/13 
      Installing       : mariadb-server-utils-3:10.3.17-1.module_el8.1.0+2   11/13 
      Running scriptlet: mariadb-server-3:10.3.17-1.module_el8.1.0+257+487   12/13 
      Installing       : mariadb-server-3:10.3.17-1.module_el8.1.0+257+487   12/13 
      Running scriptlet: mariadb-server-3:10.3.17-1.module_el8.1.0+257+487   12/13 
      Installing       : mariadb-3:10.3.17-1.module_el8.1.0+257+48736ea6.x   13/13 
      Running scriptlet: mariadb-3:10.3.17-1.module_el8.1.0+257+48736ea6.x   13/13 
      Verifying        : mariadb-3:10.3.17-1.module_el8.1.0+257+48736ea6.x    1/13 
      Verifying        : mariadb-backup-3:10.3.17-1.module_el8.1.0+257+487    2/13 
      Verifying        : mariadb-common-3:10.3.17-1.module_el8.1.0+257+487    3/13 
      Verifying        : mariadb-connector-c-3.0.7-1.el8.x86_64               4/13 
      Verifying        : mariadb-connector-c-config-3.0.7-1.el8.noarch        5/13 
      Verifying        : mariadb-errmsg-3:10.3.17-1.module_el8.1.0+257+487    6/13 
      Verifying        : mariadb-gssapi-server-3:10.3.17-1.module_el8.1.0+    7/13 
      Verifying        : mariadb-server-3:10.3.17-1.module_el8.1.0+257+487    8/13 
      Verifying        : mariadb-server-utils-3:10.3.17-1.module_el8.1.0+2    9/13 
      Verifying        : perl-DBD-MySQL-4.046-3.module_el8.1.0+203+e45423d   10/13 
      Verifying        : perl-DBI-1.641-3.module_el8.1.0+199+8f0a6bbd.x86_   11/13 
      Verifying        : perl-Math-BigInt-1:1.9998.11-7.el8.noarch           12/13 
      Verifying        : perl-Math-Complex-1.59-416.el8.noarch               13/13 
    
    Installed:
      mariadb-server-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64                
      mariadb-backup-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64                
      mariadb-gssapi-server-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64         
      mariadb-server-utils-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64          
      mariadb-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64                       
      mariadb-common-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64                
      mariadb-connector-c-3.0.7-1.el8.x86_64                                       
      mariadb-connector-c-config-3.0.7-1.el8.noarch                                
      mariadb-errmsg-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64                
      perl-DBD-MySQL-4.046-3.module_el8.1.0+203+e45423dc.x86_64                    
      perl-DBI-1.641-3.module_el8.1.0+199+8f0a6bbd.x86_64                          
      perl-Math-BigInt-1:1.9998.11-7.el8.noarch                                    
      perl-Math-Complex-1.59-416.el8.noarch                                        
    
    Complete!
    

    yum安装mariadb客户端

    [root@C8-3 ~]# yum list mariadb
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Last metadata expiration check: 0:15:46 ago on Mon 02 Nov 2020 10:02:18 PM EST.
    Installed Packages
    mariadb.x86_64        3:10.3.17-1.module_el8.1.0+257+48736ea6        @AppStream
    [root@C8-3 ~]# yum -y install mariadb
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Last metadata expiration check: 0:15:00 ago on Mon 02 Nov 2020 10:02:18 PM EST.
    Package mariadb-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64 is already installed.
    Dependencies resolved.
    Nothing to do.
    Complete!
    

    yum安装php

    [root@C8-3 ~]# yum list php
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Last metadata expiration check: 0:17:21 ago on Mon 02 Nov 2020 10:02:18 PM EST.
    Available Packages
    php.x86_64            7.2.24-1.module_el8.2.0+313+b04d0a66            AppStream
    [root@C8-3 ~]# yum -y install php
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Last metadata expiration check: 0:17:52 ago on Mon 02 Nov 2020 10:02:18 PM EST.
    Dependencies resolved.
    ===============================================================================
     Package         Arch   Version                                Repo       Size
    ===============================================================================
    Installing:
     php             x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66   AppStream 1.5 M
    Installing dependencies:
     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:
     php-fpm         x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66   AppStream 1.6 M
    Enabling module streams:
     nginx                  1.14                                                  
     php                    7.2                                                   
    
    Transaction Summary
    ===============================================================================
    Install  5 Packages
    
    Total download size: 6.9 M
    Installed size: 25 M
    Downloading Packages:
    (1/5): nginx-filesystem-1.14.1-9.module_el8.0. 1.2 kB/s |  24 kB     00:21    
    (2/5): php-common-7.2.24-1.module_el8.2.0+313+ 678 kB/s | 661 kB     00:00    
    (3/5): php-7.2.24-1.module_el8.2.0+313+b04d0a6  69 kB/s | 1.5 MB     00:22    
    (4/5): php-fpm-7.2.24-1.module_el8.2.0+313+b04 950 kB/s | 1.6 MB     00:01    
    (5/5): php-cli-7.2.24-1.module_el8.2.0+313+b04 132 kB/s | 3.1 MB     00:24    
    -------------------------------------------------------------------------------
    Total                                          293 kB/s | 6.9 MB     00:24     
    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   1/5 
      Installing       : php-cli-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64   2/5 
      Running scriptlet: nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34f   3/5 
      Installing       : nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34f   3/5 
      Installing       : php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64   4/5 
      Running scriptlet: php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64   4/5 
      Installing       : php-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64       5/5 
      Running scriptlet: php-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64       5/5 
      Running scriptlet: php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64   5/5 
      Verifying        : nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34f   1/5 
      Verifying        : php-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64       2/5 
      Verifying        : php-cli-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64   3/5 
      Verifying        : php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86   4/5 
      Verifying        : php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64   5/5 
    
    Installed:
      php-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                          
      nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch               
      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                       
    
    Complete!
    

    yum安装php-mysql

    [root@C8-3 ~]# yum -list php-mysql
    No such command: php-mysql. Please use /usr/bin/yum --help
    It could be a DNF plugin command, try: "dnf install 'dnf-command(php-mysql)'"
    [root@C8-3 ~]# yum list php-mysql
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Last metadata expiration check: 0:19:58 ago on Mon 02 Nov 2020 10:02:18 PM EST.
    Error: No matching Packages to list
    [root@C8-3 ~]# yum -y install php-mysql
    Repository AppStream is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository PowerTools is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Last metadata expiration check: 0:25:31 ago on Mon 02 Nov 2020 10:02:18 PM EST.
    No match for argument: php-mysql
    Error: Unable to find a match: php-mysql
    
    • php-mysql php程序连接mysql使用的模块,php7已经没有mysql这个扩展了,不需要傻傻的去找和安装这个包了!

    至此,LAMP的安装全部完成。

    * * * 胖并快乐着的死肥宅 * * *
  • 相关阅读:
    编译原理入门以及战大作业心得(2)汇编简易入门 康某
    简易聊天对话框(源码)
    用js做数字字母混合的随机四位验证码
    HTML5基础
    javascript基础
    jquery.AutoComplete 仿百度文本框感应
    DropDownlist显示树状
    利用 System.Net.Mail 实现邮件发送功能
    sql 根据字段值,查找属于哪个表中的哪个字段
    sql 查看数据库中的各表的大小
  • 原文地址:https://www.cnblogs.com/bpzblog/p/13919399.html
Copyright © 2011-2022 走看看