You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

433 lines
20 KiB
Plaintext

Last login: Tue Apr 22 21:18:53 2025 from 192.168.10.11
Last login: Tue Apr 22 17:16:45 2025 from 192.168.10.11
[root@localhost ~]# ls
anaconda-ks.cfg original-ks.cfg
[root@localhost ~]# cd /
[root@localhost /]# ls
backup bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
[root@localhost /]# cat /etc/os-release
NAME="Kylin Linux Advanced Server"
VERSION="V10 (Lance)"
ID="kylin"
VERSION_ID="V10"
PRETTY_NAME="Kylin Linux Advanced Server V10 (Lance)"
ANSI_COLOR="0;31"
[root@localhost /]# uname -a
Linux localhost.localdomain 4.19.90-52.22.v2207.ky10.aarch64 #1 SMP Tue Mar 14 11:52:45 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
[root@localhost /]# free -h
total used free shared buff/cache available
Mem: 29Gi 2.6Gi 25Gi 42Mi 1.0Gi 23Gi
Swap: 15Gi 0B 15Gi
[root@localhost /]# df -h
文件系统 容量 已用 可用 已用% 挂载点
devtmpfs 15G 0 15G 0% /dev
tmpfs 15G 64K 15G 1% /dev/shm
tmpfs 15G 31M 15G 1% /run
tmpfs 15G 0 15G 0% /sys/fs/cgroup
/dev/mapper/klas-root 380G 12G 368G 4% /
tmpfs 15G 64K 15G 1% /tmp
/dev/sda2 1014M 165M 850M 17% /boot
/dev/sda1 599M 6.5M 593M 2% /boot/efi
/dev/sdb1 7.3T 52G 7.3T 1% /media/raid1
tmpfs 3.0G 768K 3.0G 1% /run/user/1000
tmpfs 3.0G 0 3.0G 0% /run/user/0
[root@localhost /]# lscpu
架构: aarch64
CPU 运行模式: 64-bit
字节序: Little Endian
CPU: 64
在线 CPU 列表: 0-63
每个核的线程数: 1
每个座的核数: 64
座: 1
NUMA 节点: 8
厂商 ID Phytium
型号: 2
型号名称: FT-2000+/64
步进: 0x1
BogoMIPS 100.00
L1d 缓存: 2 MiB
L1i 缓存: 2 MiB
L2 缓存: 32 MiB
NUMA 节点0 CPU 0-7
NUMA 节点1 CPU 8-15
NUMA 节点2 CPU 16-23
NUMA 节点3 CPU 24-31
NUMA 节点4 CPU 32-39
NUMA 节点5 CPU 40-47
NUMA 节点6 CPU 48-55
NUMA 节点7 CPU 56-63
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Spec store bypass: Not affected
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
标记: fp asimd evtstrm crc32 cpuid
[root@localhost /]# ^C
[root@localhost ~]# mkdir -p ~/tidb-deploy
[root@localhost ~]# cd ~/tidb-deploy
[root@localhost tidb-deploy]# tar -zxvf /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64.tar.gz.tabby-upload
tidb-community-server-v8.5.1-linux-arm64/
tidb-community-server-v8.5.1-linux-arm64/diag-v1.6.0-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/7.influxdb.json
tidb-community-server-v8.5.1-linux-arm64/387.tidb-dashboard.json
tidb-community-server-v8.5.1-linux-arm64/925.playground.json
tidb-community-server-v8.5.1-linux-arm64/blackbox_exporter-v0.23.0-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/6474.pd.json
tidb-community-server-v8.5.1-linux-arm64/8760.ctl.json
tidb-community-server-v8.5.1-linux-arm64/timestamp.json
tidb-community-server-v8.5.1-linux-arm64/influxdb-v2.5.0-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/tiup-v1.16.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/tiflash-v8.5.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/alertmanager-v0.26.0-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/tiup-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/tidb-v8.5.1-linux-arm64.tar.gz
gzip: stdin: unexpected end of file
tar: 归档文件中异常的 EOF
tar: 归档文件中异常的 EOF
tar: Error is not recoverable: exiting now
[root@localhost tidb-deploy]# ^C
[root@localhost tidb-deploy]# md5sum /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64.tar.gz.tabby-upload
md5sum: /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64.tar.gz.tabby-upload: 没有那个文件或目录
[root@localhost tidb-deploy]# md5sum /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64.tar.gz
f74a3df26fede5680d776d784798ee9a /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64.tar.gz
[root@localhost tidb-deploy]# cd /root/tidb-deploy
[root@localhost tidb-deploy]# tar xzvf tidb-community-server-${version}-linux-amd64.tar.gz && \
> sh tidb-community-server-${version}-linux-amd64/local_install.sh && \
>
>
>
> ^C
[root@localhost tidb-deploy]# [root@localhost tidb-deploy]# tar xzvf tidb-community-server-${version}-linux-amd64.tar.gz && \
> > sh tidb-community-server-${version}-linux-amd64/local_install.sh && \
>
>
> ^C
[root@localhost tidb-deploy]# tar xzvf tidb-community-server-v8.5.1-linux-amd64.tar.gz
tar (child): tidb-community-server-v8.5.1-linux-amd64.tar.gz无法 open: 没有那个文件或目录
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
[root@localhost tidb-deploy]# tar xzvf tidb-community-server-v8.5.1-linux-amd64.tar.gz && \
> > sh tidb-community-server-v8.5.1-linux-amd64/local_install.sh && \
> > source /home/tidb/.bash_profile
tar (child): tidb-community-server-v8.5.1-linux-amd64.tar.gz无法 open: 没有那个文件或目录
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
[root@localhost tidb-deploy]# tar xf tidb-community-toolkit-v8.5.1-linux-amd64.tar.gz
tar: tidb-community-toolkit-v8.5.1-linux-amd64.tar.gz无法 open: 没有那个文件或目录
tar: Error is not recoverable: exiting now
[root@localhost tidb-deploy]# tar xzvf /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/
tidb-community-server-v8.5.1-linux-arm64/diag-v1.6.0-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/7.influxdb.json
tidb-community-server-v8.5.1-linux-arm64/387.tidb-dashboard.json
tidb-community-server-v8.5.1-linux-arm64/925.playground.json
tidb-community-server-v8.5.1-linux-arm64/blackbox_exporter-v0.23.0-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/6474.pd.json
tidb-community-server-v8.5.1-linux-arm64/8760.ctl.json
tidb-community-server-v8.5.1-linux-arm64/timestamp.json
tidb-community-server-v8.5.1-linux-arm64/influxdb-v2.5.0-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/tiup-v1.16.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/tiflash-v8.5.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/alertmanager-v0.26.0-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/tiup-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/tidb-v8.5.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/cluster-v1.16.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/2236.diag.json
tidb-community-server-v8.5.1-linux-arm64/insight-v0.4.2-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/playground-v1.16.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/7.alertmanager.json
tidb-community-server-v8.5.1-linux-arm64/node_exporter-v1.5.0-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/1003.tiup.json
tidb-community-server-v8.5.1-linux-arm64/1003.cluster.json
tidb-community-server-v8.5.1-linux-arm64/grafana-v8.5.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/tikv-v8.5.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/5595.prometheus.json
tidb-community-server-v8.5.1-linux-arm64/9.node_exporter.json
tidb-community-server-v8.5.1-linux-arm64/5542.grafana.json
tidb-community-server-v8.5.1-linux-arm64/snapshot.json
tidb-community-server-v8.5.1-linux-arm64/root.json
tidb-community-server-v8.5.1-linux-arm64/keys/
tidb-community-server-v8.5.1-linux-arm64/keys/dcc60371ff9e7d84-index.json
tidb-community-server-v8.5.1-linux-arm64/keys/c15eaea99981b351-root.json
tidb-community-server-v8.5.1-linux-arm64/keys/0fd8aafae75f0a2b-snapshot.json
tidb-community-server-v8.5.1-linux-arm64/keys/879d996bd9f27ec6-pingcap.json
tidb-community-server-v8.5.1-linux-arm64/keys/44c82672eb98a1d9-root.json
tidb-community-server-v8.5.1-linux-arm64/keys/14e2a603e0a16fc6-timestamp.json
tidb-community-server-v8.5.1-linux-arm64/keys/c67d7c794870f14a-root.json
tidb-community-server-v8.5.1-linux-arm64/pd-v8.5.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/9.blackbox_exporter.json
tidb-community-server-v8.5.1-linux-arm64/tiproxy-v1.3.0-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/18.insight.json
tidb-community-server-v8.5.1-linux-arm64/ctl-v8.5.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/565.tiproxy.json
tidb-community-server-v8.5.1-linux-arm64/local_install.sh
tidb-community-server-v8.5.1-linux-arm64/6195.tikv.json
tidb-community-server-v8.5.1-linux-arm64/5991.tiflash.json
tidb-community-server-v8.5.1-linux-arm64/tidb-dashboard-v8.5.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/1.root.json
tidb-community-server-v8.5.1-linux-arm64/10035.tidb.json
tidb-community-server-v8.5.1-linux-arm64/prometheus-v8.5.1-linux-arm64.tar.gz
tidb-community-server-v8.5.1-linux-arm64/1.index.json
[root@localhost tidb-deploy]# sh /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64/local_install.sh
Disable telemetry success
Successfully set mirror to /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64
Detected shell: bash
Shell profile: /root/.bash_profile
/root/.bash_profile has been modified to to add tiup to PATH
open a new terminal or source /root/.bash_profile to use it
Installed path: /root/.tiup/bin/tiup
===============================================
1. source /root/.bash_profile
2. Have a try: tiup playground
===============================================
[root@localhost tidb-deploy]# source /home/tidb/.bash_profile
-bash: /home/tidb/.bash_profile: 没有那个文件或目录
[root@localhost tidb-deploy]# cd
[root@localhost ~]# cd
[root@localhost ~]# cd
[root@localhost ~]# source /home/tidb/.bash_profile
-bash: /home/tidb/.bash_profile: 没有那个文件或目录
[root@localhost ~]# sh /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64/local_install.sh
Disable telemetry success
Successfully set mirror to /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64
Detected shell: bash
Shell profile: /root/.bash_profile
/root/.bash_profile has been modified to to add tiup to PATH
open a new terminal or source /root/.bash_profile to use it
Installed path: /root/.tiup/bin/tiup
===============================================
1. source /root/.bash_profile
2. Have a try: tiup playground
===============================================
[root@localhost ~]# sh /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64/local_install.sh
Disable telemetry success
Successfully set mirror to /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64
Detected shell: bash
Shell profile: /root/.bash_profile
/root/.bash_profile has been modified to to add tiup to PATH
open a new terminal or source /root/.bash_profile to use it
Installed path: /root/.tiup/bin/tiup
===============================================
1. source /root/.bash_profile
2. Have a try: tiup playground
===============================================
[root@localhost ~]#
[root@localhost ~]# source /root/.bash_profile
[root@localhost ~]# tar xf /tidb-community-toolkit-v8.5.1-linux-amd64.tar.gz
[root@localhost ~]# ls -ld /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64 /root/tidb-community-toolkit-v8.5.1-linux-amd64
drwxr-xr-x 3 root root 4096 1月 17 16:02 /root/tidb-community-toolkit-v8.5.1-linux-amd64
drwxr-xr-x 3 root root 4096 1月 17 16:00 /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64
[root@localhost ~]# cd /root/tidb-deploy/tidb-community-server-v8.5.1-linux-arm64
[root@localhost tidb-community-server-v8.5.1-linux-arm64]# cp -rp keys ~/.tiup/
[root@localhost tidb-community-server-v8.5.1-linux-arm64]# tiup mirror merge ../tidb-community-toolkit-${version}-linux-amd64
Error: stat ../tidb-community-toolkit--linux-amd64: no such file or directory
[root@localhost tidb-community-server-v8.5.1-linux-arm64]#
[root@localhost tidb-community-server-v8.5.1-linux-arm64]# tiup mirror merge /root/tidb-community-toolkit-v8.5.1-linux-amd64
[root@localhost tidb-community-server-v8.5.1-linux-arm64]# tiup cluster template > topology.yaml
A new version of cluster is available: -> v1.16.1
To update this component: tiup update cluster
To update all components: tiup update --all
The component `cluster` version is not installed; downloading from repository.
[root@localhost tidb-community-server-v8.5.1-linux-arm64]# tiup cluster template > topology.yaml
[root@localhost tidb-community-server-v8.5.1-linux-arm64]# tiup cluster list
Name User Version Path PrivateKey
---- ---- ------- ---- ----------
[root@localhost tidb-community-server-v8.5.1-linux-arm64]# tiup cluster display tidb-test
Error: Cluster tidb-test not found
Verbose debug logs has been written to /root/.tiup/logs/tiup-cluster-debug-2025-04-22-22-29-17.log.
[root@localhost tidb-community-server-v8.5.1-linux-arm64]#
[root@localhost ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): zang010303
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in zang010303
Your public key has been saved in zang010303.pub
The key fingerprint is:
SHA256:niYxVopzm9Mt9SWaqoZnipyo3xHhjkaPDo+6CQq2Esw root@localhost.localdomain
The key's randomart image is:
+---[RSA 3072]----+
| |
| |
| . . |
| . o o |
|o . = * S . . . |
|.E = = B + + o |
|+o+ +.= * + . |
|*X.+..++ o |
|%+B o=... |
+----[SHA256]-----+
[root@localhost ~]# ssh-copy-id root@localhost
/usr/bin/ssh-copy-id: ERROR: No identities found
[root@localhost ~]#
[root@localhost ~]# rm zang010303 zang010303.pub
rm是否删除普通文件 'zang010303'y
rm是否删除普通文件 'zang010303.pub'y
[root@localhost ~]#
[root@localhost ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa
Your public key has been saved in /root/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:yk3sqXsspUNG9xcTX91JRdIy22h3ipk92ykp4F52F98 root@localhost.localdomain
The key's randomart image is:
+---[RSA 3072]----+
| o+B|
| . oo=|
| o B |
| ... o = +|
| . .S. O +.|
| .o=.o. = + +|
| oo+= .+ ..=E|
| +.o.o..oo..|
| o=.. . . |
+----[SHA256]-----+
[root@localhost ~]# ssh-copy-id root@localhost
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is SHA256:kWUu1O+Rl9nPUDs594h2gNsfUBLfb0WusbxxZZtTNnU.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
[root@localhost ~]# ssh-copy-id root@localhost
\/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Authorized users only. All activities may be monitored and reported.
root@localhost's password:
Permission denied, please try again.
root@localhost's password:
Permission denied, please try again.
root@localhost's password:
root@localhost: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
[root@localhost ~]# ssh-copy-id root@localhost
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Authorized users only. All activities may be monitored and reported.
root@localhost's password:
Permission denied, please try again.
root@localhost's password:
Permission denied, please try again.
root@localhost's password:
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Authorized users only. All activities may be monitored and reported.
root@localhost's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'root@localhost'"
and check to make sure that only the key(s) you wanted were added.
[root@localhost ~]# source /root/.bash_profile
[root@localhost ~]# tiup playground
A new version of playground is available: -> v1.16.1
To update this component: tiup update playground
To update all components: tiup update --all
The component `playground` version is not installed; downloading from repository.
Note: Version constraint is resolved to v8.5.1. If you'd like to use other versions:
Use exact version: tiup playground v7.1.0
Use version range: tiup playground ^5
Use nightly: tiup playground nightly
The component `pd` version v8.5.1 is not installed; downloading from repository.
Start pd instance: v8.5.1
The component `tikv` version v8.5.1 is not installed; downloading from repository.
Start tikv instance: v8.5.1
The component `tidb` version v8.5.1 is not installed; downloading from repository.
Start tidb instance: v8.5.1
Waiting for tidb instances ready
127.0.0.1:4000 ... Done
The component `prometheus` version v8.5.1 is not installed; downloading from repository.
The component `tiflash` version v8.5.1 is not installed; downloading from repository.
Start tiflash instance: v8.5.1
Waiting for tiflash instances ready
127.0.0.1:3930 ... Done
🎉 TiDB Playground Cluster is started, enjoy!
Connect TiDB: mysql --comments --host 127.0.0.1 --port 4000 -u root
TiDB Dashboard: http://127.0.0.1:2379/dashboard
Grafana: http://127.0.0.1:3000
[root@localhost ~]# mysql --host 127.0.0.1 --port 4000 -u rootmysql --host 127.0.0.1 --port 4000 -u root
ERROR 2002 (HY000): Can't connect to MySQL server on '127.0.0.1' (115)
[root@localhost ~]# ^C
[root@localhost ~]# ps -ef | grep tidb
root 4012 3574 0 15:18 pts/0 00:00:00 grep tidb
[root@localhost ~]# ^C
[root@localhost ~]# tiup playground
Note: Version constraint is resolved to v8.5.1. If you'd like to use other versions:
Use exact version: tiup playground v7.1.0
Use version range: tiup playground ^5
Use nightly: tiup playground nightly
Start pd instance: v8.5.1
Start tikv instance: v8.5.1
Start tidb instance: v8.5.1
Waiting for tidb instances ready
127.0.0.1:4000 ... Done
Start tiflash instance: v8.5.1
Waiting for tiflash instances ready
127.0.0.1:3930 ... Done
🎉 TiDB Playground Cluster is started, enjoy!
Connect TiDB: mysql --comments --host 127.0.0.1 --port 4000 -u root
TiDB Dashboard: http://127.0.0.1:2379/dashboard
Grafana: http://127.0.0.1:3000
^CGot signal interrupt (Component: playground ; PID: 4049)
Playground receive signal: interrupt
Wait tiflash(4609) to quit...
Wait grafana(4603) to quit...
Wait prometheus(4522) to quit...
Wait ng-monitoring(4523) to quit...
Grafana quit
prometheus quit
ng-monitoring quit
tiflash quit
Wait tidb(4063) to quit...
tidb quit
Wait tikv(4062) to quit...
tikv quit
Wait pd(4061) to quit...
pd quit