Skip to content

Commit c612ddc

Browse files
committed
update
1 parent 01f35d9 commit c612ddc

File tree

5 files changed

+151
-148
lines changed

5 files changed

+151
-148
lines changed

_drafts/setup-environment/2024-06-22-Aloys-Build-Manual.md

Lines changed: 0 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -7,153 +7,6 @@ tags:
77
toc: true
88
---
99

10-
11-
## Ubuntu 16.04安装SQLLite3
12-
13-
```shell
14-
jiangxin@db01:~$ sudo apt-get install sqlite3
15-
jiangxin@db01:~$ sqlite3 test.db
16-
SQLite version 3.11.0 2016-02-15 17:29:24
17-
Enter ".help" for usage hints.
18-
sqlite> create table mytable(id integer primary key, value text);
19-
sqlite> insert into mytable(id, value) values(1, 'Micheal');
20-
sqlite> select * from mytable;
21-
1|Micheal
22-
sqlite> .help
23-
.backup ?DB? FILE Backup DB (default "main") to FILE
24-
.bail on|off Stop after hitting an error. Default OFF
25-
.binary on|off Turn binary output on or off. Default OFF
26-
.changes on|off Show number of rows changed by SQL
27-
.clone NEWDB Clone data into NEWDB from the existing database
28-
.databases List names and files of attached databases
29-
.dbinfo ?DB? Show status information about the database
30-
.dump ?TABLE? ... Dump the database in an SQL text format
31-
If TABLE specified, only dump tables matching
32-
LIKE pattern TABLE.
33-
.echo on|off Turn command echo on or off
34-
.eqp on|off Enable or disable automatic EXPLAIN QUERY PLAN
35-
.exit Exit this program
36-
.explain ?on|off|auto? Turn EXPLAIN output mode on or off or to automatic
37-
.fullschema Show schema and the content of sqlite_stat tables
38-
.headers on|off Turn display of headers on or off
39-
.help Show this message
40-
.import FILE TABLE Import data from FILE into TABLE
41-
.indexes ?TABLE? Show names of all indexes
42-
If TABLE specified, only show indexes for tables
43-
matching LIKE pattern TABLE.
44-
.limit ?LIMIT? ?VAL? Display or change the value of an SQLITE_LIMIT
45-
.load FILE ?ENTRY? Load an extension library
46-
.log FILE|off Turn logging on or off. FILE can be stderr/stdout
47-
.mode MODE ?TABLE? Set output mode where MODE is one of:
48-
ascii Columns/rows delimited by 0x1F and 0x1E
49-
csv Comma-separated values
50-
column Left-aligned columns. (See .width)
51-
html HTML <table> code
52-
insert SQL insert statements for TABLE
53-
line One value per line
54-
list Values delimited by .separator strings
55-
tabs Tab-separated values
56-
tcl TCL list elements
57-
.nullvalue STRING Use STRING in place of NULL values
58-
.once FILENAME Output for the next SQL command only to FILENAME
59-
.open ?FILENAME? Close existing database and reopen FILENAME
60-
.output ?FILENAME? Send output to FILENAME or stdout
61-
.print STRING... Print literal STRING
62-
.prompt MAIN CONTINUE Replace the standard prompts
63-
.quit Exit this program
64-
.read FILENAME Execute SQL in FILENAME
65-
.restore ?DB? FILE Restore content of DB (default "main") from FILE
66-
.save FILE Write in-memory database into FILE
67-
.scanstats on|off Turn sqlite3_stmt_scanstatus() metrics on or off
68-
.schema ?TABLE? Show the CREATE statements
69-
If TABLE specified, only show tables matching
70-
LIKE pattern TABLE.
71-
.separator COL ?ROW? Change the column separator and optionally the row
72-
separator for both the output mode and .import
73-
.shell CMD ARGS... Run CMD ARGS... in a system shell
74-
.show Show the current values for various settings
75-
.stats on|off Turn stats on or off
76-
.system CMD ARGS... Run CMD ARGS... in a system shell
77-
.tables ?TABLE? List names of tables
78-
If TABLE specified, only list tables matching
79-
LIKE pattern TABLE.
80-
.timeout MS Try opening locked tables for MS milliseconds
81-
.timer on|off Turn SQL timer on or off
82-
.trace FILE|off Output each SQL statement as it is run
83-
.vfsinfo ?AUX? Information about the top-level VFS
84-
.vfslist List all available VFSes
85-
.vfsname ?AUX? Print the name of the VFS stack
86-
.width NUM1 NUM2 ... Set column widths for "column" mode
87-
Negative values right-justify
88-
sqlite> .quit
89-
jiangxin@db01:~$\
90-
```
91-
92-
由于Sqlite本身不支持远程访问,如果需要在Windows上连接远程Linux上的Sqlite,需要在Linux上共享文件给Windows。
93-
共享方式见:
94-
Ubuntu创建共享文件夹并支持Windows访问:http://jingyan.baidu.com/article/2fb0ba40a8283500f2ec5f35.html
95-
96-
97-
在Windows上打开资源浏览器,在输入框输入\\192.168.1.150
98-
然后输入用户名、密码即可
99-
100-
![](https://raw.githubusercontent.com/jiangxincode/PicGo/master/aloys_build_manual/image104.png)
101-
102-
103-
![](https://raw.githubusercontent.com/jiangxincode/PicGo/master/aloys_build_manual/image105.png)
104-
105-
将之前创建的test.db移到share/sqlite目录:
106-
107-
jiangxin@db01:~$ mv test.db share/sqlite/
108-
109-
在Windows上用dbeaver连接Linux上的远程数据库
110-
111-
![](https://raw.githubusercontent.com/jiangxincode/PicGo/master/aloys_build_manual/image106.png)
112-
113-
## 安装Prometheus
114-
115-
下载地址:<https://prometheus.io/download/>
116-
117-
```shell
118-
jiangxin@ubuntu11:~$ sudo mkdir /usr/local/prometheus
119-
jiangxin@ubuntu11:~$ sudo chown -R jiangxin:jiangxin /usr/local/prometheus
120-
jiangxin@ubuntu11:~$ cd /usr/local/prometheus/
121-
jiangxin@ubuntu11:/usr/local/prometheus$ ls
122-
prometheus-1.7.1.linux-amd64.tar.gz
123-
jiangxin@ubuntu11:/usr/local/prometheus$ tar -zxvf prometheus-1.7.1.linux-amd64.tar.gz
124-
jiangxin@ubuntu11:/usr/local/prometheus$ cd prometheus-1.7.1.linux-amd64/
125-
```
126-
127-
修改:`/etc/profile`
128-
129-
```shell
130-
export PROMETHEUS_HOME=/usr/local/prometheus/prometheus-1.7.1.linux-amd64
131-
export PATH=$PATH:$PROMETHEUS_HOME
132-
```
133-
134-
```shell
135-
jiangxin@ubuntu11:/usr/local/prometheus/prometheus-1.7.1.linux-amd64$ source /etc/profile
136-
jiangxin@ubuntu11:/usr/local/prometheus/prometheus-1.7.1.linux-amd64$ cd
137-
```
138-
139-
### 启动
140-
141-
jiangxin@ubuntu11:~$ prometheus -config.file=${PROMETHEUS_HOME}/prometheus.yml
142-
143-
```log
144-
INFO[0000] Starting prometheus (version=1.7.1, branch=master, revision=3afb3fffa3a29c3de865e1172fb740442e9d0133) source="main.go:88"
145-
...
146-
```
147-
148-
### 查看界面
149-
http://192.168.1.130:9090/metrics
150-
151-
![](https://raw.githubusercontent.com/jiangxincode/PicGo/master/aloys_build_manual/image189.png)
152-
153-
http://192.168.1.130:9090/graph
154-
155-
![](https://raw.githubusercontent.com/jiangxincode/PicGo/master/aloys_build_manual/image190.png)
156-
15710
## Windows 10系统下搭建Jenkins环境
15811

15912
主要参考:
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## 安装Prometheus
2+
3+
下载地址:<https://prometheus.io/download/>
4+
5+
```shell
6+
jiangxin@ubuntu11:~$ sudo mkdir /usr/local/prometheus
7+
jiangxin@ubuntu11:~$ sudo chown -R jiangxin:jiangxin /usr/local/prometheus
8+
jiangxin@ubuntu11:~$ cd /usr/local/prometheus/
9+
jiangxin@ubuntu11:/usr/local/prometheus$ ls
10+
prometheus-1.7.1.linux-amd64.tar.gz
11+
jiangxin@ubuntu11:/usr/local/prometheus$ tar -zxvf prometheus-1.7.1.linux-amd64.tar.gz
12+
jiangxin@ubuntu11:/usr/local/prometheus$ cd prometheus-1.7.1.linux-amd64/
13+
```
14+
15+
修改:`/etc/profile`
16+
17+
```shell
18+
export PROMETHEUS_HOME=/usr/local/prometheus/prometheus-1.7.1.linux-amd64
19+
export PATH=$PATH:$PROMETHEUS_HOME
20+
```
21+
22+
```shell
23+
jiangxin@ubuntu11:/usr/local/prometheus/prometheus-1.7.1.linux-amd64$ source /etc/profile
24+
jiangxin@ubuntu11:/usr/local/prometheus/prometheus-1.7.1.linux-amd64$ cd
25+
```
26+
27+
### 启动
28+
29+
jiangxin@ubuntu11:~$ prometheus -config.file=${PROMETHEUS_HOME}/prometheus.yml
30+
31+
```log
32+
INFO[0000] Starting prometheus (version=1.7.1, branch=master, revision=3afb3fffa3a29c3de865e1172fb740442e9d0133) source="main.go:88"
33+
...
34+
```
35+
36+
### 查看界面
37+
http://192.168.1.130:9090/metrics
38+
39+
![](https://raw.githubusercontent.com/jiangxincode/PicGo/master/aloys_build_manual/image189.png)
40+
41+
http://192.168.1.130:9090/graph
42+
43+
![](https://raw.githubusercontent.com/jiangxincode/PicGo/master/aloys_build_manual/image190.png)
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
## Ubuntu 16.04安装SQLLite3
2+
3+
```shell
4+
jiangxin@db01:~$ sudo apt-get install sqlite3
5+
jiangxin@db01:~$ sqlite3 test.db
6+
SQLite version 3.11.0 2016-02-15 17:29:24
7+
Enter ".help" for usage hints.
8+
sqlite> create table mytable(id integer primary key, value text);
9+
sqlite> insert into mytable(id, value) values(1, 'Micheal');
10+
sqlite> select * from mytable;
11+
1|Micheal
12+
sqlite> .help
13+
.backup ?DB? FILE Backup DB (default "main") to FILE
14+
.bail on|off Stop after hitting an error. Default OFF
15+
.binary on|off Turn binary output on or off. Default OFF
16+
.changes on|off Show number of rows changed by SQL
17+
.clone NEWDB Clone data into NEWDB from the existing database
18+
.databases List names and files of attached databases
19+
.dbinfo ?DB? Show status information about the database
20+
.dump ?TABLE? ... Dump the database in an SQL text format
21+
If TABLE specified, only dump tables matching
22+
LIKE pattern TABLE.
23+
.echo on|off Turn command echo on or off
24+
.eqp on|off Enable or disable automatic EXPLAIN QUERY PLAN
25+
.exit Exit this program
26+
.explain ?on|off|auto? Turn EXPLAIN output mode on or off or to automatic
27+
.fullschema Show schema and the content of sqlite_stat tables
28+
.headers on|off Turn display of headers on or off
29+
.help Show this message
30+
.import FILE TABLE Import data from FILE into TABLE
31+
.indexes ?TABLE? Show names of all indexes
32+
If TABLE specified, only show indexes for tables
33+
matching LIKE pattern TABLE.
34+
.limit ?LIMIT? ?VAL? Display or change the value of an SQLITE_LIMIT
35+
.load FILE ?ENTRY? Load an extension library
36+
.log FILE|off Turn logging on or off. FILE can be stderr/stdout
37+
.mode MODE ?TABLE? Set output mode where MODE is one of:
38+
ascii Columns/rows delimited by 0x1F and 0x1E
39+
csv Comma-separated values
40+
column Left-aligned columns. (See .width)
41+
html HTML <table> code
42+
insert SQL insert statements for TABLE
43+
line One value per line
44+
list Values delimited by .separator strings
45+
tabs Tab-separated values
46+
tcl TCL list elements
47+
.nullvalue STRING Use STRING in place of NULL values
48+
.once FILENAME Output for the next SQL command only to FILENAME
49+
.open ?FILENAME? Close existing database and reopen FILENAME
50+
.output ?FILENAME? Send output to FILENAME or stdout
51+
.print STRING... Print literal STRING
52+
.prompt MAIN CONTINUE Replace the standard prompts
53+
.quit Exit this program
54+
.read FILENAME Execute SQL in FILENAME
55+
.restore ?DB? FILE Restore content of DB (default "main") from FILE
56+
.save FILE Write in-memory database into FILE
57+
.scanstats on|off Turn sqlite3_stmt_scanstatus() metrics on or off
58+
.schema ?TABLE? Show the CREATE statements
59+
If TABLE specified, only show tables matching
60+
LIKE pattern TABLE.
61+
.separator COL ?ROW? Change the column separator and optionally the row
62+
separator for both the output mode and .import
63+
.shell CMD ARGS... Run CMD ARGS... in a system shell
64+
.show Show the current values for various settings
65+
.stats on|off Turn stats on or off
66+
.system CMD ARGS... Run CMD ARGS... in a system shell
67+
.tables ?TABLE? List names of tables
68+
If TABLE specified, only list tables matching
69+
LIKE pattern TABLE.
70+
.timeout MS Try opening locked tables for MS milliseconds
71+
.timer on|off Turn SQL timer on or off
72+
.trace FILE|off Output each SQL statement as it is run
73+
.vfsinfo ?AUX? Information about the top-level VFS
74+
.vfslist List all available VFSes
75+
.vfsname ?AUX? Print the name of the VFS stack
76+
.width NUM1 NUM2 ... Set column widths for "column" mode
77+
Negative values right-justify
78+
sqlite> .quit
79+
jiangxin@db01:~$\
80+
```
81+
82+
由于Sqlite本身不支持远程访问,如果需要在Windows上连接远程Linux上的Sqlite,需要在Linux上共享文件给Windows。
83+
共享方式见:
84+
Ubuntu创建共享文件夹并支持Windows访问:http://jingyan.baidu.com/article/2fb0ba40a8283500f2ec5f35.html
85+
86+
87+
在Windows上打开资源浏览器,在输入框输入\\192.168.1.150
88+
然后输入用户名、密码即可
89+
90+
![](https://raw.githubusercontent.com/jiangxincode/PicGo/master/aloys_build_manual/image104.png)
91+
92+
93+
![](https://raw.githubusercontent.com/jiangxincode/PicGo/master/aloys_build_manual/image105.png)
94+
95+
将之前创建的test.db移到share/sqlite目录:
96+
97+
jiangxin@db01:~$ mv test.db share/sqlite/
98+
99+
在Windows上用dbeaver连接Linux上的远程数据库
100+
101+
![](https://raw.githubusercontent.com/jiangxincode/PicGo/master/aloys_build_manual/image106.png)

_posts/the-way-of-learning/2015-05-19-OJ学习之路.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ toc: true
1515

1616
* LeetCode Online Judge: <https://leetcode.com/>
1717
* 力拓: <https://leetcode.cn/>
18+
* LeetCode Wiki: <https://leetcode.doocs.org/>
1819
* HackerRanker: <https://www.hackerrank.com/>
1920
* 洛谷: <https://www.luogu.com.cn/>
2021
* Vijos: <https://vijos.org/>

_posts/the-way-of-learning/2025-09-21-虚拟化学习之路.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ toc: true
1717
* QEMU(A generic and open source machine emulator and virtualizer): <https://www.qemu.org/>
1818

1919
* LXC(Linux Containers): <https://linuxcontainers.org/>
20+
* LXC vs. Docker: Which One Should You Use? <https://www.docker.com/blog/lxc-vs-docker/>
2021

2122
* proxmox(open source server virtualization management solution based on QEMU/KVM and LXC): <https://pve.proxmox.com/>
2223

2324
* Hypervisor: <https://en.wikipedia.org/wiki/Hypervisor>
2425

26+
* Xen和KVM等四大虚拟化架构对比分析: <https://support.huawei.com/enterprise/zh/knowledge/EKB1002005920>
27+
* Introduce_to_virtualization: <https://github.com/0voice/Introduce_to_virtualization>
28+
* KVM: <https://github.com/Jessicahust/KVM>
29+
2530
## Oracle
2631

2732
### Oracle VM
@@ -142,7 +147,7 @@ virtualbox中加载已有的虚拟硬盘时出现Cannot register the hard disk
142147

143148
## docker
144149

145-
* <http://www.docker.com/>
150+
* <https://www.docker.com/>
146151
* <https://hub.docker.com/>
147152
* About images, containers, and storage drivers: <https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/>
148153
* Install: <https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository>

0 commit comments

Comments
 (0)