Skip to content

Commit fc380c8

Browse files
committed
restructure webpage
1 parent 711e8fc commit fc380c8

File tree

11 files changed

+165
-46
lines changed

11 files changed

+165
-46
lines changed

docs/.vuepress/config.js

Lines changed: 20 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ export default defineUserConfig({
1616
sidebar: {
1717
// 首页侧边栏
1818
'/': [
19-
{
20-
text: '快速开始',
21-
children: [
22-
'README.md',
23-
],
19+
{text: '快速开始',children: ['README.md',],
2420
},
2521
],
2622
// 应用程序页面侧边栏
@@ -30,53 +26,35 @@ export default defineUserConfig({
3026
link: '/apps/README.md',
3127
},
3228
{
33-
text: 'Firefox 浏览器',
34-
link: '/apps/firefox.md',
35-
},
36-
{
37-
text: '搜狗输入法',
38-
link: '/apps/sogou_input.md',
39-
},
40-
{
41-
text: '常用应用速览',
42-
link: '/apps/quick_apps.md',
29+
text: '通用应用',
30+
children: [
31+
{text: 'Firefox 浏览器', link: '/apps/common/firefox.md'},
32+
{text: '搜狗输入法', link: '/apps/common/sogou_input.md'},
33+
{text: '常用应用速览', link: '/apps/common/quick_apps.md'},
34+
{text: 'IDE 开发环境', link: '/apps/common/ide.md'},
35+
{text: '虚拟机管理', link: '/apps/common/virtual_machines.md'},
36+
],
4337
},
4438
{
45-
text: 'IDE 开发环境',
46-
link: '/apps/ide.md',
39+
text: '数据库',
40+
children: [
41+
{text: 'PostgreSQL', link: '/apps/db/psql.md'},
42+
],
4743
},
4844
{
4945
text: 'CUDA 环境配置',
5046
link: '/apps/cuda.md',
51-
},
52-
{
53-
text: '虚拟机管理',
54-
link: '/apps/virtual_machines.md',
55-
},
56-
],
57-
// 系统结构页面侧边栏
58-
'/structure/': [
59-
{
60-
text: '系统结构总览',
61-
link: '/structure/README.md',
62-
},
63-
{
64-
text: '常用目录',
65-
link: '/structure/common_dir.md',
6647
}
6748
],
6849
// 工具页面侧边栏
6950
'/utils/': [
70-
{
71-
text: '工具总览',
72-
link: '/utils/README.md',
73-
},
74-
{
75-
text: '实用链接',
76-
link: '/utils/useful_links.md',
77-
},
78-
{
79-
text: '常用命令',
51+
{text: '工具总览', link: '/utils/README.md'},
52+
{text: '实用链接', link: '/utils/useful_links.md'},
53+
{text: 'structure', children: [
54+
{text: '结构总览', link: '/utils/structure/README.md'},
55+
{text: '常用目录', link: '/utils/structure/common_dir.md'},
56+
]},
57+
{text: '常用命令',
8058
children: [
8159
'/utils/common_cmd/README.md',
8260
'/utils/common_cmd/asterisks_cmd.md',
@@ -105,7 +83,6 @@ export default defineUserConfig({
10583
navbar: [
10684
{ text: '首页', link: '/' },
10785
{ text: '应用程序', link: '/apps/' },
108-
{ text: '系统结构', link: '/structure/' },
10986
{ text: '工具', link: '/utils/' },
11087
],
11188
// 侧边栏深度
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# PostgreSQL Client Authentication Configuration File
2+
# ===================================================
3+
# located in /etc/postgresql/14/main
4+
# Refer to the "Client Authentication" section in the PostgreSQL
5+
# documentation for a complete description of this file. A short
6+
# synopsis follows.
7+
#
8+
# This file controls: which hosts are allowed to connect, how clients
9+
# are authenticated, which PostgreSQL user names they can use, which
10+
# databases they can access. Records take one of these forms:
11+
#
12+
# local DATABASE USER METHOD [OPTIONS]
13+
# host DATABASE USER ADDRESS METHOD [OPTIONS]
14+
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
15+
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
16+
# hostgssenc DATABASE USER ADDRESS METHOD [OPTIONS]
17+
# hostnogssenc DATABASE USER ADDRESS METHOD [OPTIONS]
18+
#
19+
# (The uppercase items must be replaced by actual values.)
20+
#
21+
# The first field is the connection type:
22+
# - "local" is a Unix-domain socket
23+
# - "host" is a TCP/IP socket (encrypted or not)
24+
# - "hostssl" is a TCP/IP socket that is SSL-encrypted
25+
# - "hostnossl" is a TCP/IP socket that is not SSL-encrypted
26+
# - "hostgssenc" is a TCP/IP socket that is GSSAPI-encrypted
27+
# - "hostnogssenc" is a TCP/IP socket that is not GSSAPI-encrypted
28+
#
29+
# DATABASE can be "all", "sameuser", "samerole", "replication", a
30+
# database name, or a comma-separated list thereof. The "all"
31+
# keyword does not match "replication". Access to replication
32+
# must be enabled in a separate record (see example below).
33+
#
34+
# USER can be "all", a user name, a group name prefixed with "+", or a
35+
# comma-separated list thereof. In both the DATABASE and USER fields
36+
# you can also write a file name prefixed with "@" to include names
37+
# from a separate file.
38+
#
39+
# ADDRESS specifies the set of hosts the record matches. It can be a
40+
# host name, or it is made up of an IP address and a CIDR mask that is
41+
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
42+
# specifies the number of significant bits in the mask. A host name
43+
# that starts with a dot (.) matches a suffix of the actual host name.
44+
# Alternatively, you can write an IP address and netmask in separate
45+
# columns to specify the set of hosts. Instead of a CIDR-address, you
46+
# can write "samehost" to match any of the server's own IP addresses,
47+
# or "samenet" to match any address in any subnet that the server is
48+
# directly connected to.
49+
#
50+
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
51+
# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
52+
# Note that "password" sends passwords in clear text; "md5" or
53+
# "scram-sha-256" are preferred since they send encrypted passwords.
54+
#
55+
# OPTIONS are a set of options for the authentication in the format
56+
# NAME=VALUE. The available options depend on the different
57+
# authentication methods -- refer to the "Client Authentication"
58+
# section in the documentation for a list of which options are
59+
# available for which authentication methods.
60+
#
61+
# Database and user names containing spaces, commas, quotes and other
62+
# special characters must be quoted. Quoting one of the keywords
63+
# "all", "sameuser", "samerole" or "replication" makes the name lose
64+
# its special character, and just match a database or username with
65+
# that name.
66+
#
67+
# This file is read on server startup and when the server receives a
68+
# SIGHUP signal. If you edit the file on a running system, you have to
69+
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
70+
# or execute "SELECT pg_reload_conf()".
71+
#
72+
# Put your actual configuration here
73+
# ----------------------------------
74+
#
75+
# If you want to allow non-local connections, you need to add more
76+
# "host" records. In that case you will also need to make PostgreSQL
77+
# listen on a non-local interface via the listen_addresses
78+
# configuration parameter, or via the -i or -h command line switches.
79+
80+
81+
82+
83+
# DO NOT DISABLE!
84+
# If you change this first entry you will need to make sure that the
85+
# database superuser can access the database using some other method.
86+
# Noninteractive access to all databases is required during automatic
87+
# maintenance (custom daily cronjobs, replication, and similar tasks).
88+
#
89+
# Database administrative login by Unix domain socket
90+
local all postgres peer
91+
92+
# TYPE DATABASE USER ADDRESS METHOD
93+
94+
# "local" is for Unix domain socket connections only
95+
local all all peer
96+
local all postgres peer map=user1
97+
# IPv4 local connections:
98+
host all all 127.0.0.1/32 md5
99+
host all all 192.168.13.114/32 scram-sha-256
100+
host all all 192.168.10.244/32 scram-sha-256
101+
host all all 192.168.10.0/24 scram-sha-256
102+
103+
#host all all 127.0.0.1/32 scram-sha-256
104+
# IPv6 local connections:
105+
host all all ::1/128 scram-sha-256
106+
# Allow replication connections from localhost, by a user with the
107+
# replication privilege.
108+
local replication all peer
109+
host replication all 127.0.0.1/32 scram-sha-256
110+
host replication all ::1/128 scram-sha-256
111+
# 允許來自 192.168.13.101 的用戶 postgres 連接到 phone_chatbot 數據庫
112+
host phone_chatbot postgres 192.168.13.101/32 md5
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Virtual Machine
22

3-
# Genymotion
3+
## Genymotion
44

55
Download package from [https://www.genymotion.com/product-desktop/download/](https://www.genymotion.com/product-desktop/download/)
66

@@ -12,7 +12,7 @@ chmod +x genymotion-X.Y.Z-linux_x64.run
1212
./genymotion-X.Y.Z-linux_x64.run -d PATH
1313
```
1414

15-
# Virtualbox
15+
## Virtualbox
1616

1717
Do not use apt install virtualbox, that may install you the older version of virtualbox and may have some problem on running.
1818

@@ -35,4 +35,4 @@ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.14.vbox-
3535
title="Install Virtualbox on Ubuntu"
3636
htmlPath="/assets/virtualbox/How to Install VirtualBox on Ubuntu.html"
3737
originalUrl="https://phoenixnap.com/kb/install-virtualbox-on-ubuntu"
38-
/>
38+
/>

docs/apps/db/psql.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# PostgreSQL
2+
3+
## Installation of PSQL
4+
5+
```bash
6+
sudo apt install postgresql
7+
```
8+
9+
## Change Config Files
10+
11+
The config files are on `/etc/postgresql/<version>/main`,
12+
13+
`pghba.conf`:
14+
15+
<CodeViewer
16+
title="pghba.conf"
17+
filePath="/lib/psql/pghba.conf"
18+
language="conf"
19+
/>
20+
21+
```bash
22+
sudo systemctl restart postgresql
23+
```
24+
25+
## Set Password
26+
27+
```bash
28+
sudo -u postgres psql
29+
\password postgres # type the password
30+
```
File renamed without changes.

0 commit comments

Comments
 (0)