安装nginx所需依赖
安装pcre-devel
源安装
1
| yum install -y pcre-devel
|
安装包安装
安装openssl-devel
1
| yum install -y openssl-devel
|
安装nginx
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| ./configure \ --prefix=/usr/local/nginx \ --sbin-path=/usr/local/nginx/sbin/nginx \ --error-log-path=/var/log/nginx/error.log \ --http-log-path=/var/log/nginx/access.log \ --with-http_stub_status_module \ --with-http_gzip_static_module \ --with-http_ssl_module \ --with-http_flv_module \ --with-http_v2_module
make && make test
make install
|
php7.4.15依赖
libxml2-devel、sqlite-devel、libcurl-devel、libpng-devel、libzip-devel、openssl-devel
安装php7.4.15
安装时可能会出现 libzip 无法找到
执行以下命令
1
| export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/"
|
安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| ./configure \ --prefix=/usr/local/php@7.4 \ --with-config-file-path=/usr/local/php@7.4/etc \ --enable-fpm \ --with-libxml \ --with-openssl \ --with-zlib \ --enable-bcmath \ --enable-calendar \ --with-curl \ --enable-ftp \ --enable-gd \ --enable-pcntl \ --with-pdo-mysql \ --enable-soap \ --enable-sockets \ --with-zip \ --with-pear
make && make test
make install
|
参数说明:
参数 |
描述 |
–prefix |
安装目录 |
–enable-fpm |
开启php-fpm |
–enable-ftp |
开启ftp |
–enable-bcmath |
开启bcmath |
–enable-calendar |
开启calendar |
–with-libxml |
安装XML扩展 |
–with-openssl |
安装OPENSSL扩展 |
–with-zlib |
安装ZLIB扩展 |
–with-curl |
安装CURL扩展 |
–with-pdo-mysql |
安装PDO-MYSQL扩展 |
–with-zip |
安装ZIP扩展 |
–with-pear |
安装PEAR扩展 |