Centos7.6源码安装PHP7.4.3

分享 未结 0 135
雷小天
雷小天 VIP3 2020-03-26
悬赏:20飞吻 收藏
下载PHP安装包 wget https://www.php.net//distributions/php-7.4.3.tar.gz 解压安装包 tar -zxvf php-7.4.3.tar.gz 进入解压目录 cd php-7.4.3 ./configure --prefix=/usr/local/php74 --with-config-file-path=/usr/local/php74/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mbstring --enable-mysqlnd 报错1:configure: error: Package requirements (libxml-2.0 >= 2.7.6) were not met:No package 'libxml-2.0' found yum install -y libxml2-devel 报错2:configure: error: Package requirements (sqlite3 > 3.7.4) were not met:No package 'sqlite3' found yum install sqlite-devel yum install -y libcurl-devel 报错3:configure: error: Package requirements (oniguruma) were not met:No package 'oniguruma' found yum install -y https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-5.9.5-3.el7.x86_64.rpm yum install -y https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-devel-5.9.5-3.el7.x86_64.rpm make make install 安装成功如图: img[/public/uploads/20200326/fda36abf0d98b3004f83bb1027a45edd.png] 为可执行php文件,建立软链接 cd /usr/local/sbin ln -s /usr/local/php74/bin/php php74 查看php版本:php74 -v img[/public/uploads/20200326/81972f2f046063e80c8a40b00eacfffe.png] 安装完成之后,需要从解压的安装包的php.ini-production修改成php.ini,移动到/usr/local/php74/etc,查看配置文件位置如图 img[/public/uploads/20200326/17276afa94167d511cb88c46e7c42e28.jpg]
回帖
  • 消灭零回复
本周热议
没有相关数据
layui

微信扫码关注公众号