采编: reistlin
来源: Internet 互联网
更新时间: 2024.04
版权声明: <<了解这个世界>>系列文章.转载请保留作者信息和原文完整.

knowledge.gif

mandelbrot_sequence.gif

曼德博集合(英语:Mandelbrot Set,或译为曼德布洛特复数集合)是一种在复平面上组成分形的点的集合,以数学家本华·曼德博的名字命名。曼德博集合与朱利亚集合有些相似的地方,例如使用相同的复二次多项式来进行迭代。

Mandel_zoom_00_mandelbrot_set.jpg

- 阅读剩余部分 -

作者: reistlin
来源: http://www.reistlin.com/blog/444
更新时间: 2024.04
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

UO Outlands [https://uooutlands.com]
UO Razor Assistant [https://www.razorce.com]

一,关闭 UO 客户端,编辑 default.xml 文件

游戏目录\ClassicUO\Data\Plugins\Assistant\Profiles\default.xml

二,替换 XML 标签 overheadmessages 之间的内容

<overheadmessages>
	<overheadmessage searchtext="The world will save in 15 seconds" message="* 服务器准备保存 *" hue="53" />
	<overheadmessage searchtext="The world is saving, please wait" message="* 服务器正在保存 *" hue="38" />
	<overheadmessage searchtext="World save complete" message="* 服务器保存完成 *" hue="68" />
	<overheadmessage searchtext="Captcha successful" message="* 验证成功 *" hue="68" />
	<overheadmessage searchtext="You are now under the protection of the town guards" message="* 进入城镇(安全) *" hue="68" />
	<overheadmessage searchtext="You have left the protection of the town guards" message="* 离开城镇(危险) *" hue="53" />
	<overheadmessage searchtext="You enter the rental room" message="* 进入房间(租用) *" hue="68" />
	<overheadmessage searchtext="You exit the rental room" message="* 离开房间(租用) *" hue="53" />
	<overheadmessage searchtext="You begin applying the bandages" message="* 开始绷带 *" hue="88" />
	<overheadmessage searchtext="You finish applying the bandages" message="* 绷带完成 *" hue="68" />
	<overheadmessage searchtext="You begin using veterinary supplies" message="* 开始绷带(宠物) *" hue="88" />
	<overheadmessage searchtext="You finish using veterinary supplies" message="* 绷带完成(宠物) *" hue="68" />
	<overheadmessage searchtext="You are able to resurrect your follower" message="* 绷带复活(宠物) *" hue="68" />
	<overheadmessage searchtext="You fail to resurrect one or more of your followers" message="* 绷带复活(失败) *" hue="38" />
	<overheadmessage searchtext="Passive taming skill gain available" message="* 获得技能(驯兽) *" hue="68" />
	<overheadmessage searchtext="You enter a meditative trance" message="* 开始冥想 *" hue="68" />
	<overheadmessage searchtext="You stop meditating" message="* 停止冥想 *" hue="68" />
	<overheadmessage searchtext="You cannot focus your concentration" message="* 冥想失败 *" hue="53" />
	<overheadmessage searchtext="You are currently prevented from" message="* 禁止拾取 *" hue="53" />
	<overheadmessage searchtext="Magical travel is not allowed in this location" message="* 禁止传送 *" hue="53" />
	<overheadmessage searchtext="You are too fatigued to move" message="* 已超重 *" hue="38" />
	<overheadmessage searchtext="You charge your spell with additional energy" message="* 法术充能 *" hue="88" />
	<overheadmessage searchtext="You absorb their spell" message="* 法术吸收 *" hue="88" />
	<overheadmessage searchtext="You parry the spell" message="* 法术格挡 *" hue="88" />
	<overheadmessage searchtext="Being perfectly rested, you shove them out of the way" message="* 推开 *" hue="88" />
	<overheadmessage searchtext="Your attack causes your target to bleed" message="* 流血 *" hue="88" />
	<overheadmessage searchtext="You smash through the remainder" message="* 破甲 *" hue="88" />
	<overheadmessage searchtext="Your shot hinders your target" message="* 定身 *" hue="88" />
	<overheadmessage searchtext="Your lightning spell hinders your target" message="* 定身(闪电) *" hue="88" />
	<overheadmessage searchtext="You cause your target to bleed out" message="* 终结技(BleedOut) *" hue="88" />
	<overheadmessage searchtext="You execute your target" message="* 终结技(Execute) *" hue="88" />
	<overheadmessage searchtext="Crafting queue begun" message="* 开始制造(队列) *" hue="68" />
	<overheadmessage searchtext="Crafting queue stopped" message="* 停止制造(队列) *" hue="53" />
	<overheadmessage searchtext="Crafting queue complete" message="* 制造完成(队列) *" hue="68" />
	<overheadmessage searchtext="You create the item" message="* 制造成功 *" hue="68" />
	<overheadmessage searchtext="You create an exceptional quality item" message="* 制造成功(卓越) *" hue="68" />
	<overheadmessage searchtext="You failed to create the item" message="* 制造失败 *" hue="53" />
	<overheadmessage searchtext="You pour the potion into a bottle" message="* 制造成功 *" hue="68" />
	<overheadmessage searchtext="You fail to create a useful potion" message="* 制造失败 *" hue="53" />
	<overheadmessage searchtext="You don''t have the resources required to make that item" message="* 缺少制造材料 *" hue="53" />
	<overheadmessage searchtext="You have worn out your tool" message="* 工具损坏 *" hue="38" />
	<overheadmessage searchtext="Target an individual item to recycle" message="* 选择物品(回收) *" hue="53" />
	<overheadmessage searchtext="You successfully steal the item" message="* 偷窃成功 *" hue="68" />
	<overheadmessage searchtext="You fail in your stealing attempt" message="* 偷窃失败 *" hue="38" />
	<overheadmessage searchtext="Now tracking" message="* 目标 {3} *" hue="38" />
	<overheadmessage searchtext="Distance to destination" message="* 目标距离 {4} *" hue="38" />
	<overheadmessage searchtext="You cannot cast a spell while frozen" message="* 无法施法 *" hue="38" />
	<overheadmessage searchtext="You cannot move" message="* 无法移动 *" hue="38" />
	<overheadmessage searchtext="You must wait another" message="* 冷却 {5} 秒 *" hue="53" />
	<overheadmessage searchtext="Target cannot be seen" message="* 目标不在视野 *" hue="53" />
	<overheadmessage searchtext="You cannot see that from here" message="* 目标不在视野 *" hue="53" />
	<overheadmessage searchtext="That is too far away" message="* 距离太远 *" hue="53" />
	<overheadmessage searchtext="That vendor is too far away from you" message="* 距离太远(商人) *" hue="53" />
	<overheadmessage searchtext="You are too far away to use that" message="* 距离太远(物品) *" hue="53" />
	<overheadmessage searchtext="Target is too far away." message="* 距离太远(目标) *" hue="53" />
	<overheadmessage searchtext="You or your nearby followers do not require healing" message="* 距离太远(宠物) *" hue="53" />
	<overheadmessage searchtext="You do not have enough holy symbols for that ability" message="* 神圣符文不足 *" hue="53" />
	<overheadmessage searchtext="You consume a magic mushroom and restore some mana" message="* 魔法蘑菇(已使用) *" hue="68" />
	<overheadmessage searchtext="You may now use another magic mushroom" message="* 魔法蘑菇(已冷却) *" hue="88" />
	<overheadmessage searchtext="You have been in combat" message="* 战斗状态中 *" hue="53" />
	<overheadmessage searchtext="That spell will not adhere to you at this time" message="* 法术冷却中 *" hue="53" />
	<overheadmessage searchtext="You are already casting a spell" message="* 施法进行中 *" hue="53" />
	<overheadmessage searchtext="You have not yet recovered from casting a spell" message="* 施法恢复中 *" hue="53" />
	<overheadmessage searchtext="Your concentration is disturbed, thus ruining thy spell" message="* 施法被干扰 *" hue="38" />
	<overheadmessage searchtext="You must wait to perform another action" message="* 等待动作完成 *" hue="53" />
	<overheadmessage searchtext="You must wait a few moments to use another skill" message="* 等待技能完成 *" hue="53" />
	<overheadmessage searchtext="You must wait a few moments before you may use this item again" message="* 等待物品完成 *" hue="53" />
	<overheadmessage searchtext="You must wait another moment before you may pick up an item from here" message="* 等待拾取物品 *" hue="53" />
	<overheadmessage searchtext="The recipient of this trade would not be able to carry this" message="* 对方无法接收 *" hue="53" />
	<overheadmessage searchtext="There are no charges left on that item" message="* 剩余次数用完 *" hue="53" />
	<overheadmessage searchtext="You do not have that spell" message="* 没有这个法术 *" hue="53" />
	<overheadmessage searchtext="You must be near an anvil and a forge to smith items" message="* 没有锻炉铁砧 *" hue="53" />
	<overheadmessage searchtext="You place the gathered wool into your backpack" message="* 收集羊毛 *" hue="88" />
	<overheadmessage searchtext="You begin to move quietly" message="* 开始潜行 *" hue="88" />
	<overheadmessage searchtext="You feel comfortable enough to begin stealthing	" message="* 开始潜行 *" hue="88" />
	<overheadmessage searchtext="You feel ready to continue stealthing" message="* 继续潜行 *" hue="88" />
	<overheadmessage searchtext="You will automatically stealth when out of steps" message="* 继续潜行 *" hue="88" />
	<overheadmessage searchtext="Lock what down" message="* 锁定(Lock) *" hue="68" />
	<overheadmessage searchtext="Choose the item you wish to secure" message="* 保护(Secure) *" hue="68" />
	<overheadmessage searchtext="Choose the item you wish to release" message="* 解锁(Release) *" hue="38" />
	<overheadmessage searchtext="You cannot pick that up" message="* 无法拾取物品 *" hue="53" />
</overheadmessages>

三,启动游戏,Razor > General > Profiles 选择 default。

Outlands.jpg

作者: reistlin
来源: http://www.reistlin.com/blog/447
更新时间: 2024.03
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

azerothcore.gif

AzerothCore 主页:https://www.azerothcore.org
AzerothCore Wiki 文档:https://www.azerothcore.org/wiki/home

一,使用 screen 启动 worldserver

1、安装 screen:

apt-get install screen

2、使用 screen 启动 worldserver,窗口名称为:worldserver

cd /home/reistlin/azerothcore/bin
screen -S worldserver
./worldserver

3、退出当前 screen 窗口

Ctrl + a键 d键

4、查看 screen 窗口状态

reistlin@Debian:~/azerothcore/bin$ screen -ls
There is a screen on:
        112233.worldserver      (03/20/2024 10:00:00 AM)        (Attached)
1 Socket in /run/screen/S-reistlin.

二,使用 restart.sh 重启 AzerothCore

acore_screen:screen 窗口名称(默认:worldserver)
acore_path:AzerothCore 系统根目录(默认:/home/reistlin/azerothcore)
acore_delay:服务器计划重启时间,默认 60 秒后重启,同时通知所有在线玩家
app_user:运行 worldserver 的用户名称

#!/bin/bash
 
# name: restart AzerothCore by screen v0.1 (Linux Server)
# author: reistlin
# website: www.reistlin.com
# date: 2024.03.20
 
acore_screen="worldserver"
acore_path="/home/reistlin/azerothcore"
acore_delay="60"
 
app_user="reistlin"
app_process="SCREEN -S ${acore_screen}"
app_port="8085"
 
check1=`ps v -U ${app_user} | grep "${app_process}" | grep -v "grep" | wc -l`
check2=`netstat -nlpt | grep ":${app_port}" | wc -l`
 
if [ "${check1}" -eq 1 ] && [ "${check2}" -eq 1 ]; then
	# save
	screen -x -S ${acore_screen} -p 0 -X stuff "save\n"          
	sleep 1
 
	# shutdown
	screen -x -S ${acore_screen} -p 0 -X stuff "server shutdown ${acore_delay}\n"
	sleep `expr ${acore_delay} + 3`
 
	# start
	screen -x -S ${acore_screen} -p 0 -X stuff "${acore_path}/bin/worldserver\n"
	sleep 1
 
	# logfile
	echo "[`date "+%Y-%m-%d %H:%M:%S"`] ${acore_screen} service has successfully restarted" >> $HOME/crontab/restart.log
else
	echo "[EXIT] Not found worldserver by screen"
fi

编辑 crontab,设置每天凌晨 6 点自动重启

# restart AzerothCore worldserver
0  6 * * * /home/reistlin/crontab/restart.sh > /dev/null 2>&1

[https://github.com/shadowsocks/shadowsocks/wiki/Optimizing-Shadowsocks]

/etc/sysctl.d/local.conf

# max open files
fs.file-max = 51200
# max read buffer
net.core.rmem_max = 67108864
# max write buffer
net.core.wmem_max = 67108864
# default read buffer
net.core.rmem_default = 65536
# default write buffer
net.core.wmem_default = 65536
# max processor input queue
net.core.netdev_max_backlog = 4096
# max backlog
net.core.somaxconn = 4096
 
# resist SYN flood attacks
net.ipv4.tcp_syncookies = 1
# reuse timewait sockets when safe
net.ipv4.tcp_tw_reuse = 1
# turn off fast timewait sockets recycling
net.ipv4.tcp_tw_recycle = 0
# short FIN timeout
net.ipv4.tcp_fin_timeout = 30
# short keepalive time
net.ipv4.tcp_keepalive_time = 1200
# outbound port range
net.ipv4.ip_local_port_range = 10000 65000
# max SYN backlog
net.ipv4.tcp_max_syn_backlog = 4096
# max timewait sockets held by system simultaneously
net.ipv4.tcp_max_tw_buckets = 5000
# turn on TCP Fast Open on both client and server side
net.ipv4.tcp_fastopen = 3
# TCP receive buffer
net.ipv4.tcp_rmem = 4096 87380 67108864
# TCP write buffer
net.ipv4.tcp_wmem = 4096 65536 67108864
# turn on path MTU discovery
net.ipv4.tcp_mtu_probing = 1
 
# for high-latency network
net.ipv4.tcp_congestion_control = hybla
 
# for low-latency network, use cubic instead
# net.ipv4.tcp_congestion_control = cubic

sysctl --system

作者: reistlin
来源: http://www.reistlin.com/blog/444
更新时间: 2024.01
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

UO Outlands [https://uooutlands.com]
UO Razor Assistant [https://www.razorce.com]

# Auto Lumberjacking v1.2
# By REISTLIN
 
# Auto Recall ON/OFF
@setvar! AutoRecall 1
 
// Disparalyze
if paralyzed
    if findtype "pouch" backpack
        yell "[pouch"
    else
        overhead "* 没有 Trapped Pouch *" 38     
    endif
endif
 
// Auto Recall
if AutoRecall = 1
    if insysmsg "Distance to destination" or insysmsg "Now tracking"
        // Cancel Target
        if targetexists
            hotkey "Clear Target Queue"
            hotkey "Cancel Current Target"
        endif
 
        // Interrupt Current Action
        hotkey "> Interrupt"
 
        // Rune Book
        if findtype "runebook" backpack
            overhead "* 开始传送 *" 88
            dclicktype "runebook"
            waitforgump 1551740969
            gumpresponse 2
            stop
        endif
 
        // Outlands Requirement
        if findtype "Recall rune" backpack
            if skill "Magery" >= 40
                // Recall Scroll
                if findtype "Recall" backpack
                    overhead "* 开始传送(卷轴) *" 88
                    dclicktype "Recall"
                    waitfortarget
                    targettype "Recall rune"
                    stop                
                endif
                // Spell Book
                if findtype "Spellbook" backpack and findtype "Black Pearl%s%" backpack and findtype "Blood Moss" backpack and findtype "Mandrake Root%s%" backpack
                    overhead "* 开始传送(魔法) *" 88
                    cast "Recall"
                    waitfortarget
                    targettype "Recall rune"
                    stop
                endif
            else
                overhead "* 魔法技能不够 *" 38
            endif
        else
            overhead "* 没有传送符文 *" 53    
        endif
    endif
endif
 
// Check Tracking Buff
if not findbuff "tracking"
    skill "tracking"
    waitforgump 4267467659 
    gumpresponse 6
    wait 1000
    gumpclose 4267467659
    overhead "* 追踪中 *"
endif
 
// Check Left Hand
if lhandempty
    if findtype "hatchet" backpack
        dclicktype "hatchet" backpack
        wait 500
    else
        overhead "* 没有伐木工具 *" 38
        break
    endif
endif
 
// Check Over Weight
if weight > maxweight
    overhead "* 已超重 *" 38
else
    dclick "hands"
    waitfortarget 500
    target "self"
endif
 
// Report Status
if insysmsg "You chop some"
    overhead "* 伐木中 *" 88
elseif insysmsg "You broke your axe"
    overhead "* 伐木工具损坏 *" 38
elseif insysmsg "You do not see any harvestable resources nearby" or insysmsg "You cannot produce any wood from that"
    overhead "* 没有伐木资源 *" 53
elseif insysmsg "Harvesting is not allowed in this area"
    overhead "* 禁止伐木区域 *" 53
endif
 
wait 2000
 
loop

作者: reistlin
来源: http://www.reistlin.com/blog/443
更新时间: 2024.01
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

UO Outlands [https://uooutlands.com]
UO Razor Assistant [https://www.razorce.com]

# Auto Mining v1.2
# By REISTLIN
 
# Auto Recall ON/OFF
@setvar! AutoRecall 1
 
// Disparalyze
if paralyzed
    if findtype "pouch" backpack
        yell "[pouch"
    else
        overhead "* 没有 Trapped Pouch *" 38    
    endif
endif
 
// Auto Recall
if AutoRecall = 1
    if insysmsg "Distance to destination" or insysmsg "Now tracking"
        // Cancel Target
        if targetexists
            hotkey "Clear Target Queue"
            hotkey "Cancel Current Target"
        endif
 
        // Interrupt Current Action
        hotkey "> Interrupt"
 
        // Rune Book
        if findtype "runebook" backpack
            overhead "* 开始传送 *" 88
            dclicktype "runebook"
            waitforgump 1551740969
            gumpresponse 2
            stop
        endif
 
        // Outlands Requirement
        if findtype "Recall rune" backpack
            if skill "Magery" >= 40
                // Recall Scroll
                if findtype "Recall" backpack
                    overhead "* 开始传送(卷轴) *" 88
                    dclicktype "Recall"
                    waitfortarget
                    targettype "Recall rune"
                    stop                
                endif
                // Spell Book
                if findtype "Spellbook" backpack and findtype "Black Pearl%s%" backpack and findtype "Blood Moss" backpack and findtype "Mandrake Root%s%" backpack
                    overhead "* 开始传送(魔法) *" 88
                    cast "Recall"
                    waitfortarget
                    targettype "Recall rune"
                    stop
                endif
            else
                overhead "* 魔法技能不够 *" 38
            endif
        else
            overhead "* 没有传送符文 *" 53    
        endif
    endif
endif
 
// Check Tracking Buff
if not findbuff "tracking"
    skill "tracking"
    waitforgump 4267467659 
    gumpresponse 6
    wait 1000
    gumpclose 4267467659
    overhead "* 追踪中 *" 
endif
 
// Check Right Hand
if rhandempty
    if findtype "pickaxe" backpack
        dclicktype "pickaxe" backpack
        wait 500
    else
        overhead "* 没有采矿工具 *" 38 
        break
    endif
endif
 
// Check Over Weight
if weight > maxweight
    overhead "* 已超重 *" 38
else
    dclick "hands"
endif
 
// Report Status
if insysmsg "You dig some"
    overhead "* 采矿中 *" 88
elseif insysmsg "You have worn out your tool"
    overhead "* 采矿工具损坏 *" 38
elseif insysmsg "You do not see any harvestable resources nearby"
    overhead "* 没有采矿资源 *" 53
elseif insysmsg "Harvesting is not allowed in this area"
    overhead "* 禁止采矿区域 *" 53
endif
 
wait 2000
 
loop

bg3.png

一,下载字体:[ Microsoft Yahei Mono.ttf ]

D:\Steam\SteamaAps\common\Baldurs Gate 3\Data\Public\Game\GUI\Assets\Fonts\Microsoft-Yahei-Mono.ttf

二,配置文件:Keyboard.Fonts.xaml(键盘)

D:\Steam\SteamaAps\common\Baldurs Gate 3\Data\Public\Game\GUI\Theme\Keyboard.Fonts.xaml

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:sys="clr-namespace:System;assembly=mscorlib">
    <FontFamily x:Key="DefaultFont">pack://application:,,,/GustavNoesisGUI;component/Assets/Fonts/#Microsoft Yahei Mono</FontFamily>
    <FontFamily x:Key="SpecialFont">pack://application:,,,/GustavNoesisGUI;component/Assets/Fonts/#Microsoft Yahei Mono</FontFamily>
</ResourceDictionary>

三,配置文件:Controller.Fonts.xaml(手柄)

D:\Steam\SteamaAps\common\Baldurs Gate 3\Data\Public\Game\GUI\Theme\Controller.Fonts.xaml

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <FontFamily x:Key="DefaultFont">pack://application:,,,/GustavNoesisGUI;component/Assets/Fonts/#Microsoft Yahei Mono</FontFamily>
    <FontFamily x:Key="SpecialFont">pack://application:,,,/GustavNoesisGUI;component/Assets/Fonts/#Microsoft Yahei Mono</FontFamily>
</ResourceDictionary>

作者: reistlin
来源: http://www.reistlin.com/blog/439
更新时间: 2023.07
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

azerothcore.gif

AzerothCore 主页:https://www.azerothcore.org
AzerothCore Wiki 文档:https://www.azerothcore.org/wiki/home
Eluna Lua Engine 主页:https://github.com/azerothcore/mod-eluna
Eluna Lua Engine API 文档:https://www.azerothcore.org/pages/eluna/index.html

一,安装 MySQL 8.0.33

wget https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb -O /tmp/mysql-apt-config_all.deb

apt-get install gnupg

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AABBCC1122334455

dpkg -i /tmp/mysql-apt-config_all.deb

apt-get update

二,安装编译环境

apt-get install git clang cmake make gcc g++ libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev libboost-all-dev mysql-server p7zip

三,通过 alternatives 设置 clang 版本

update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100

四,通过 git clone 下载 AzerothCore,同时安装 mod-ah-bot 和 mod-eluna

cd /home/reistlin
mkdir AzerothCore
git clone https://github.com/azerothcore/azerothcore-wotlk.git --branch master --single-branch AzerothCore --depth 1
cd AzerothCore/modules
git clone https://github.com/azerothcore/mod-ah-bot.git
git clone https://github.com/azerothcore/mod-eluna.git

五,编译安装

cd /home/reistlin/AzerothCore
mkdir build
cd build

cmake ../ -DCMAKE_INSTALL_PREFIX=/home/reistlin/azerothcore/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_WARNINGS=1 -DTOOLS_BUILD=all -DSCRIPTS=static -DMODULES=static

make -j 8
make install

六,MySQL 设置

mysql -u root -p

DROP USER IF EXISTS ''acore''@''localhost'';
CREATE USER ''acore''@''%'' IDENTIFIED BY ''NEWPASSWORD'';
GRANT ALL PRIVILEGES ON * . * TO ''acore''@''%'';
GRANT ALL PRIVILEGES ON `acore_world` . * TO ''acore''@''%'';
GRANT ALL PRIVILEGES ON `acore_characters` . * TO ''acore''@''%'';
GRANT ALL PRIVILEGES ON `acore_auth` . * TO ''acore''@''%'';
exit

作者: reistlin
来源: http://www.reistlin.com/blog/438
更新时间: 2023.07
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

windows.gif

一,下载 Microsoft.VCLibs.140.00_14.0.26706.0.x86.x64.zip

二,运行 Windows PowerShell

32 位系统:

Add-AppxPackage -Path D:\Microsoft.VCLibs.140.00_14.0.26706.0_x86__8wekyb3d8bbwe.Appx

64 位系统:

Add-AppxPackage -Path D:\Microsoft.VCLibs.140.00_14.0.26706.0_x64__8wekyb3d8bbwe.Appx

三,重新启动

解决 Windows 10 LTSC 启动缺少 VCLib 导致 AppXSVC 服务 CPU 占用高、微软拼音输入法不显示候选词问题。

作者: reistlin
来源: http://www.reistlin.com/blog/436
更新时间: 2023.05
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

linux.gif

一,升级 CentOS 6 openssl 1.0.2u

查看 CentOS 6 openssl 版本,默认为 1.0.1e
也可以用 yum info openssl 查看 CentOS6 默认版本信息

[reistlin@reistlin ~]$ openssl version  
OpenSSL 1.0.1e-fips 11 Feb 2013

wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz --no-check-certificate
tar zxvf openssl-1.0.2u.tar.gz
cd openssl-1.0.2u
./config
make depend
make
make test
make install

默认安装路径:/usr/local/ssl/bin/openssl

安装完成后再次确认版本,升级成功

[reistlin@reistlin ~]$ openssl version
OpenSSL 1.0.2u  20 Dec 2019

二,安装 libressl 2.7.5

wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.7.5.tar.gz --no-check-certificate
tar zxvf libressl-2.7.5.tar.gz
cd libressl-2.7.5
./configure --prefix=/usr/local
make
make install

vim /etc/ld.so.conf
 
/usr/local/lib
/usr/local/lib64

ldconfig -v

三,安装 CentOS 6 Python 3.8.9

wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz
tar zxvf Python-3.8.9.tgz
cd Python-3.8.9

vim Modules/Setup

取消下面 4 行注释,启用 libressl

# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
SSL=/usr/local/ssl
_ssl _ssl.c \
        -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
        -L$(SSL)/lib -lssl -lcrypto

./configure --prefix=/usr/local/python3 --enable-optimizations --with-openssl=/usr/local/ssl/
make
make install

四,解决 CentOS 6 编译安装 Python 3.8.9 openSSL 报错问题:

Could not build the ssl module! Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host(). LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381