RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
如何在ubuntu中重新安装php

这篇文章将为大家详细讲解有关如何在ubuntu中重新安装php,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

创新互联-专业网站定制、快速模板网站建设、高性价比海北州网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式海北州网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖海北州地区。费用合理售后完善,十余年实体公司更值得信赖。

UBUNTU18.04 安装与卸载 PHP7.2

安装:

如果之前有其他版本PHP,在这边禁用掉

sudo a2dismod php5

再来安装做准备

sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:ondrej/php && sudo apt-get update
sudo apt-get -y install php7.2
sudo a2enmod php7.2

安装常用扩展

sudo -y apt-get install php7.2-fpm php7.2-MySQL php7.2-curl php7.2-json php7.2-mbstring php7.2-xml  php7.2-intl

安装其他扩展(按需安装)

sudo apt-get install php7.2-gd
sudo apt-get install php7.2-soap
sudo apt-get install php7.2-gmp   
sudo apt-get install php7.2-odbc      
sudo apt-get install php7.2-pspell    
sudo apt-get install php7.2-bcmath  
sudo apt-get install php7.2-enchant   
sudo apt-get install php7.2-imap      
sudo apt-get install php7.2-ldap      
sudo apt-get install php7.2-opcache
sudo apt-get install php7.2-readline  
sudo apt-get install php7.2-sqlite3   
sudo apt-get install php7.2-xmlrpc
sudo apt-get install php7.2-bz2
sudo apt-get install php7.2-interbase
sudo apt-get install php7.2-pgsql     
sudo apt-get install php7.2-recode    
sudo apt-get install php7.2-sybase    
sudo apt-get install php7.2-xsl
sudo apt-get install php7.2-cgi       
sudo apt-get install php7.2-dba
sudo apt-get install php7.2-phpdbg    
sudo apt-get install php7.2-snmp      
sudo apt-get install php7.2-tidy      
sudo apt-get install php7.2-zip

卸载:

一、删除php的相关包及配置

    sudo apt-get autoremove php7*

二、删除关联

    sudo find /etc -name "*php*" |xargs  rm -rf

三、清除dept列表

    sudo apt purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`

四、检查是否卸载干净(无返回就是卸载完成)

    dpkg -l | grep php7.0

关于如何在ubuntu中重新安装php就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。


当前名称:如何在ubuntu中重新安装php
网址分享:http://sczitong.cn/article/pcoddd.html