美文网首页
CentOS7上安装 Cockpit php7.3 redis

CentOS7上安装 Cockpit php7.3 redis

作者: 不器1843 | 来源:发表于2023-01-09 14:48 被阅读0次

    CentOS:
    驾驶舱包含在CentOS 7.x中:
    安装驾驶舱:

     yum -y  install cockpit cockpit-dashboard cockpit-storaged cockpit-packagekit
    
    

    启用驾驶舱:

     sudo systemctl enable --now cockpit.socket
    

    必要时打开防火墙:

    sudo firewall-cmd --permanent --zone=public --add-service=cockpit
    sudo firewall-cmd --reload
    

    通过 web 浏览器访问 Cockpit web 界面

    https://ip-address:9090/

    卸载软件+依赖

    #查看要卸载软件的ID
     yum history list git
    #验证要卸载软件的ID
     yum history list 19
    #根据ID卸载软件
     yum history undo 19
    
    

    首先安装 源

    yum install epel-release
    yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
    yum install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
    yum install yum-utils
    

    安装php 7.3

    yum install -y php73-php-fpm php73-php-cli php73-php-bcmath php73-php-gd php73-php-json php73-php-mbstring php73-php-mcrypt php73-php-mysqlnd php73-php-opcache php73-php-pdo php73-php-pecl-crypto php73-php-pecl-mcrypt php73-php-pecl-geoip php73-php-recode php73-php-snmp php73-php-soap php73-php-redis php73-php-xml php73-php-zip
    

    安装php 8.0

    yum install -y php80-php-fpm php80-php-cli php80-php-bcmath php80-php-gd php80-php-json php80-php-mbstring php80-php-mcrypt php80-php-mysqlnd php80-php-opcache php80-php-pdo php80-php-pecl-crypto php80-php-pecl-mcrypt php80-php-pecl-geoip php80-php-recode php80-php-snmp php80-php-soap php80-php-redis php80-php-xml php80-php-zip php80-php-process php80-php-pecl-event php80-php-pecl-mongodb
    
    

    查找php73

     find /etc/opt/remi/php73 -name php.ini
     sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/opt/remi/php73/php.ini
     find / -name  php73
    /usr/bin/php73  # 执行目录
    /usr/share/Modules/modulefiles/php73
    /etc/opt/remi/php73  # 安装目录
    /etc/scl/prefixes/php73
    /var/opt/remi/php73 
    /opt/remi/php73
    ln -s /usr/bin/php73 /usr/bin/php   //软连接
    

    安装composer

    php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"  # 下载composer
    php composer-setup.php   #  install 
    php -r "unlink('composer-setup.php');"  # delete
    mv composer.phar /usr/local/bin/composer   # 复制到可执行目录
    

    安装 redis 6

    yum --enablerepo=remi install redis -y
    

    相关文章

      网友评论

          本文标题:CentOS7上安装 Cockpit php7.3 redis

          本文链接:https://www.haomeiwen.com/subject/xsvkyktx.html