EverKB

Knowledge Base Ever

在CentOS7上安裝PHP7

2019-11-12 16:15:56

標籤: CentOS, PHP, CentOS7, PHP7, remi , php-fpm, YUM,

在CentOS上,YUM安裝PHP時版本為5.x,當我們需要安裝PHP7.x時,可按以下步驟進行操作。

安裝epel和remi軟件源

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

安裝yum-utils工具,並指定PHP默認安裝版本為7.3

yum -y install yum-utils
yum-config-manager --enable remi-php73

安裝PHP7.3及常用的擴展

yum -y install php php-common php-fpm
yum -y install php-mysql php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo php-curl

標籤

CentOS7 CentOS PHP Linux Python3 Python MySQL JavaScript MariaDB YUM Redis MySQL8 caching_sha2_password HTML mysql_native_password PHP7 CSS Error Control Operator margin PHPUnit Framework ss5.passwd at-symbol IIS password SOCKET vps daemon process Fatal Errors MongoDB4 sudoers center DATE_SUB Phalcon SQL Server 2017 WiFi .htaccess frequency conflict set_error_handler TestCase Compiling PHP Elasticsearch7.3 PHPUnit ss5.conf apr HTTP particles.js Slim Vincent Garreau daemon Failed to build these modules: _uuid MongoDB Sudo DATE_ADD ip command pg_bha.conf SQL Server width Frameworks MySQL-python scrollbar Tcp BBR Compiling Apache Elasticsearch libpython3.7m.so.1.0 PHPStorm ss5-3.8.9 Apache2.4 NodeJs show VIM CURLOPT_POSTFIELDS Failed to build these modules: _ctypes Minimal ISO substr Bluetooth date sub INTERVAL PECL SQL Date Funcitons Wi-Fi font-size root Tag Cloud CodeIgniter dual network interfaces Laravel ss5 apache httpd horiz-align node.js ShadowsocksR vertical-align CURLFille exec mb_substr PyCharm SUBDATE BarManager date add IntelliJIDEA PEAR SOCKS5 Proxy Server WebStorm find remi Tag Chrome du jQuery PHP5.5 src Apache hide nginx Shadowsocks-Python V2Ray cURL eth0 MariaDB10.4 PostgreSQL sub folder availability Install MongoDB pdo_sqlsrv SOCKS5 Web Server date File Upload mssql-tools register_shutdown_function Symfony DevExpress JetBrain php-fpm sqlsrv Zend Framework ADDDATE height network interface Shadowsocks-Libev unixODBC-devel error_get_last Port 80 string Aura INDENTIFIED BY password policy requirements SOCKS Web Development data Fedora Media Writer msodbcsql Redis5 SVN Deepin jemalloc SQLAlchemy absolute FuelPHP mysqlclient Shadowsocks toggle convert