在VPS上安装DA时,默认情况下已经安装了一些扩展,但如果您需要其他PHP扩展,则需要手动安装它们。
我通过SSH连接到VPS然后找到PHP的配置文件
cd / usr / local / directadmin / custombuild
./build used_configs | grep configure.php
你会得到一个这样的段落
PHP(默认)配置文件:/usr/local/directadmin/custombuild/configure/fastcgi/configure.php56
接下来,我们继续将PHP的配置文件复制到另一个目录
cd / usr / local / directadmin / custombuild
mkdir -p custom / fastcgi
cp -fp configure / fastcgi / configure.php56 custom / fastcgi / configure.php56
接下来,我们打开PHP配置文件
nano custom / fastcgi / configure.php56
例如,使用-with-name结构添加要在PHP中安装的最后一行扩展,然后使用ctrl + O保存,然后按ctrl + X退出。
–with梨\
–with-xsl \
–with-zlib的\
– 启用肥皂
–with-mcrypt \
然后运行以下命令再次运行PHP
./build php n
运行后,我们将重启服务
/ httpd restart sbin / service
Leave a Reply