KMS最低要求:Windows8,Office2010
数字权利激活要求:Windows10/11
ohook激活最低要求:Office2013
分类: OS
arm宝塔面板安装Nginx防火墙后导致Nginx报错
错误场景
在甲骨文VPS(Oracle Cloud)中的arm服务器,安装宝塔面板的Nginx防火墙,会导致之前安装的nginx重启报错unknown directive "lua_shared_dict"
原因分析
这个功能应该是和面板上面的编译安装中出现的自定义模块有关,但是并不妨碍我们使用这个功能来实现自动编译和加载 LuaJIT。
解决方法
1.在 /www/server/panel/install 分别创建名字为nginx_prepare.sh和nginx_configure.pl的文件,然后将两个文件的权限设置为600并且将所有者设置为root。
nginx_prepare.sh 的内容
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
wget -c -O LuaJIT-2.1.zip https://github.com/LuaJIT/LuaJIT/archive/refs/heads/v2.1.zip -T 10
unzip LuaJIT-2.1.zip
if [ -e LuaJIT-2.1 ]; then
cd LuaJIT-2.1
make linux
make install
export LUAJIT_LIB=/usr/local/lib
export LUAJIT_INC=/usr/local/include/luajit-2.1/
ln -sf /usr/local/lib/libluajit-5.1.so.2 /usr/local/lib64/libluajit-5.1.so.2
if [ `grep -c /usr/local/lib /etc/ld.so.conf` -eq 0 ]; then
echo "/usr/local/lib" >> /etc/ld.so.conf
fi
ldconfig
cd ..
fi
rm -rf LuaJIT-2.1*
提醒:直接复制粘贴可能存在回车符,如果遇到编译失败请使用sed -i 's/\r//g' /www/server/panel/install/nginx_prepare.sh
删除回车符。
nginx_configure.pl 的内容
--add-module=/www/server/nginx/src/ngx_devel_kit --add-module=/www/server/nginx/src/lua_nginx_module
这里的LuaJIT源码来自GitHub
关于缺失的jemalloc,原作者经过测试需要 5.1.0 以上的版本才可以让Nginx 1.20.x正常编译,加载 jemalloc 之后单个 Nginx 的进程内存占用高达 2G(虽然这台 ARM 有 32G 的内存),所以放弃这个模块,如果你需要用到,就将下面代码追加到nginx_prepare.sh文件中。
if [ ! -f '/usr/local/lib/libjemalloc.so' ]; then
wget -O jemalloc-5.2.1.tar.bz2 ${download_Url}/src/jemalloc-5.2.1.tar.bz2
tar -xvf jemalloc-5.2.1.tar.bz2
cd jemalloc-5.2.1
./configure
make && make install
ldconfig
cd ..
rm -rf jemalloc*
fi
同时在nginx_configure.pl追加一个空格后追加--with-ld-opt=-ljemalloc
2.最后在面板升级一下 Nginx,或者终端执行下面命令重新编译 Nginx,之后就可以愉快使用 LuaJIT 了。
cd /www/server/panel/install && bash install_soft.sh 0 update nginx 1.22
运行之前你需要稍作修改,将 1.22 修改成你需要升级或安装的版本,如果你需要升级则先看下自己的 Nginx 是什么版本,比如 1.18.1 则修改为 1.18,脚本运行完成后 Nginx 的版本也会升级到 1.18 的最新版本。另外,如果你的服务器未安装 Nginx,则需要将update
修改为install
。
原作者使用的是Ubuntu,本人使用的是Oracle Linux。
参考链接:
Linux梭哈
- acme.sh
- btpanel-x64
- docker-x64
- docker-x64-firefox
- docker-x64-jellyfin
- docker-x64-portainer
- docker-x64-qbittorrent
- nfs-x64
- vscode-server-x64
- xray-x64
- zerotier-x64
- btpanel-x64
- aarch64运行Windows
- docker-aarch64
- docker-aarch64-firefox
- docker-aarch64-portainer
- docker-aarch64-windows
- nginx-aarch64
- novnc-aarch64
- Oracle Cloud 还原引导盘
- oracle-vm-virtualbox-aarch64
- qemu-aarch64
- vncserver-aarch64
- wine-aarch64
- docker-aarch64-pandora-next
去除Windows8.1升级Windows11提示框
Windows 8.1支持已于 2023 年 1 月 10 日结束 从此版本开始,我们将显示一个模式对话框,提醒用户有关 2023 年 1 月终止对Windows 8.1的支持。 运行Windows 8.1 专业版或Windows 8.1 企业版的托管设备上不会显示此提醒。1. 将KB5022346,KB5022352两个更新卸载。 2. 重启后禁用Windows Update服务。
使用vlmcsd激活出现错误0x8007000d
Because it’s not a bug or problem with vlmcsd. The reason for this error in this case is because the KMS server and the KMS client (Windows/Office) that’s being activated are on the same machine using “localhost” or “127.0.0.1” as the KMS server. This is not supported by Microsoft and there is nothing that can be done to “fix” this on the vlmcsd end. If you’re seeing this error, and you are using a virtual network adapter (either VPN or TeamViewer) to circumvent this limitation, or if your vlmcsd server is running on a different machine or VM, please submit a new bug report with all the pertinent details, like IP addresses of the vlmcsd server and the machine trying to get activated.