0%

ps. 本文实时更新于 个人网站，请移步阅读。

Nextcloud is the open source file sync and share software for everyone from individuals to large enterprises and service providers. Nextcloud provides a safe, secure and compliant file sync and share solution on servers you control.
With Nextcloud you can share one or more folders on your PC, and sync them with your Nextcloud server. Place files in your local shared directories, and those files are immediately synced to the server, and then to other PCs via the desktop client. Not near a desktop client? No problem, simply log in with the web client and manage your files there. The Android and iOS mobile apps allow you to browse, download and upload photos and videos.
Whether using a mobile device, a workstation, or a web client, Nextcloud provides the ability to put the right files in the right hands at the right time on any device in one simple-to-use, secure, private and controlled solution.

安装简介

Nextcloud 虽然这么好用，但是安装依赖却非常复杂，需要安装 LNMP 集成环境(i.e. Linux + Nginx + MySql + PHP)，在搭建过程中或多或少都会出点问题。

安装Docker

Docker 是一个开源的应用容器引擎，让开发者可以打包他们的应用以及依赖包到一个可移植的镜像中，然后发布到任何流行的 Linux 或 Windows 机器上，也可以实现虚拟化。容器是完全使用沙箱机制，相互之间不会有任何接口。

复习知识点

• curl 是一个工具，用于传输来自服务器或者到服务器的数据。
• systemctl 是一个系统管理守护进程、工具和库的集合，用于取代 system V、service 和 chkconfig 命令，初始进程主要负责控制 systemd 系统和服务管理器。
• systemctl start 启动服务
• systemctl enable 激活服务并在开机时启用

安装 Nextcloud 服务器

MariaDB 的目的是完全兼容 MySQL，包括 API 和命令行，使之能轻松成为 MySQL 的代替品。

复习知识点

• docker pull 是从镜像仓库拉取镜像。
• docker run 是创建一个新的容器并运行一个命令。
• --restart=always，设置开机重启

初始设置

• 访问 http://your_ip:3000。
• 创建管理员帐号和密码

mysql数据库默认端口是3306。

• 恭喜你，进入自己的网盘界面。

域名访问

IP 访问会直接把云盘的 IP 和端口暴露出来，感觉不太妥。如果要通过域名访问自己的网盘，就需要反代了。

Nginx是一款轻量级的 Web 服务器/反向代理服务器及电子邮件（IMAP/POP3）代理服务器，在 BSD-like 协议下发行。其特点是占有内存少，并发能力强，

certbot 生成 https 证书

Let's Encrypt是很火的一个免费SSL证书发行项目，自动化发行证书，证书有90天的有效期。适合个人使用或者临时使用，不用再忍受自签发证书不受浏览器信赖的提示。

安装中可能遇到的问题 FQA

• Q: 初始化时，提示“看起来您正在尝试重新安装您的Nextcloud。但您的config文件夹中没有CAN_INSTALL文件。请在您的config文件夹中创建CAN_INSTALL文件以继续。”
• A: 运行如下命令。

• Q: 反向代理后，网址无法直接访问，比如提示403。
• A：请先定位问题，可以在 /var/log/nginx/error.log 查看代理错误。

• Q:关机重启后，原来配置好的网盘无法访问。
• A:在使用docker run启动容器时，已经使用--restart参数来设置容器开机自启。如果发现服务器重启后，无法访问网盘，可以尝试 update 命令设置 --restart=always。

Docker 提供了 restart policy 机制，可以在容器退出或者 Docker 重启时控制容器能够自启动。这种 Restart policy 可以保证相关容器按照正确顺序启动。

• Q: 通过 IP 方式 登录时，没有出现登录界面，显示 "HTTP ERROR 500".
• A: 根据 Nextcloud 12 HTTP Error 500 提供的方法，更新PHP模块可以解决问题。

HTTP 500 错误，全称为 HTTP 500 Internal Server Error，即 HTTP 500 内部服务器错误。HTTP 500 内部服务器错误表示服务器遇到意外情况，导致其无法履行请求，但它无法说明具体错误或发生错误的根本原因。当发生错误时，访问的网站会显示发生错误。

