error: The following untracked working tree files would be overwritten by checkout: .bashrc .gitignore Please move or remove them before you can switch branches. Aborting
原有使用的 DNS 服务器是 Windonws Server 2008,已经不再提供安全更新了,想着索性升级到最新版,按照新的管理规定优先采用国产的服务器系统, 第一个想到的是OpenEuler,所以就决定采用国产的系统进行替换,刚好借此机会学习一下 Linux 上 DNS 服务的部署和配置方法。当然,这里又犯了爱折腾的毛病。
在 include "/etc/named.rfc1912.zones"; 这一行上面添加如下的内容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
zone "cnty.com" IN { type master; file "forward.cnty.com"; allow-update { none; }; };
zone "168.192.in-addr.arpa" IN { type master; file "reverse.cnty.com"; allow-update { none; }; };
include "/etc/named.rfc1912.zones"; include "/etc/named.root.key";
3.2 /var/nanmed/forward.cnty.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
$TTL 86400 $ORIGIN cnty.com. @ IN SOA nj-dns.cnty.com. root.cnty.com. ( 2011071001 ;Serial 3600 ;Refresh 1800 ;Retry 604800 ;Expire 86400 ;Minimum TTL ) IN NS nj-dns.cnty.com. nj-dns IN A 192.168.7.120 nj-vcsa IN A 192.168.7.44 nj-gitlab IN A 192.168.7.121 nj-nextcloud IN A 192.168.7.45 nj-exsi1 IN A 192.168.6.252 nj-exsi2 IN A 192.168.7.99 oa IN A 192.168.x.x www IN A 115.231.8.xxx
3.3 /var/named/reverse.cnty.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
$TTL 86400 @ IN SOA nj-dns.cnty.com. root.cnty.com. ( 2011071001 ;Serial 3600 ;Refresh 1800 ;Retry 604800 ;Expire 86400 ;Minimum TTL )
@ IN NS nj-dns.cnty.com. @ IN A 192.168.7.120
120.7 IN PTR nj-dns.cnty.com. 44.7 IN PTR nj-vcsa.cnty.com. 121.7 IN PTR nj-gitlab.cnty.com. 45.7 IN PTR nj-nextcloud.cnty.com. 99.7 IN PTR nj-exsi2.cnty.com. 252.6 IN PTR nj-exsi1.cnty.com.
How to configure Hexo and NexT? The traditional approach is to store some options in site config file and other options in theme config file. This approach is applicable, but it is not smooth to update NexT theme from pulling or downloading new releases.
At present, NexT encourages users to use the Alternate Theme Config. It’s a feature of Hexo and the documentation is here: Hexo Configuration.
This tutorial shows you how to configure NexT using Alternate Theme Config. Please choose only one of the following solutions and resume next steps.
_config.[name].yml With this way, all your configurations locate in config file /_config.[name].yml. Replace [name] with the value of theme option in site config file, e.g. next.
Usage Please ensure you are using Hexo 5.0 (or later).
Create a config file in site’s root directory, e.g. _config.next.yml.
Copy needed NexT theme options from theme config file into this config file. If it is the first time to install NexT, then copy the whole theme config file by the following command:
You can ignore permalink and folder information, like languages and dates, when using this tag.
For instance:
1
{% post_link how-to-bake-a-cake %}
This will work as long as the filename of the post is how-to-bake-a-cake.md, even if the post is located at source/posts/2015-02-my-family-holiday and has permalink 2018/en/how-to-bake-a-cake.
You can customize the text to display, instead of displaying the post’s title.
Post’s title and custom text are escaped by default. You can use the escape option to disable escaping.
For instance:
Display title of the post.
1
{% post_link hexo-3-8-released %}
Display custom text.
1
{% post_link hexo-3-8-released 'Link to a post' %}
Escape title.
1
{{% post_link hexo-4-released 'How to use <b> tag in title' %}}
Hexo uses Nunjucks to render posts (Swig was used in older version, which share a similar syntax). Content wrapped with{{ }}or{% %}will get parsed and may cause problems. You can skip the parsing by wrapping it with the raw tag plugin, single backtick `{{ }}`or triple backtick. Alternatively, Nunjucks tags can be disabled through the renderer’s option (if supported), API or front-matter.
Open Task manager, kill explorer.exe (keep the powershell console open) Back on the prompt, type:
1
cd $Env:localappdata\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy
If the previous command succesfully put you on AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy directory inside your profile dir, then run:
1
Remove-Item -Recurse -Force .\TempState\
Start explorer.exe back up from task manager (File -> New Task) The rogue start menu item should be gone.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick Start
Install
1 2 3 4
$ npm install hexo-cli -g $ hexo init blog $ cd blog $ npm install
Create a new post
1 2 3
$ hexo new "My New Post" $ hexo new page about $ hexo new page tags
Once enabled, an asset image will be automatically resolved to its corresponding post’s path. For example, “image.jpg” is located at “/2020/01/02/foo/image.jpg”, meaning it is an asset image of “/2020/01/02/foo/“ post, ![](image.jpg) will be rendered as <img src="/2020/01/02/foo/image.jpg">.