Logo

linux 安装php8

photo

2021年12月11日

准备工作

  创建空文件夹

> mkdir /opt/php //创建目录
> cd /opt/php //进入目录

  安装php运行依赖库

> yum install openssl-devel gcc gcc-c++ wget make libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel 
   bison autoconf sqlite-devel bzip2-devel libcurl-devel libicu-devel libxslt-devel libzip-devel libtidy-devel libtidy
> yum --enablerepo=PowerTools install oniguruma-devel

 

下载源码

> wget https://www.php.net/distributions/php-8.0.6.tar.gz //下载php8
> tar vxf php-8.0.6.tar.gz //解压php压缩
> mv php-8.0.6 php8 //改名

  配置准备

> mkdir /opt/php/php //建立php安装目录
> mkdir /opt/php/etc //建立php配置目录

配置php

> ./configure --prefix=/opt/php/php/ --with-config-file-path=/opt/php/etc  --enable-fpm --enable-mysqlnd --enable-opcache --enable-pcntl --enable-mbstring --enable-soap --enable-zip --enable-calendar  --enable-bcmath 
  --enable-exif --enable-ftp --enable-intl --with-mysqli --with-pdo-mysql --with-openssl --with-curl --with-gd --with-gettext --with-mhash --with-openssl --with-mcrypt --with-tidy --enable-wddx --with-xmlrpc --with-zlib

  配置成功会出现以下信息  

+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE. By continuing this installation  |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+
 
Thank you for using PHP.

编译&安装

> make 
> make install

判断是否安转成功

 

> cd /opt/php/php/bin //进入php的安装目录下的bin
> ./php --version //查看版本号

 

  出现版本号,则安装成功

 

可能出现的问题

  在配置过程中,出现的问题基本上都是某个依赖包没有安装好,这几篇文章能给你一些帮助。

  php8在centos7安装

  error: C++ preprocessor “/lib/cpp” fails sanity check错误解决方法

 

橙子主题打折出售

其实我不卖,主要是这里是放广告的,所以就放了一个
毕竟主题都没做完,卖了也是坑.

购买它
本文为原创文章,请注意保留出处!

热门文章

无法握住的故土 在我们心灵最温暖的角落,总有一寸土地是属于故乡的。虽然我们看似已远离故土,可骨子里对故乡的依恋却是从未冷却过。我们无论漂泊他乡,还是在繁华都市平步青云,可故乡的悠悠情思总会潜入梦乡与你缠绵。是儿时那一缕缕茉莉的清香萦绕在梦境,也是邻家那已锈迹斑斑的铁壶里,开出艳丽的花儿在梦的边缘摇曳。故土就这样根深蒂固地在我们的灵魂深处烙下深深的印记。 作者:Pastore Antonio
1596 浏览量
EWS(Exchange Service)基本使用(获取个人会议,会议室会议内容,会议室列表,发送会议,修改会议,删除会议) 最近公司要求和exchange服务对接,所以稍微研究了一下官方文档,做出以下总结,欢迎大家补充。先...EWS(ExchangeService)基本使用(获取个人会议,会议室会议内容,会议室列表,发送会议,修改会议,删除会议) 作者:Pastore Antonio
1585 浏览量
Sql Server 部署SSIS包完成远程数据传输 本篇介绍如何使用SSIS和作业完成自动更新目标数据任务。**温馨提示:如需转载本文,请注明...SqlServer部署SSIS包完成远程数据传输 作者:Pastore Antonio
1579 浏览量
SQL Server AG集群启动不起来的临时自救大招 背景前晚一朋友遇到AG集群发生来回切换不稳定的情况,情急之下,朋友在命令行使用命令重启WSFC集群...SQLServerAG集群启动不起来的临时自救大招 作者:Pastore Antonio
1573 浏览量
windows 下安装 memcahce 官网上并未提供Memcached的Windows平台安装包,我们可以使用以下链接来下载,你需...windows下安装memcahce 作者:Pastore Antonio
1567 浏览量