ps. 本文实时更新于个人网站，请移步阅读。

Gif 是当下较为流行的一种交流方式，其文件比视频小，而且比 jpg 图片生动形象，所以不仅在微薄、QQ 等社交中尤为常见，而且适用于产品和功能的展示。同时，Gif 文件大小一般是普通 MP4 格式的数倍。

GIFs are an average of 5-10 times larger than an efficiently encoded MP4 video. This difference in size means that GIFs waste a large amount of bandwidth and also load at a slower rate leading to a bad user experience.

软件需求

• ImageMagick > ImageMagick 是一款用于创建、编辑和合并位图图像的一款开源软件。
• byzanz > byzanz是通过输入命令方式来录制文件小、清晰的GIF动态效果图。

Gif 录制

-d, --duration SECS 动画的时间 (默认：10 秒)
--delay SECS 开始之前的延时(默认：1 秒)
-c, --cursor 录制鼠标光标
-a, --audio 录音
-x, --x 像素 要录制矩形的 X 坐标
-y, --y 像素 要录制矩形的 Y 坐标
-w, --width 像素 录制矩形的宽度
-h, --height 像素 录制矩形的高度
-v, --verbose 详细
--display 要使用的 X 显示

参考文献

Record Screen as Animated GIF in Ubuntu with Byzanz

Gifs vs animated videos - which should you use

[toc]

Socially Aware Motion Planning with Deep Reinforcement Learning

This work notes that while it is challenging to directly specify the details of what to do (precise mechanisms of human navigation), it is straightforward to specify what not to do (violations of social norms). Specifically, using deep reinforcement learning, this work develops a time-efficient navigation policy that respects common social norms.

This work extends the collision avoidance with deep reinforcement learning framework (CADRL) to characterize and induce socially aware behaviors in multiagent systems.

INTRODUCTION

人机交互方法演进

1. 将行人视为具有简单动力学的动态障碍物，执行特定的反应式避障行为。

A common approach treats pedestrians as dynamic obstacles with simple kinematics, and employs specific reactive rules for avoiding collision.

• 缺陷：这种方法没有观察人类的行为，会产生不安全、不自然的行为，尤其当机器人的速度和人类行走速度比较靠近时。

Since these methods do not capture human behaviors, they sometimes generate unsafe/unnatural movements, particularly when the robot operates near human walking speed.

2. 使用更精致的运动模型来推理附近行人的运动意图(hidden intents)，产生一系列预测轨迹。然后，使用传统的路径规划算法为机器人生成无碰撞(collision-free)的路径。

More sophisticated motion models have been proposed, which would reason about the nearby pedestrians’ hidden intents to generate a set of predicted paths. Subsequently, classical path planning algorithms would be employed to generate a collision-free path for the robot.

• 缺陷：导航问题分割为不关联的预测和路径规划，可能导致机器人冻结问题(the freezing robot problem)，机器人无法找到任何可行的行为，因为预测的轨迹让大部分的空间不可通行。

Separating the navigation problem into disjoint prediction and planning steps can lead to the freezing robot problem, in which the robot fails to find any feasible action because the predicted paths could mark a large portion of the space untraversable.

• My comment (MC):虽然作者认为这种做法不合理，但是这是在目前工业界比较流行的做法。导航问题分割为多个层次模块，上下游之间透明，容易迁移和调试。
1. 合作(cooperation)

A key to resolving this problem is to account for cooperation, that is, to model/anticipate the impact of the robot’s motion on the nearby pedestrians.

• 现阶段，基于合作的社交导航研究，主要分为基于模型(model-based)的做法和基于学习(learning-based)的做法。

Existing work on cooperative, socially compliant navigation can be broadly classified into two categories, namely model-based and learning-based.

• 基于模型的做法，是一种典型的多智能体避障(multiagent collision avoidance algorithm)的扩展，通过增加参数来引入对社交交互行为的考虑。

Model-based approaches are typically extensions of multiagent collision avoidance algorithms, with additional parameters introduced to account for social interactions.

