2

Openeuler 22.03编译安装PHP 7.3 命令

 1 year ago
source link: https://www.iplayio.cn/post/5636818
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Openeuler 22.03编译安装PHP 7.3 命令


原文地址:Openeuler 22.03编译安装PHP 7.3 命令

Openeuler 22.03编译安装PHP 7.3 编译命令以及报错处理

Openeuler使用的yum进行扩展管理,下面是编译安装php7.3的命令,如果./configure过程中遇到某些扩展报错,安装相应的扩展即可。

./configure \
--prefix=/usr/local/php73 \
--with-config-file-path=/usr/local/php73/etc \
--enable-fpm \
--with-fpm-systemd \
--with-openssl \
--enable-bcmath \
--with-mysqli \
--with-pdo-mysql \
--enable-mbstring \
--with-gd \
--with-curl \
--enable-zip \
--enable-opcache \
--enable-fileinfo 

安装成功后如下所示:

Generating files 
configure: creating ./config.status 
creating main/internal_functions.c 
creating main/internal_functions_cli.c 
+--------------------------------------------------------------------+ 
| 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. | 
+--------------------------------------------------------------------+ 

然后运行下面命令进行安装

make && make install

安装完成之后,PHP-FPM注册系统服务,创建PHP软链接

创建PHP软链接

ln -s /usr/local/php73/bin/php /usr/bin/php

PHP-FPM注册系统服务,每次开机自动启动

复制php.ini配置文件

cp php.ini-production /usr/local/php7/etc/php.ini
cd /usr/local/php7/etc
cp php-fpm.conf.default php-fpm.conf
cp php-fpm.d/www.conf.default php-fpm.d/www.conf
cp /root/php-7.4.9/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod -x /etc/init.d/php-fpm
chkconifg --add php-fpm
chkconifg php-fpm on
service php-fpm start

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK