首页
关于
归档
Search
1
centos7 nginx编译安装lua模块
1,629 阅读
2
免费DV数字证书申请及ssl配置
1,479 阅读
3
开坑,mini php框架欢迎来填坑
1,274 阅读
4
vim molokai 配色方案
1,228 阅读
5
Deny Hosts 对ssh服务进行黑白名单过滤
1,123 阅读
rocky linux
技术分享
登录
Search
标签搜索
linux
nginx
php
ssl
lua
letsencrypt
denyhost
ssh
epoll
io
vim
molokai
光子社区
累计撰写
9
篇文章
累计收到
1
条评论
首页
栏目
rocky linux
技术分享
页面
关于
归档
搜索到
4
篇与
的结果
2025-08-16
rocky linux编译安装php 8
编译php之前需要先安装依赖库安装EPEL仓库dnf install -y epel-release dnf clean all dnf makecache dnf install -y wget libxml2-devel sqlite-devel bzip2-devel libcurl-devel libffi-devel libpng-devel libwebp-devel libjpeg-devel oniguruma libzip dnf install -y gcc make autoconf automake libtool bison gcc libicu-devel openssl-devel dnf install -y gcc gcc-c++ make autoconf automake libtool bison re2c openssl-devel libxml2-devel libpng-devel libjpeg-devel libicu-devel curl-devel sqlite-devel libuuid-devel systemd-devel libxslt-devel readline-devel dnf groupinstall "Development Tools" -y安装oniguruma-devel和libzip-develwget https://dl.rockylinux.org/pub/rocky/9/devel/x86_64/os/Packages/o/oniguruma-devel-6.9.6-1.el9.6.x86_64.rpm dnf -y install oniguruma-devel-6.9.6-1.el9.6.x86_64.rpm wget https://dl.rockylinux.org/pub/rocky/9/devel/x86_64/os/Packages/l/libzip-devel-1.7.3-8.el9.x86_64.rpm dnf -y install libzip-devel-1.7.3-8.el9.x86_64.rpm下载php 8源码wget https://www.php.net/distributions/php-8.3.22.tar.gz写编译脚本并编译chmod +x build.sh && sudo sh build.sh 编译脚本如下#!/bin/bash CURRDIR=`dirname "$0"` BASEDIR=`cd "$CURRDIR"; pwd` VERSION=8.3.22 cd $BASEDIR/php-$VERSION ./configure --prefix=/usr/local/php/php-8.3.22 \ --with-curl \ --with-freetype-dir \ --with-gd \ --with-gettext \ --with-iconv-dir \ --with-kerberos \ --with-libdir=lib64 \ --with-libxml-dir \ --with-mysqli \ --with-openssl \ --with-pcre-regex \ --with-pdo-mysql \ --with-pdo-sqlite \ --with-pear \ --with-png-dir \ --with-jpeg-dir \ --with-xmlrpc \ --with-xsl \ --with-zlib \ --with-bz2 \ --with-mhash \ --enable-fpm \ --enable-bcmath \ --enable-libxml \ --enable-gd \ --enable-mbregex \ --enable-mbstring \ --enable-opcache \ --enable-pcntl \ --enable-shmop \ --enable-soap \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-xml \ --enable-zip make && make install编译完成后需要到/usr/local/php/php-8.3.22目录下查看bin目录下的php版本,和sbin目录下的php-fpm的版本
2025年08月16日
18 阅读
0 评论
2 点赞
2025-08-06
rocky linux 源码编译nginx
下载源码包并解压新建目录,将下载的源码存放到该目录下(方便后续编译)mkdir ${dir} cd ${dir}下载nginx源码#下载nginx源码包 wget http://nginx.org/download/nginx-1.20.2.tar.gz tar -zxvf nginx-1.26.3.tar.gz安装相关依赖sudo dnf install gcc-c++ gcc krb5 krb5-devel zlib zlib-devel pcre pcre-devel perl-devel perl-ExtUtils-Embed设置nginx编译参数创建build.sh脚本vi build.sh脚本内容如下#!/bin/bash CURRDIR=`dirname "$0"` BASEDIR=`cd "$CURRDIR"; pwd` VERSION=1.26.3 cd $BASEDIR/nginx-$VERSION ./configure --with-cc-opt='-fPIE' --with-ld-opt='-pie' --prefix=/usr/local/nginx/nginx-1.26.3 \ --conf-path=/usr/local/nginx/nginx-1.26.3/conf/nginx.conf \ --sbin-path=/usr/local/nginx/nginx-1.26.3/sbin/nginx \ --pid-path=/usr/local/nginx/nginx-1.26.3/logs/nginx.pid \ --error-log-path=/usr/local/nginx/nginx-1.26.3/logs/error.log \ --http-log-path=/usr/local/nginx/nginx-1.26.3/logs/access.log \ --http-client-body-temp-path=/usr/local/nginx/nginx-1.26.3/client_body_temp \ --http-proxy-temp-path=/usr/local/nginx/nginx-1.26.3/proxy_temp \ --http-fastcgi-temp-path=/usr/local/nginx/nginx-1.26.3/fastcgi_temp \ --http-uwsgi-temp-path=/usr/local/nginx/nginx-1.26.3/uwsgi_temp \ --http-scgi-temp-path=/usr/local/nginx/nginx-1.26.3/scgi_temp \ --user=root \ --group=root \ --with-http_ssl_module \ --with-http_realip_module \ --with-http_flv_module \ --with-http_mp4_module \ --with-http_gunzip_module \ --with-http_gzip_static_module \ --with-http_secure_link_module \ --with-http_v2_module \ --with-http_stub_status_module \ --with-http_sub_module \ --with-http_perl_module \ --with-mail \ --with-mail_ssl_module \ --with-stream \ --with-stream_ssl_module \ --with-file-aio \ --with-ipv6 \ --with-perl_modules_path=/usr/local/nginx/nginx-1.26.3/modules make && make install chmod +s /usr/local/nginx/nginx-1.26.3/sbin/nginx执行构建sudo sh build.sh构建成功后,在/usr/local/nginx/nginx-1.26.3/sbin/nginx查看文件是否存在,并运行/usr/local/nginx/nginx-1.26.3/sbin/nginx -v 查看版本信息是否正确,以上nginx就构建完成了。
2025年08月06日
21 阅读
1 评论
1 点赞
2022-06-15
centos7 php 7源码编译安装
下载php7源码 wget https://www.php.net/distributions/php-7.4.30.tar.gz tar -zxvf php-7.4.30.tar.gz由于php安装须要编译,因此服务器应该保证gcc和g++环境的安装安装php编译相关依赖 yum -y install gcc gcc-c++ libxml2 libxml2-devel openssl openssl-devel curl curl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel pcre pcre-devel libxslt libxslt-devel bzip2 bzip2-devel sqlite-devel oniguruma oniguruma-devel创建php编译脚本设置编译参数 #!/bin/bash CURRDIR=`dirname "$0"` BASEDIR=`cd "$CURRDIR"; pwd` VERSION=7.4.30 cd $BASEDIR/php-$VERSION ./configure --prefix=/usr/local/php/php-7.4.30 \ --with-curl \ --with-freetype-dir \ --with-gd \ --with-gettext \ --with-iconv-dir \ --with-kerberos \ --with-libdir=lib64 \ --with-libxml-dir \ --with-mysqli \ --with-openssl \ --with-pcre-regex \ --with-pdo-mysql \ --with-pdo-sqlite \ --with-pear \ --with-png-dir \ --with-jpeg-dir \ --with-xmlrpc \ --with-xsl \ --with-zlib \ --with-bz2 \ --with-mhash \ --enable-fpm \ --enable-bcmath \ --enable-libxml \ --enable-inline-optimization \ --enable-gd-native-ttf \ --enable-mbregex \ --enable-mbstring \ --enable-opcache \ --enable-pcntl \ --enable-shmop \ --enable-soap \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-xml \ --enable-zip make && make install编译安装php sudo sh build.sh配置php参数
2022年06月15日
4 阅读
0 评论
0 点赞
2022-06-12
centos7 nginx编译安装lua模块
lua作为一个小巧轻量的脚本语言,可以快速的嵌入到c/c++程序中,扩展程序的功能。lua有一个同时进行的JIT项目,提供在特定平台上的即时编译功能。编译安装luajit wget -O LuaJIT-2.0.5.tar.gz http://luajit.org/download/LuaJIT-2.0.5.tar.gz tar -zxvf LuaJIT-2.0.5.tar.gz cd LuaJIT-2.0.5 make && make install PREFIX=/usr/local/luajit配置lua环境变量打开系统设置 sudo vi /etc/profile增加luajit的环境变量 LUAJIT_HOME=/usr/local/luajit export PATH=$PATH:$LUAJIT_HOME/bin export LUAJIT_LIB=$LUAJIT_HOME/lib export LUAJIT_INC=$LUAJIT_HOME/include/luajit-2.0使系统环境变量生效 source /etc/profile下载源码包并解压新建目录,将下载的源码存放到该目录下(方便后续编译) mkdir ${dir} cd ${dir}下载nginx扩展依赖 #下载nginx lua扩展模块 wget -O lua-nginx-module-0.10.20.tar.gz https://github.com/openresty/lua-nginx-module/archive/refs/tags/v0.10.20.tar.gz tar -zxvf lua-nginx-module-0.10.20.tar.gz #下载nginx开发工具包 wget -O ngx_devel_kit_v0.3.1.tar.gz https://github.com/vision5/ngx_devel_kit/archive/refs/tags/v0.3.1.tar.gz tar -zxvf ngx_devel_kit_v0.3.1.tar.gz #下载rtmp模块 wget -O nginx-rtmp-module-1.2.2.tar.gz https://git.photonbarrier.com/arut/nginx-rtmp-module/archive/refs/tags/v1.2.2.tar.gz tar -zxvf nginx-rtmp-module-1.2.2.tar.gz下载nginx编译相关依赖 #下载openssl源码包 wget https://www.openssl.org/source/old/1.1.0/openssl-1.1.0i.tar.gz tar -zxvf openssl-1.1.0i.tar.gz #下载pcre源码包 wget https://webwerks.dl.sourceforge.net/project/pcre/pcre/8.45/pcre-8.45.tar.gz tar -zxvf pcre-8.45.tar.gz #下载zlib源码包 wget http://www.zlib.net/fossils/zlib-1.2.11.tar.gz tar -zxvf zlib-1.2.11.tar.gz #下载nginx源码包 wget http://nginx.org/download/nginx-1.20.2.tar.gz tar -zxvf nginx-1.20.2.tar.gz安装相关依赖 #安装perl依赖 yum install gcc-c++ gcc perl-devel perl-ExtUtils-Embed设置nginx编译参数 #创建build.sh脚本 vi build.sh #!/bin/bash CURRDIR=`dirname "$0"` BASEDIR=`cd "$CURRDIR"; pwd` VERSION=1.20.2 cd $BASEDIR/nginx-$VERSION ./configure --prefix=/usr/local/nginx/nginx-1.20.2 \ --conf-path=/usr/local/nginx/nginx-1.20.2/conf/nginx.conf \ --sbin-path=/usr/local/nginx/nginx-1.20.2/sbin/nginx \ --pid-path=/usr/local/nginx/nginx-1.20.2/logs/nginx.pid \ --error-log-path=/usr/local/nginx/nginx-1.20.2/logs/error.log \ --http-log-path=/usr/local/nginx/nginx-1.20.2/logs/access.log \ --http-client-body-temp-path=/usr/local/nginx/nginx-1.20.2/client_body_temp \ --http-proxy-temp-path=/usr/local/nginx/nginx-1.20.2/proxy_temp \ --http-fastcgi-temp-path=/usr/local/nginx/nginx-1.20.2/fastcgi_temp \ --http-uwsgi-temp-path=/usr/local/nginx/nginx-1.20.2/uwsgi_temp \ --http-scgi-temp-path=/usr/local/nginx/nginx-1.20.2/scgi_temp \ --user=root \ --group=root \ --with-http_ssl_module \ --with-http_realip_module \ --with-http_flv_module \ --with-http_mp4_module \ --with-http_gunzip_module \ --with-http_gzip_static_module \ --with-http_secure_link_module \ --with-http_v2_module \ --with-http_stub_status_module \ --with-http_sub_module \ --with-http_perl_module \ --with-mail \ --with-mail_ssl_module \ --with-stream \ --with-stream_ssl_module \ --with-file-aio \ --with-ipv6 \ --with-pcre=../pcre-8.45 \ --with-perl_modules_path=/usr/local/nginx/nginx-1.20.2/modules \ --with-zlib=../zlib-1.2.11 \ --with-openssl=../openssl-1.1.0i \ --with-ld-opt="-Wl,-rpath,/usr/local/luajit/lib" \ --add-module=../lua-nginx-module-0.10.20 \ --add-module=../ngx_devel_kit_v0.3.1 \ --add-module=../nginx-rtmp-module-1.2.2 make && make install chmod +s /usr/local/nginx/nginx-1.20.2/sbin/nginx注意:nginx编译参数中的模块路径如果相对路径找不到,可以写成系统的绝对路径进行编译编译安装nginx sudo sh build.sh成功后测试nginx的版本 /usr/local/nginx/nginx-1.20.2/sbin/nginx -v
2022年06月12日
1,629 阅读
0 评论
6 点赞