模型方法的缺陷：不确定行人是否会遵循预设的几何模型；势力场需要针对不同的行人，调节参数；可能导致规划轨迹震荡(oscillatory)。

• 基于学习的做法，旨在通过匹配特征统计来开发一种策略。

Learning-based approaches aim to develop a policy that emulates human behaviors by matching feature statistics. In particular, Inverse Reinforcement Learning (IRL) has been applied to learn a cost function from human demonstration (teleoperation), and a probability distribution over the set of joint trajectories with nearby pedestrians.

学习方法比模型方法更贴近人类的行为，但是同时需要更高的计算代价(computational cost)。同时，特征统计在人和人之间变化明显(vary significantl)，也引起其在不同场景下的泛化能力的担忧。

In short, existing works are mostly focused on modeling and replicating the detailed mechanisms of social compliance, which remains difficult to quantify due to the stochasticity in people’s behaviors.

Building on a recent paper, we characterize these properties in a reinforcement learning framework, and show that human-like navigation conventions emerge from solving a cooperative collision avoidance problem.

BACKGROUND

Collision Avoidance with Deep Reinforcement Learning

A multiagent collision avoidance problem can be formulated as a sequential decision making problem in a reinforcement learning framework.

• 强化学习问题建模

1. 为了刻画附近行人意图的不确定性(uncertainty)，将状态矢量分为可观察部分(observable)和不可观察部分(unobservable)。其中，可观察部分包括行人的速度，位置和大小；不可观察部分，包括行人的目标位置，偏好速度和方向。

2. 所以，模型的目标是开发一种策略，在避开和附近行人碰撞的基础上，最小化抵达目标的时间。

3. 在此模型基础上，这个问题可以在强化学习框架下表述为和邻近行人的关联配置(joint configuration)。另外，引入奖励函数，奖励那些抵达目标的智能体，惩罚那些发生碰撞的智能体。

In particular, a reward function can be specified to reward the agent for reaching its goal and penalize the agent for colliding with others.

• 状态转移函数模型，因为考虑了其他智能体的隐藏意图(hidden intents)，所以也简介考虑了其他智能体的行为不确定性

The unknown state-transition model takes into account the uncertainty in the other agent’s motion due to its hidden intents.

1. 随后，解决这个RL问题就是找到表达到达目标点的预估时间的最优值函数(the optimal value function)，然后可以由值函数回溯得到最优策略(optimal policy)。

Solving the RL problem amounts to finding the optimal value function that encodes an estimate of the expected time to goal.

A major challenge in finding the optimal value function is that the joint state sjn is a continuous, high-dimensional vector, making it impractical to discretize and enumerate the state space.

MC: 到目前为止，作者是在介绍自己已有的研究，the collision avoidance with deep reinforcement learning framework (CADRL)，接下来会在这个基础上，引入多智能体间具有社交意识的行为。

Characterization of Social Norms

Rather than trying to quantify human behaviors directly, this work notes that the complex normative motion patterns can be a consequence of simple local interactions.

Thus, we conjecture that rather than a set of precisely defined procedural rules, social norms are the emergent behaviors from a time-efficient, reciprocal collision avoidance mechanism.

Reciprocity implicitly encodes a model of the other agents’ behavior, which is the key for enabling cooperation without explicit communication.

Reciprocity implicitly encodes a model of the other agents’ behavior, which is the key for enabling cooperation without explicit communication. While no behavioral rules were imposed in the problem formulation, CADRL policy exhibits certain navigation conventions.

Existing works have reported that human navigation (or teleoperation of a robot) tends to be cooperative and time- efficient. This work notes that these two properties are encoded in the CADRL formulation through using the min-time reward function and the reciprocity assumption.

However, the cooperative behaviors emerging from a CADRL solution are not consistent with human interpretation. The next section will address this issue and present a method to induce behaviors that respect human social norms.

APPROACH

We first describe a strategy for shaping normative behaviors for a two-agent system in the RL framework, and then generalize the method to multiagent scenarios.

Inducing Social Norms

This work notes that social norms are one of the many ways to resolve a symmetrical collision avoidance scenario. To induce a particular norm, a small bias can be introduced in the RL training process in favor of one set of behaviors over others.

