MacPorts 安装 Tengine
创建 Portfile
以下是我参考 nginx
调整后的 Portfile
,如需安装指定版本,除了修改版本号之外还需要修改 checksums
里的 sha256
sha256
值需下载 Tengine 源码文件(tar.gz)进行计算
模块的调整在最后的 configure.args-append
部分,参考 https://tengine.taobao.org/document/install.html 和 Nginx 编译参数
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4PortSystem 1.0name tengine
version 3.1.0
revision 0
categories www
license BSD
maintainers nomaintainerconflicts nginx nginx-develdescription A high performance web server based on Nginx
long_description Tengine is a web server originated by Taobao, \compatible with Nginx, with additional features.homepage http://tengine.taobao.org
master_sites http://tengine.taobao.org/downloaddistname ${name}-${version}
checksums sha256 64ed7155c0c904ce0fe7199c21b8eb6c2abfc267278fa8af832c0cb781e864dcdepends_lib port:pcre \port:openssl \port:zlibset nginx_share ${prefix}/share/${name}
set nginx_examples ${nginx_share}/examples
set nginx_confdir ${prefix}/etc/${name}
set nginx_logdir ${prefix}/var/log/${name}
set nginx_rundir ${prefix}/var/run/${name}
set nginx_pidfile ${nginx_rundir}/${name}.pid
set nginx_all_confs {fastcgi.conf fastcgi_params mime.types nginx.conf scgi_params uwsgi_params}
set auto_activate_confs {nginx.conf mime.types fastcgi.conf}configure.args-append \--with-cc-opt=\"${configure.cppflags} ${configure.cflags}\" \--with-ld-opt=\"${configure.ldflags}\" \--conf-path=${nginx_confdir}/nginx.conf \--error-log-path=${nginx_logdir}/error.log \--http-log-path=${nginx_logdir}/access.log \--pid-path=${nginx_pidfile} \--lock-path=${nginx_rundir}/${name}.lock \--http-client-body-temp-path=${nginx_rundir}/client_body_temp \--http-proxy-temp-path=${nginx_rundir}/proxy_temp \--http-fastcgi-temp-path=${nginx_rundir}/fastcgi_temp \--http-uwsgi-temp-path=${nginx_rundir}/uwsgi_temp \--http-scgi-temp-path=${nginx_rundir}/scgi_temp \--with-compat# pcre2 breaks the lua module (https://trac.macports.org/ticket/65150)
configure.args-append --without-pcre2# remove --disable-dependency-tracking
configure.universal_args-delete --disable-dependency-trackingbuild.target build
destroot.keepdirs ${destroot}${nginx_logdir} \${destroot}${nginx_rundir}post-destroot {xinstall -d -m 755 ${destroot}${nginx_share}xinstall -d -m 755 ${destroot}${nginx_examples}foreach conf ${nginx_all_confs} {set conf_path "${destroot}${nginx_confdir}/${conf}"if {[file exists ${conf_path}]} {file delete ${conf_path}}if {[file exists ${conf_path}.default]} {move ${conf_path}.default ${destroot}${nginx_examples}}}file rename ${destroot}${prefix}/html ${destroot}${nginx_share}# Install the manpageset man_path "${destroot}${prefix}/share/man/man8"xinstall -d -m 0755 ${man_path}xinstall -m 0644 ${worksrcpath}/man/nginx.8 ${man_path}reinplace -q "s|/var/run/mytengine.pid|${nginx_pidfile}/|g" ${man_path}/nginx.8
}post-activate {foreach conf ${auto_activate_confs} {if {![file exists ${nginx_confdir}/${conf}]} {xinstall -m 644 ${nginx_examples}/${conf}.default ${nginx_confdir}/${conf}}}
}startupitem.create yes
startupitem.pidfile auto ${nginx_pidfile}
startupitem.executable ${prefix}/sbin/nginx -g "daemon off;"notes "\A set of sample configuration files has been installed in ${nginx_examples}.\n\n\Additionally, the files [join ${auto_activate_confs} ", "] have been copied to ${nginx_confdir} if they didn't exist yet.\n\Adjust these files to your needs before starting Tengine."configure.args-append --prefix=${prefix} \--with-http_ssl_module \--with-http_v2_module \--with-http_realip_module \--with-http_addition_module \--with-http_xslt_module \--with-http_geoip_module \--with-http_flv_module \--with-http_mp4_module \--with-http_gunzip_module \--with-http_gzip_static_module \--with-http_auth_request_module \--with-pcre \--with-threads \--with-stream \--with-stream_ssl_module \--with-stream_realip_module \--with-stream_geoip_module \--with-stream_ssl_preread_modulelivecheck.type regexm
livecheck.url ${homepage}/en/download.html
将文件保存至 ~/Ports/www/tengine/Portfile
添加自定义源
编辑 /opt/local/etc/macports/sources.conf
,在最下方加上一行:
# 默认
rsync://rsync.macports.org/macports/release/tarballs/ports.tar.gz [default]
# 增加该行,注意替换用户名
file:///Users/用户名/Ports
运行 sudo portindex ~/Ports
加入索引
安装
运行 port info tengine
可以查看到信息后就能通过 install
安装了:
sudo port install tengine
配置
配置文件目录:/opt/local/etc/tengine
,同样的修改 nginx.conf
文件即可
日志文件目录:/opt/local/var/log/tengine
,建议修改文件夹权限方便通过编辑器查看日志:
sudo chown _www:admin /opt/local/var/log/tengine
运行目录:/opt/local/var/run/tengine
启停
sudo port load tengine
sudo port unload tengine
相关文章:
MacPorts 安装 Tengine
创建 Portfile 以下是我参考 nginx 调整后的 Portfile,如需安装指定版本,除了修改版本号之外还需要修改 checksums 里的 sha256 sha256 值需下载 Tengine 源码文件(tar.gz)进行计算 模块的调整在最后的 configure.args-append …...

