Skip to content

Commit 1d6d64e

Browse files
committed
update
1 parent c86cefb commit 1d6d64e

File tree

8 files changed

+1264
-1153
lines changed

8 files changed

+1264
-1153
lines changed

docs/Compliance/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
sidebar_position: 0
3+
sidebar_label: 合规与基线
4+
sidebar_class_name: green
5+
---
6+
7+
# Compliance
8+
9+
## 中国大陆 - 网络安全等级保护
10+
11+
搬运自阿里云[^1]的介绍:
12+
13+
> Classified Protection of Cybersecurity (CCSP),亦称作 Multi-Level Protection Scheme (MLPS),是一项旨在保护中国网络和系统的网络安全的监管计划。根据《中国网络安全法》要求,中国的网络运营商必须使用分层的概念来保护网络和系统组件免受干扰、破坏、未经授权的访问,以避免任何资料泄漏,操纵和窃听。在中国,拥有、运营或提供网络及相应系统组件服务的所有公司和个人,必须遵守 MLPS 下的国家标准。MLPS 于 2008 年首次推出,随后于 2019 年更新为 MLPS 2.0。
14+
15+
---
16+
17+
[^1]: [Aliyun - MLPS 2.0 Compliance](https://www.alibabacloud.com/zh/china-gateway/mlps2)
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
toc_max_heading_level: 4
3+
---
4+
5+
# Linux Operations
6+
7+
## 磁盘分区操作
8+
9+
### 查看当前磁盘使用情况
10+
11+
```shell
12+
# 查看磁盘信息
13+
lsblk
14+
15+
# 查看分区信息
16+
sudo fdisk -l
17+
18+
# 查看文件系统使用情况
19+
df -h
20+
```
21+
22+
### 扩展当前系统分区
23+
24+
#### LVM 模式
25+
26+
```shell
27+
# 1. 扩展物理卷
28+
sudo pvresize /dev/sda3 # 替换为你的实际设备名
29+
30+
# 2. 查看卷组信息
31+
sudo vgdisplay
32+
33+
# 3. 扩展逻辑卷(扩展所有可用空间)
34+
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
35+
# 或者指定具体大小,例如增加 50GB
36+
# sudo lvextend -L +50G /dev/ubuntu-vg/ubuntu-lv
37+
38+
# 4. 调整文件系统大小
39+
sudo resize2fs /dev/ubuntu-vg/ubuntu-lv # 对于 ext4
40+
#
41+
sudo xfs_growfs / # 对于 XFS
42+
```
43+
44+
#### 非 LVM 模式(简单分区)
45+
46+
```shell
47+
# 1. 使用 growpart 扩展分区
48+
sudo apt update
49+
sudo apt install cloud-guest-utils -y
50+
sudo growpart /dev/sda 2 # /dev/sda 是磁盘,2 是分区号
51+
52+
# 2. 调整文件系统大小
53+
sudo resize2fs /dev/sda2 # 对于 ext4
54+
#
55+
sudo xfs_growfs / # 对于 XFS
56+
```
57+
58+
#### 手动操作 parted
59+
60+
```shell
61+
# 1. 使用 parted 交互式调整
62+
sudo parted /dev/sda
63+
64+
# 在 parted 提示符下:
65+
(parted) print free # 查看可用空间
66+
(parted) resizepart 2 100% # 将分区 2 扩展到 100%
67+
(parted) quit
68+
69+
# 2. 调整文件系统
70+
sudo resize2fs /dev/sda2 # 对于 ext4
71+
```

docs/DevSecOps/Linux-Security/Linux-File-Systems/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@
5656

5757
## /var
5858

59-
特定于系统的可变数据应在系统启动之间保持永久性。动态变化的文件(如数据库、缓存目录、日志文件、打印机后台处理文档和网站内容)可以在 `/var` 下找到
59+
特定于系统的可变数据应在系统启动之间保持永久性。动态变化的文件(如数据库、缓存目录、日志文件、打印机后台处理文档和网站内容)可以在 `/var` 下找到
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Linux Security
1+
# Linux Security

docusaurus.config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,15 @@ const config = {
8989
},
9090
{
9191
type: 'docSidebar',
92-
sidebarId: 'Forensic_Sidebar',
92+
sidebarId: 'AttackDefense_Sidebar',
93+
position: 'left',
94+
label: '红蓝攻防',
95+
},
96+
{
97+
type: 'docSidebar',
98+
sidebarId: 'Compliance_Sidebar',
9399
position: 'left',
94-
label: '电子取证',
100+
label: '合规与基线',
95101
},
96102
{
97103
type: 'docSidebar',

0 commit comments

Comments
 (0)