The advantage of this approach is that violations of a particular social norm are usually easy to specify; and this specification need not be precise. This is because the addition of a penalty breaks the symmetry in the collision avoidance problem, thereby favoring behaviors respecting the desired social norm.

As long as training converges, the penalty sets’ size does not have a major effect on the learned policy. This is expected because the desired behaviors are not in the penalty set.

Training a Multiagent Value Network

Since training was solely performed on a two-agent system, it was difficult to encode/induce higher order behaviors, such as accounting for the relations between nearby agents. This work addresses this problem by developing a method that allows for training on multiagent scenarios directly.

To capture the multiagent system’s symmetrical structure, a neural network with weight-sharing and max-pooling layers is employed,

CADRL和SA-CADRL的训练区别 - Two experience sets are used to distinguish between trajectories that reached the goals and those that ended in a collision. - During the training process, trajectories generated by SA-CADRL are reflected in the x-axis with probability. * This procedure exploits symmetry in the problem to explore different topologies more efficiently.

An n-agent network can be used to generate trajectories for scenarios with fewer agents.

RESULTS

Computational Details (online performance and offline training)

The size and connections in the multiagent network are tuned to obtain good performance (ensure convergence and produce time-efficient paths) while achieving real-time performance.

Simulation Results

Three copies of four-agent SA-CADRL policies were trained, one without the norm inducing reward, one with the left-handed, and the other with the right-handed.

Hardware Experiment

• The differential-drive vehicle is outfitted with a Lidar for localization, three Intel Realsenses for free space detection, and four webcams for pedestrian detection.

A hardware demonstration video can be found at here.

CONCLUSION

Contribution

• In a reinforcement learning framework, a pair of simulated agents navigate around each other to learn a policy that respect human navigation norms, such as passing on the right and overtaking on the left in a right-handed system.
• This approach is further generalized to multiagent (n > 2) scenarios through the use of a symmetrical neural network structure.
• Moreover, SA-CADRL is implemented on robotic hardware, which enabled fully autonomous navigation at human walking speed in a dynamic environment with many pedestrians.

Future work

• Consider the relationships between nearby pedestrians, such as a group of people who walk together.
• MC:可以迁移到其他具有规则学习的场景，比如水面无人艇中COLREGS规则和人类的行为类似。
• 网络模型训练的效率，文章只是训练4个智能体，如果场景复杂，进一步扩展呢？

[toc]

INTRODUCTION

Sidewalks present a unique yet challenging environment in that the navigable space combines elements of both roads and free indoor spaces. Often sidewalk motion is restricted to two linear directions and the resulting navigable space is limited, like on roads.

However, pedestrians generally do not walk in perfect queues. Instead, people tend to walk in groups of variable sizes and speeds and move along with a general self-organizing crowd flow.

Compared to autonomous road navigation, sidewalk navigation must also account for stochastic human movement that necessitates dynamic obstacle avoidance. Furthermore, certain social rules, such as walking in lanes or affording more space in the direction of walking than in the perpendicular direction, are rules that a robot should follow as well.

In general, methods are based on either reasoning, learning, or a combination thereof.

Here, the aforementioned approaches may be less effective as they do not account for the physical sidewalk boundaries, or how robot movement will affect pedestrian flow.

The key research question this paper considers is how mobile robots can utilize nearby pedestrian behaviours and flows to navigate towards a global goal.

When our navigation stack detects people moving towards the robot’s goal, a ‘group surfing’ behaviour is used. This allows the robot to imitate and participate in pedestrian social behaviours.

In an unpopulated and simple sidewalk environment, the default behaviour is to follow a trajectory offset from the sidewalk curb towards the goal.

SYSTEM

1. 首先利用 Google Maps’ API 去生成高层次的航路点 (waypoint)；
2. 导航模块 (sidewalk navigation module) 根据附近是否有行人流 (nearby pedestrian flow) 来采用 group surfing 或者 sidewalk following 方法。
3. 无论哪种方法，对外输出是子目标点 (subgoals)，这是避障算法的输入，最后输出速度矢量 (velocity command) 指令，控制机器人的运动。
4. 周期轮训，是否抵达当前目标点。