Git安装及基础学习
Git学习 Git安装 概述: Git是一个开源的分布式版本控制系统,可以有效、高速的处理 从很小到非常大的项目版本管理,是目前使用范围最广的版本 管理工具。 下载安装: 下载地址:https://git-scm.com/ 下载后傻瓜式一键安…...

【celery】任务有时候不执行
celery任务有时执行,有时不执行,这种情况是任务被冒领;有时执行说明这个方法可以使用,有时不执行通常是被使用同一个消息队列的进程冒领了; 解决 Redis:指定一个分块就行了...

【恶意软件检测论文】通过提取 API 语义来实现的一个新颖的安卓恶意软件检测方法
目录 摘要1. 引言2. 相关工作2.1. 基于重新训练的恶意软件检测2.2. 基于应用关系图的恶意软件检测2.3. 基于异常样本识别的恶意软件检测2.4. 基于API聚类的恶意软件检测 3. AMDASE概述4. 基于语义距离的API聚类4.1. API特征提取4.2. API句子生成4.3. API句子编码4.4.聚类中心生…...
什么,不用 Tomcat 也能运行 Java web?
在 Java web 开发领域,传统的 Tomcat 服务器一直占据着重要地位。但如今,Blade 框架的出现为我们提供了一种全新的开发体验,它无需依赖 Tomcat 便可运行 Java web 应用。 一、Blade 框架简介 是一款轻量级且高性能的 Java web 框架。其设计理…...

华为HarmonyOS实现跨多个子系统融合的场景化服务 -- 1 构建快速验证手机号Button
场景介绍 快速验证手机号Button功能用于帮助开发者向用户发起手机号申请,应用在满足《常见类型移动互联网应用程序必要个人信息范围规定》(对第三方网站的内容,华为公司不承担任何责任)中使用手机号的必要业务场景,经…...

