最新消息:数据恢复成功,博主又回来啦,和你们同在!

记录OpenLitespeed与php7编译参数

VPS ZmmFly 310浏览 0评论

VPS忘记续费数据都被删掉了,准备重新恢复站点,前路漫漫…

先把VPS基础搭起来,选择OpenLitespeed主要是看好其在没超过极限前,响应处理速度比Apache和Nginx高的特性,对于我这种万年不更新的够用了

依赖库
apt install \
libzip-dev \
libssl-dev \
libncurses5-dev \
autoconf \
make \
libpsl-dev \
libpsl5 \
psl \
psl-make-dafsa \
libnghttp2-14 \
libnghttp2-dev \
brotli \
libbrotli-dev \
libbrotli1 \
libssh2-1 \
libssh2-1-dev \
libglobus-gssapi-gsi-dev \
librtmp-dev \
libldap2-dev \
rtmpdump \
libxml2-dev \
build-essential \
libjpeg-dev \
libpng-dev \
libmcrypt-dev \
libreadline-dev \
libbz2-dev \
bzip2 \
libbz2-dev \
libxpm-dev \
libexpat1 \
libexpat1-dev \
libcunit1 \
libcunit1-dev \
libkrb5-3 \
libkrb5-dev \
libkrb5-dev \
libudns0 \
libudns-dev \
libmaxminddb0 \
libmaxminddb-dev \
brotli \
libbrotli-dev \
libbrotli1 \
libgeoip1 \
libgeoip-dev \
luajit \
libluajit-5.1-2 \
libluajit-5.1-dev \
liblua5.3-dev \
libgd3 \
libgd-dev \
libwebp-dev \
libmagickcore-dev \
libmagickwand-dev \
libsmbclient \
libsmbclient-dev \
bison \
re2c
CURL编译参数
./configure --without-nss --with-nghttp2 --with-ssl --with-zlib --enable-ldap --enable-ldaps --with-libmetalink --with-brotli --with-gssapi --with-libssh2 --enable-alt-svc
OpenLiteSpeed编译参数
#1.4.X
./configure \
 --prefix=/usr/local/lsws \
 --with-brotli \
 --with-pcre \
 --with-iptogeo2 \
 --with-ip2loc \
 --with-lua=/usr/include/luajit-2.1 \
 --with-udns=/usr \
 --with-user=www \
 --with-group=www \
 --with-lsphp7 \
 --with-openssl \
 --with-zlib=/usr \
 --enable-http2 \
 --with-bssl=/usr
#BoringSSL选用

#1.5.X
#2019-6-30 1.5.2通过
./configure \
--prefix=/usr/local/lsws \
--with-brotli \
--with-pcre \
--with-iptogeo2 \
--with-ip2loc \
--with-lua=/usr/include/luajit-2.1 \
--with-udns=/usr \
--with-user=www \
--with-group=www \
--with-lsphp7 \
--with-openssl \
--with-zlib \
--enable-recaptcha \
--enable-http2 \
 --with-bssl=/usr
#BoringSSL选用
PHP7.3通用编译参数
./configure \
--prefix=/usr/local/lsws/lsphp73 \
--with-mysqli \
--with-zlib \
--with-bz2 \
--with-mhash \
--with-iconv \
--with-pdo-mysql \
--with-pcre-jit \
--enable-shmop \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-mbstring \
--enable-zip \
--enable-soap \
--enable-xml \
--enable-json \
--enable-bcmath \
--enable-calendar \
--enable-intl \
--with-litespeed \
--with-libdir=lib64 \
--with-config-file-path=/usr/local/lsws/lsphp73/etc/php \
--with-config-file-scan-dir=/usr/local/lsws/lsphp73/etc/ini.d \
--enable-fpm \
--enable-sigchild

考虑到版本和灵活性可能存在问题,GD和openssl默认没有开,方便后续编译为动态库

并且开启fpm,以便后续切换web服务器为nginx或者apache而不用重新编译php

如果需要默认编译,可以添加以下到编译命令中

--with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir --with-xpm-dir=/usr --with-freetype-dir=/usr/local/freetype --enable-gd-jis-conv --with-openssl

转载请注明:SH自留地 » 记录OpenLitespeed与php7编译参数

打赏 赞(0)
微信
支付宝
微信二维码图片

微信扫描二维码打赏

支付宝二维码图片

支付宝扫描二维码打赏

发表我的评论
取消评论

Protected by WP Anti Spam

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址