METHODS

Group Surfing

1. Filter Candidate Groups
• 过滤那些远离航路点的行人组。 > Filter out groups moving away from the waypoint.
• 重点解释下，$$$v_{G_{i}}\cdot x_{I}$$$ 的意义。在我看来，这个并没有物理意义，作者只不过想利用向量点乘的正负来判断行人是否在远离航路点。ps. 向量点乘的正负性取决于余弦角，只要两个向量的夹角小于90度(向目标点靠近)，就是正值。 > If this value is non-positive, discard Gi as a subgoal candidate.
1. Smart Group Selection
• 方法核心思路和目标：从筛选后的行人组中，选择平均速度小于且最接近于机器人最大速度的作为最优跟踪组 (the optimal group to follow)。选择该组中距离机器人最近行人的当前位置作为子目标点 (subgoals)。

Once we have filtered out unsuitable groups, the algorithm selects the optimal group to follow.

• 那么，路径规划和避障的问题就是在机器人当前位置和最优跟踪组的最近行人之间，规划出一条无碰撞的路径。

We intentionally select the closest person as a subgoal as attempting to reach the average group position could lead to path planning through pedestrians located between the average group position and the robot’s current position.

Curb Following

We make use of contextual knowledge; sidewalks are normally surrounded by streets and buildings or empty space. Our robot first acquires a surrounding point cloud using a 3D laser sensor and filters out points that are at the same height as or above the plane defined by the robot wheel contacts.

Collision Avoidance

1. Human-Aware Collision Avoidance
• 在 group surfing 和 curb following 中，使用已有的学习方法，Socially-Aware Collision Avoidance with Deep Reinforcement Learning (SA-CADRL) 来作为避障算法。 > Socially-Aware Collision Avoidance with Deep Reinforcement Learning (SA-CADRL), as the collision avoidance component of our navigation stack. The collision avoidance system navigates to a local subgoal generated by either the group surfing or the curb following approach.

• 其中，引入社交奖励函数来鼓励社会行为。 The reinforcement training process induces social awareness through social reward functions, which give higher values to actions that follow social rules.

1. Static Obstacle Avoidance:
• 把静态障碍物作为静态的行人，仍然使用SA-CADRL算法来处理。 > We also use SA-CADRL to avoid these static obstacles by adding “static pedestrians” to the state vector.

SIMULATION DEMONSTRATION AND EXPERIMENTS For

Simulation Experiments and Evaluation

In evaluating our navigation system, our main goal was to show that the system successfully navigates the robot to its final goal through a socially-acceptable path. That is, the path that our robot takes to the goal is similar to what a pedestrian would take to the same goal.

We tracked the path taken by the robot and the path taken by a simulated pedestrian. We also tracked the shortest path that the robot could take within the confines of the sidewalk.

MC：赞一下，比较的有理有据。

HARDWARE DEMONSTRATION

Hardware Setup

We use the PowerBot from Omron Adept Mobile Robots as our differential drive mobile base. The robot is equipped with multiple sensors: a Velodyne VLP-16 3D LiDAR sensor; a SICK LMS-200 2D laser sensor; a RealSense RGB-D sensor, and GPS and IMU sensors. Our PowerBot’s max speed is 0.8m/s. This limits its capacity of following faster pedestrian groups.

Demonstration and Discussion

• 使用SPENCER算法来识别行人和行人流。
• 原打算使用lidar来识别行人的腿部，但是错误率太多，使用SPENCER提供的RGB-D-based的上身识别算法。
• 对机器人局限的探讨，以及算法的不足之处，从工程的角度讨论。

[toc]

Background

Recently, I updated my Ubuntu version from 16.04 to 18.04, and I'd like to share my experience on how to build a work or study environment for yourself.

This blog mainly introduces how to install Sogou pinyin in non-Chinese versions of Ubuntu.

How to install Sogou pinyin

Firstly, you should install fcitx, a lightweight input method framework aimed at providing environment independent language support for Linux.

You can also uninstall ibus, an input-method framework for Unix-like computer operating-systems.

