导航

PHP 编译安装配置

6个月前 · 498人浏览

Configure

./configure --prefix=/php/ --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --with-pear --with-zlib --with-bz2 --enable-gd --with-jpeg --with-webp --with-freetype --with-zip --with-pdo-mysql --with-mysqli --enable-intl --with-curl --enable-calendar --with-openssl --with-xsl --enable-ftp --enable-sockets --enable-mbstring --enable-bcmath --with-gettext --enable-exif --enable-soap --with-mhash

 

自启动服务

服务文件位置

/lib/systemd/system/php.service

 

内容

[Unit]
Description=The PHP Service
After=network.target

[Service]
Type=forking
ExecStart=/php/sbin/php-fpm
ExecReload=/bin/kill -USR2 $MAINPID
ExecStop=/bin/kill -SIGINT $MAINPID

[Install]
WantedBy=multi-user.target

 

配置文件位置

/php/lib/php.ini

 

/php/etc/php-fpm.conf

 

/php/etc/php-fpm.d/www.conf

 

评论
更换验证码
2025 Teris 的秘密基地 All Rights Reserved.