王佩丰24节Excel学习笔记——第十一讲:Vlookup函数
【以 Excel2010 系列学习,用 Office LTSC 专业增强版 2021 实践】 【本章小技巧】 掌握vlookup使用方法,选区的第一列一定是查询参数条件一。使用通配符查询。vlookup 限 255 位长度。掌握日常使用场景。使用vlookup模糊匹配查询个税 一、使用Vlookup函…...
【QT实战の心情笔记】
文章目录 界面布局主要界面分为三部分:1. 笔记列表区域2. 笔记内容编辑区域3. 操作按钮区域 Qt Designer 界面设计步骤完整界面布局图各控件设置和属性Qt Designer 文件 (.ui) 数据库表结构SQL 表结构: 逻辑代码1. 项目结构2. Note 类 (Note.h 和 Note.c…...

图像生成工具WebUI
介绍 Stable Diffusion WebUI(AUTOMATIC1111,简称A1111)是一个为高级用户设计的图形用户界面(GUI),它提供了丰富的功能和灵活性,以满足复杂和高级的图像生成需求。如今各种人工智能满天飞&…...
排查常见的 MySQL性能问题
1. 查询速度慢:MySQL 数据库中最常见的性能问题之一是查询执行速度慢。缓慢的查询会增加等待时间和阻碍应用程序响应能力,从而显著影响用户体验。这些缓慢的查询可能由各种因素引起,例如缺少适当的索引、设计不佳的数据库架构、查询逻辑本身效…...

滑雪场管理系统
【毕业设计】基于SpringBoot Vue的滑雪场管理系统 摘要 随着信息化时代的快速发展,滑雪场作为冬季旅游的热门目的地,其管理效率和服务质量直接影响着游客的体验。为此,设计一个高效、安全、易用的滑雪场管理系统成为当务之急。本文详细阐述…...
西游记战力排名、笔记等
文章目录 战力排名对西游记的理解各个版本游戏题材西游记关卡和妖怪 西游记家喻户晓,没有谁不知道吧,无论是电视剧、影视,还是小说,乃至游戏,很多地方都有西游记的身影。 虽然知道,但总不如对三国啊、水浒啊…...

vue3 + js + vite创建的项目中配置svg图
安装 npm install vite-plugin-svg-icons npm install fast-globvite.config.js文件中配置如下内容 import { defineConfig } from vite import vue from vitejs/plugin-vue import { createSvgIconsPlugin } from vite-plugin-svg-icons import path from path export defau…...
c++ 找第一个只出现一次的字符
【题目描述】 给定一个只包含小写字母的字符串,请你找到第一个仅出现一次的字符。如果没有,输出no。 【输入】 一个字符串,长度小于100000。 【输出】 输出第一个仅出现一次的字符,若没有则输出no。 【输入样例】 abcabd【输出样…...

在 Unity 6 中使用APV为您的世界创建全局照明的新方法(一)
Unity 6 中推出的新照明功能让您能够更快速、更高效的完成对烘焙场景的照明工作,在本文中我们将与大家详细分享在 Unity 6 中应用自适应探针卷创建快速全局光照的更多细节与具体应用方法。由于内容比较丰富,我们将把内容分为三篇文章,以便大家…...

Win11安装安卓子系统WSA
文章目录 简介一、启用Hyper-V二、安装WSA三、安装APKAPK商店参考文献 简介 WSA:Windows Subsystem For Android 一、启用Hyper-V 控制面板 → 程序和功能 → 启用或关闭 Windows 功能 → 勾选 Hyper-V 二、安装WSA 进入 Microsoft Store,下拉框改为 …...
利用两种方式分别实现单例模式(懒汉式、饿汉式)
package testsingle;//实现单例的两种方式 public class TestMySingle {public static void main(String[] args) {ClassA ca1 ClassA.getClassA();ClassA ca2 ClassA.getClassA();System.out.println(ca1ca2);ClassB cb1 ClassB.getClassB();ClassB cb2 ClassB.getClassB(…...
js分页功能
先声明些全局变量方便我们在下面的代码中使用 //一页有多少条数据 let pagenum 10; //页码下标 let page_index 0; //总页数 let total_page; // 声明一个用于接数据的变量 let data; //获取数据 let res;通过获取数据渲染页面 // 渲染函数 function applys(da…...

Ubuntu20.04 编译运行 ORBSLAM2_with_pointcloud_map(以RGBD Orbbec Astra+为例)保姆级教程
Ubuntu20.04 编译运行 ORBSLAM2_with_pointcloud_map(以RGBD Orbbec Astra为例) 获取源码 git clone https://github.com/gaoxiang12/ORBSLAM2_with_pointcloud_map.git解压文件 得到如下内容 编译安装修改后的g2o cd g2o_with_orbslam2 mkdir build cd build cmake .. make…...
MyBatis(四)
第一章:MyBatis延迟加载策略 1. 延迟加载的概念 立即加载和延迟加载的区别,使用一对多的环境举例子。 立即加载:当前查询用户的时候,默认也把该用户所拥有的帐户信息查询出来了。 延迟加载:当前查询用户的时候&…...
反向工程与模型迁移:打造未来商品详情API的可持续创新体系
在电商行业蓬勃发展的当下,商品详情API作为连接电商平台与开发者、商家及用户的关键纽带,其重要性日益凸显。传统商品详情API主要聚焦于商品基本信息(如名称、价格、库存等)的获取与展示,已难以满足市场对个性化、智能…...
从零实现富文本编辑器#5-编辑器选区模型的状态结构表达
先前我们总结了浏览器选区模型的交互策略,并且实现了基本的选区操作,还调研了自绘选区的实现。那么相对的,我们还需要设计编辑器的选区表达,也可以称为模型选区。编辑器中应用变更时的操作范围,就是以模型选区为基准来…...
ssc377d修改flash分区大小
1、flash的分区默认分配16M、 / # df -h Filesystem Size Used Available Use% Mounted on /dev/root 1.9M 1.9M 0 100% / /dev/mtdblock4 3.0M...
1688商品列表API与其他数据源的对接思路
将1688商品列表API与其他数据源对接时,需结合业务场景设计数据流转链路,重点关注数据格式兼容性、接口调用频率控制及数据一致性维护。以下是具体对接思路及关键技术点: 一、核心对接场景与目标 商品数据同步 场景:将1688商品信息…...
【算法训练营Day07】字符串part1
文章目录 反转字符串反转字符串II替换数字 反转字符串 题目链接:344. 反转字符串 双指针法,两个指针的元素直接调转即可 class Solution {public void reverseString(char[] s) {int head 0;int end s.length - 1;while(head < end) {char temp …...
解决本地部署 SmolVLM2 大语言模型运行 flash-attn 报错
出现的问题 安装 flash-attn 会一直卡在 build 那一步或者运行报错 解决办法 是因为你安装的 flash-attn 版本没有对应上,所以报错,到 https://github.com/Dao-AILab/flash-attention/releases 下载对应版本,cu、torch、cp 的版本一定要对…...
全面解析各类VPN技术:GRE、IPsec、L2TP、SSL与MPLS VPN对比
目录 引言 VPN技术概述 GRE VPN 3.1 GRE封装结构 3.2 GRE的应用场景 GRE over IPsec 4.1 GRE over IPsec封装结构 4.2 为什么使用GRE over IPsec? IPsec VPN 5.1 IPsec传输模式(Transport Mode) 5.2 IPsec隧道模式(Tunne…...
docker 部署发现spring.profiles.active 问题
报错: org.springframework.boot.context.config.InvalidConfigDataPropertyException: Property spring.profiles.active imported from location class path resource [application-test.yml] is invalid in a profile specific resource [origin: class path re…...
rnn判断string中第一次出现a的下标
# coding:utf8 import torch import torch.nn as nn import numpy as np import random import json""" 基于pytorch的网络编写 实现一个RNN网络完成多分类任务 判断字符 a 第一次出现在字符串中的位置 """class TorchModel(nn.Module):def __in…...

NXP S32K146 T-Box 携手 SD NAND(贴片式TF卡):驱动汽车智能革新的黄金组合
在汽车智能化的汹涌浪潮中,车辆不再仅仅是传统的交通工具,而是逐步演变为高度智能的移动终端。这一转变的核心支撑,来自于车内关键技术的深度融合与协同创新。车载远程信息处理盒(T-Box)方案:NXP S32K146 与…...