BTW, you can read Understanding & setting up different input methods if you are interested in the difference between fcitx and ibus.

Recall that: > remove - remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed.

purge - purge is identical to remove except that packages are removed and purged (any configuration files are deleted too). This of course, does not apply to packages that hold configuration files inside the user's home folder.

what sudo apt autoremove actually does? Whenever you install an application (using apt-get), the system will also install the software that this application depends on. It is common in Ubuntu/Linux that applications share the same libraries. When you remove the appplication the dependency will stay on your system. So apt-get autoremove will remove those dependencies that were installed with applications and that are no longer used by anything else on the system.

You can subsequently open Language Suppor to double-check that Key board input method system has change from ibus to fcitx, and you can change it manuallyif not. You can ignore it and click the "Remind Me later" button if you are reminded that "The language support is not installed completely".

Importantly, you must reboot your system after that.

After that, you can download the deb package from the official website, 搜狗输入法 for Linux, or here (also official links) directly.

You can install it in Ubuntu Software by double-clicking, shown as below.

Importantly, you must reboot your system again.

You can open fcitx config tool after rebooting, as you can see below. You should also see Sogou Pinyin in the lists. Unfortunately, if not, you can add it by clicking the + mark, choose Sogou Pinyin and reboot the system again.

Now, you should input Chinese characters at the same time. In other words, you can use it as convenient in Windows system, like the Shuangpin input method. Yeah, you can learn more detail about Shuangpin in 双拼学习.

Just enjoy Ubuntu 18.04.

How to install rtags for vim in Ubuntu 18.04 / 如何在Ubuntu 18.04 vim上安装rtags插件

This blog introduces how to install the best cross-reference tool, rtags, that I have ever used in vim, step by step. I hope it helps.

What's rtags

Rtags is a client/server application that indexes C/C++ code and keeps a persistent file-based database of references, declarations, definitions, symbolnames etc. It allows you to find symbols by name (including nested class and namespace scope). Most importantly, it gives you proper follow-symbol and find-references support.

Rtags comes with emacs support but there are projects supporting other IDEs: vim-rtags and sublime-rtags.

In this blog, We would install vim-rtags later.

How to install rtags

First, you need clang, which is a compiler front end for the C, C++, Objective-C and so on. It uses the LLVM compiler infrastructure as its back end and has been part of the LLVM release cycle since LLVM 2.6.

Secondly, make and install rtags as follows.

Thirdly, you should install vim-rtags in Vundle.vim. I think it's the easiest way to install rtags plugin in vim. You need to add the following line to .vimrc if you have installed Vundle, and then run :PluginInstall in vim.

Finally, the last but essential step is that forcing cmake to output compile_commands.json (like DCMAKE_EXPORT_COMPILE_COMMANDS) and link it with rtags according to your project.

[toc]

前言

Website FAQ，实现了使用"卜算子"来统计网站访问人数，但是"卜算子"仅可以提供访问人数的统计，进一步的信息却无法提供。那么，如果想知道过往访客来自哪些国家和地区，显示网站访问实时动态的信息，应该怎么做呢？

clustermaps 是什么

clustrmaps.com 是美国的一家数据网站，能够汇总公共记录来分析美国城市的社会人口和商业环境。

Add the ClustrMaps hit tracker to your site or blog and see a real-time map of your visitors from around the world! Proudly show and grow your hidden community of interest.

配置 clustrmaps

• 选择自己喜欢的插件格式，现在 Hexo 的 Next 两种主题都是支持的，但是自己比较喜欢 Map widget 的主题。

• 点击选择后，拷贝网站出现的脚本 javascript代码，粘贴到Next主题下某个位置。博主测试过如下两个位置，挑选一个配置即可以。推荐位置二，自定义程度高。
• 位置一：将代码插入到 themes\_partials.swig 的最后。

• 位置二：将代码插入到 \_macro.swig 文件的

图层。

• 重新部署网站，就可以在首页看到实时访客来源图，如我的网站首页所示。另外，点击地图，可以看到更详细的信息，包括访客的地图、浏览设备以及 IP。

《莫斯科绅士》讲述的是在沙皇被推翻之后，一个沙皇伯爵回到俄国，被软禁在莫斯科大都会酒店度过一生的故事。作者通过伯爵的回忆，简单描述了沙皇时期贵族的一些生活场景，又以伯爵的视角，通过描绘大都会酒店的变化，侧面反映了俄国的政治、社会变化。

You cannot teach an old dog new tricks.

2019年2月，新的技能选择学习小众的「双拼」输入法

如何学习双拼

小鹤双拼学习

4. 把需要记忆和背诵的键位打印出来，放显示器旁边，然后关掉输入法的双拼同时使用全拼，开心去聊吧； - 生命短暂，时间宝贵，强烈建议直接上手，不要把时间浪费在「双拼」练字上。

友情链接

• 2019年02月19日创建，陆续增添补充链接；
• 2019年02月24日文章基本成型，陆续发表到各平台；

[toc]

Hexo 配置

• Q: 如何修改 hexo d 命令的端口
• A: 如果服务器/VPS的SSH端口不是默认的22，那么需要对本地 _config.yml 文件的 deploy 字段，做如下修改：
• Q: Next主题busuanzi_count访客统计失效
• A: 卜算子官网 提示，"因七牛强制过期『dn-lbstatics.qbox.me』域名，与客服沟通无果，只能更换域名到『busuanzi.ibruce.info』"，所以需要修改卜算子在next主题插件里面的域名。
其中，hexo-theme-next主题中使用了dn-lbstatics.qbox.me域名的文件位置为：hexo\_third-party-counter.swig.

NextCloud 配置

• Q: 浏览器只能上传到 nextcloud 服务器 1M 小容量文件
• A: 上传文件大小限制，主要由 nginx 配置文件中的client_max_body_size的值决定，其默认值为 1M，我们根据需求调整其大小。
1. 修改 nginx 配置文件目录下的 nginx.conf 文件 (一般路径是/etc/nginx/nginx.conf)，增加如下图所示红色内容。

1. 重启 nginx
2. 检查 nginx 配置状态

邮件服务器配置

• Q: 免费邮件服务器配置
• A: Yandex，一家来自俄罗斯的域名邮箱提供商，可以搭建免费的域名邮局，免费账户支持POP、SMTP，还支持API。唯一的缺点是海外商家，官网速度比较慢，科学上网。

更新 letsencrypt 证书

• Q: letsencrypt的https证书期限是3个月，到期后如何重新更新证书呢？
• A: certbot renew
// 上面的指令不成功，换成下面的指令，重新申请证书，不需要改配置
// sudo certbot --force-renew
• Q: 在 Centos 7 上如何更新 letsencrypt ?

• A: /root/certbot-auto renew
// 上面的指令不成功，换成下面的指令，重新申请证书，不需要改配置
// sudo /root/certbot-auto --force-renew

You should test your configuration at: https://www.ssllabs.com/ssltest/analyze.html?d=your.site

• Q: Renew 失败，报错信息如下： > Attempting to renew cert (www.xx.net) from /etc/letsencrypt/renewal/www.xx.net.conf produced an unexpected error: 'ascii' codec can't decode byte 0xe8 in position 57: ordinal not in range(128). Skipping.

All renewal attempts failed.

• A: 解决方法：可能 nginx 配置文件中有中文注释，删掉之后即可 renew 成功。可参考 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 2: ordinal not in range(128)

Hexo 提示 “TypeError[ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string ” 解决办法

• Q：在网站部署过程中，Mac 系统中 “hexo d” 会提示 TypeError[ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string。

• A：这是因为安装的 node 版本过高导致的。Hexo 官网对 node 的版本要求是不低于10.13，推荐12.0 或更高版本。

Node.js (Should be at least Node.js 10.13, recommends 12.0 or higher)

截止在 2021 年 9 月，实践发现 LTS 14.17 版本并不适配最新版的 hexo，所以对 hexo 升级是解决不了这个报错问题。变通的方法是对 node 版本降低，安装 12.0 版本可以解决问题。

在 mac 上如何降级 node 版本，如下。详细可参见 homebrew 安装指定版本node