全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 763|回复: 10

【云筏科技CloudRaft】 NAT-EU 1 核 2G 版配置 NFS

[复制链接]
发表于 2020-9-26 21:45:06 | 显示全部楼层 |阅读模式
本帖最后由 zxxx 于 2020-9-26 21:45 编辑

【云筏科技CloudRaft】 NAT-EU 服务器配置

实例规格 1核2G       
SSD系统盘 40G       
弹性数据盘 460G
公网带宽上行 30Mbps       
下行G口共享 不限流量     
防御峰值 10G (免费提供10Gbps)
独立IPv6+含20个IPv4端口(可自助配置)

ScreenShots_1012.png (17.22 KB, 下载次数: 0)

安装全新系统

官方可选择的系统有Centos7.6、Ubuntu16.04、WindowsServer2019

我选择的是 Ubuntu16.04

ScreenShots_1013.png (31.17 KB, 下载次数: 0)

端口管理 公网端口 18709 转发到内网 22

ScreenShots_1014.png (47.72 KB, 下载次数: 0)

通过 SSH 登录 VPS

  1. root@server:~# ssh 1.2.3.4 -p 18709

  2. Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.4.0-142-generic x86_64)

  3. * Documentation:  https://help.ubuntu.com
  4. * Management:     https://landscape.canonical.com
  5. * Support:        https://ubuntu.com/advantage

  6. 201 packages can be updated.
  7. 145 updates are security updates.

  8. Last login: Tue Jul 21 23:16:32 2020
复制代码


查看信息

  1. root@pFGjtC1000180:~# uname -a
  2. Linux pFGjtC1000180 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

  3. root@pFGjtC1000180:~# cat /proc/cpuinfo
  4. processor       : 0
  5. vendor_id       : GenuineIntel
  6. cpu family      : 6
  7. model           : 63
  8. model name      : Intel(R) Xeon(R) CPU E5-1650 v3 [url=home.php?mod=space&uid=175]@[/url] 3.50GHz
  9. stepping        : 2
  10. microcode       : 0xffffffff
  11. cpu MHz         : 3491.856
  12. cache size      : 15360 KB
  13. physical id     : 0
  14. siblings        : 1
  15. core id         : 0
  16. cpu cores       : 1
  17. apicid          : 0
  18. initial apicid  : 0
  19. fpu             : yes
  20. fpu_exception   : yes
  21. cpuid level     : 15
  22. wp              : yes
  23. flags           : fpu vme de ...
  24. bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
  25. bogomips        : 6983.71
  26. clflush size    : 64
  27. cache_alignment : 64
  28. address sizes   : 44 bits physical, 48 bits virtual
  29. power management:

  30. root@pFGjtC1000180:~# free -h
  31.               total        used        free      shared  buff/cache   available
  32. Mem:           1.9G        1.4G        153M        3.0M        354M        338M
  33. Swap:            0B          0B          0B

  34. root@pFGjtC1000180:~# df -h
  35. Filesystem      Size  Used Avail Use% Mounted on
  36. udev            971M     0  971M   0% /dev
  37. tmpfs           199M  3.1M  196M   2% /run
  38. /dev/sda1        40G  2.0G   36G   6% /
  39. tmpfs           992M     0  992M   0% /dev/shm
  40. tmpfs           5.0M     0  5.0M   0% /run/lock
  41. tmpfs           992M     0  992M   0% /sys/fs/cgroup
  42. tmpfs           199M     0  199M   0% /run/user/0
复制代码


默认只有 SSD系统盘 40G, 弹性数据盘 460G 并没有挂载

  1. root@pFGjtC1000180:~# fdisk -l
  2. Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
  3. Units: sectors of 1 * 512 = 512 bytes
  4. Sector size (logical/physical): 512 bytes / 4096 bytes
  5. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  6. Disklabel type: dos
  7. Disk identifier: 0xd8ab9232

  8. Device     Boot Start      End  Sectors Size Id Type
  9. /dev/sda1  *     2048 83884031 83881984  40G 83 Linux


  10. Disk /dev/sdb: 460 GiB, 493921239040 bytes, 964689920 sectors
  11. Units: sectors of 1 * 512 = 512 bytes
  12. Sector size (logical/physical): 512 bytes / 4096 bytes
  13. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  14. Disklabel type: dos
  15. Disk identifier: 0xb3e9939a

  16. Device     Boot Start       End   Sectors  Size Id Type
  17. /dev/sdb1        2048 964689919 964687872  460G 83 Linux
复制代码
 楼主| 发表于 2020-9-26 21:45:07 | 显示全部楼层
本帖最后由 zxxx 于 2020-9-19 23:55 编辑

Ubuntu 系统版本太低,用起来也不太顺手,我个人用Debian比较多,安装 Debian 10 系统吧


  1. apt update && apt install -y xz-utils openssl gawk file wget

  2. cat << "EOF" > /etc/resolv.conf
  3. nameserver 8.8.8.8
  4. nameserver 8.8.4.4
  5. search localhost
  6. EOF

  7. wget https://moeclub.org/attachment/LinuxShell/InstallNET.sh && \
  8. chmod a+x InstallNET.sh && \
  9. bash InstallNET.sh -d 10 -v 64 -a

  10. ... ... ...

  11. ./init
  12. ./proc
  13. ./media
  14. 191444 blocks
  15. Connection to 1.2.3.4 closed by remote host.
  16. Connection to 1.2.3.4 closed.
复制代码


等待大约 15 分钟之后,重新连接到 VPS

IP: 1.2.3.4
Port: 22
用户:root
密码: MoeClub.org

连接之后第一件事是修改密码
  1. root@debian:~# passwd
  2. New password:
  3. Retype new password:
  4. passwd: password updated successfully
复制代码


然后添加公钥 /root/.ssh/authorized_keys
  1. root@debian:~# mkdir -p /root/.ssh && \
  2. cat << "EOF" > /root/.ssh/authorized_keys
  3. ssh-rsa AAAAB3NzaCqjc7PQ1cSsldM2Euw== root@server
  4. EOF
复制代码


接着修改 sshd 配置 /etc/ssh/sshd_config

  1. root@debian:~# cat << EOF > /etc/ssh/sshd_config
  2. AcceptEnv LANG LC_*
  3. AllowTcpForwarding yes
  4. ChallengeResponseAuthentication no
  5. ClientAliveInterval 60
  6. GatewayPorts yes
  7. PasswordAuthentication no
  8. PermitRootLogin yes
  9. Port 22
  10. PrintMotd no
  11. PubkeyAuthentication yes
  12. Subsystem sftp /usr/lib/openssh/sftp-server
  13. TCPKeepAlive yes
  14. UsePAM yes
  15. X11Forwarding yes
  16. EOF
复制代码


重启 SSHD
  1. systemctl restart sshd
复制代码


查看信息

  1. root@debian:~# uname -a
  2. Linux debian 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux

  3. root@debian:~# free -h
  4.               total        used        free      shared  buff/cache   available
  5. Mem:          1.9Gi       117Mi       1.7Gi       5.0Mi        64Mi       1.6Gi
  6. Swap:         2.0Gi          0B       2.0Gi

  7. root@debian:~# df -h
  8. Filesystem      Size  Used Avail Use% Mounted on
  9. udev            940M     0  940M   0% /dev
  10. tmpfs           191M  5.2M  186M   3% /run
  11. /dev/sda1        38G  793M   35G   3% /
  12. tmpfs           954M     0  954M   0% /dev/shm
  13. tmpfs           5.0M     0  5.0M   0% /run/lock
  14. tmpfs           954M     0  954M   0% /sys/fs/cgroup
  15. tmpfs           191M     0  191M   0% /run/user/0
复制代码


内存占用似乎比Ubuntu少一些,自动配置了 2G 的 Swap 分区。

挂载数据磁盘
  1. root@debian:~# fdisk -l
  2. Disk /dev/sdb: 460 GiB, 493921239040 bytes, 964689920 sectors
  3. Disk model: Virtual Disk   
  4. Units: sectors of 1 * 512 = 512 bytes
  5. Sector size (logical/physical): 512 bytes / 4096 bytes
  6. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  7. Disklabel type: dos
  8. Disk identifier: 0xb3e9939a

  9. Device     Boot Start       End   Sectors  Size Id Type
  10. /dev/sdb1        2048 964689919 964687872  460G 83 Linux

  11. root@debian:~# mkdir /data
  12. root@debian:~# mkfs.ext4 /dev/sdb
  13. Filesystem UUID: 05ac747b-5b1e-48b0-850e-350cae955da8

  14. root@debian:~# mount /dev/sdb /data

  15. root@debian:~# df -h
  16. Filesystem      Size  Used Avail Use% Mounted on
  17. /dev/sda1        38G  793M   35G   3% /
  18. /dev/sdb        452G   73M  429G   1% /data
复制代码


系统启动自动挂载数据磁盘

  1. root@debian:~# blkid
  2. /dev/sda1: UUID="9f077f58-53d4-46b3-b3c9-6883bec58368" TYPE="ext4" PARTUUID="086191ba-01"
  3. /dev/sda5: UUID="fa9c77c5-1e7b-4615-b6f2-cdc440948f78" TYPE="swap" PARTUUID="086191ba-05"
  4. /dev/sdb: UUID="05ac747b-5b1e-48b0-850e-350cae955da8" TYPE="ext4"

  5. cat << "EOF" >> /etc/fstab
  6. UUID=05ac747b-5b1e-48b0-850e-350cae955da8 /data ext4 defaults 0 0
  7. EOF
复制代码


速度测试

Timestamp    : 2020-09-19 22:24:06 GMT+8

  1. root@debian:~# apt install wget screen
  2. root@debian:~# screen -S s
  3. root@debian:~# wget -qO- https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash
  4. ----------------------------------------------------------------------
  5. Superbench.sh -- https://www.oldking.net/350.html
  6. Mode  : Standard    Version : 1.1.7
  7. Usage : wget -qO- sb.oldking.net | bash
  8. ----------------------------------------------------------------------
  9. CPU Model            : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
  10. CPU Cores            : 1 Cores 3491.912 MHz x86_64
  11. CPU Cache            : 15360 KB
  12. OS                   : Debian GNU/Linux 10 (64 Bit) Hyper-V
  13. Kernel               : 4.19.0-10-amd64
  14. Total Space          : 1.0 GB / 490.0 GB
  15. Total RAM            : 1481 MB / 1907 MB (270 MB Buff)
  16. Total SWAP           : 2 MB / 2045 MB
  17. Uptime               : 0 days 0 hour 19 min
  18. Load Average         : 0.83, 0.38, 0.19
  19. TCP CC               : cubic
  20. ASN & ISP            : AS24940, Hetzner Online GmbH
  21. Organization         : Hetzner
  22. Location             : Falkenstein, Germany / DE
  23. Region               : Saxony
  24. ----------------------------------------------------------------------
  25. I/O Speed( 1.0GB )   : 87.2 MB/s
  26. I/O Speed( 1.0GB )   : 83.5 MB/s
  27. I/O Speed( 1.0GB )   : 83.7 MB/s
  28. Average I/O Speed    : 84.8 MB/s
  29. ----------------------------------------------------------------------
  30. Node Name        Upload Speed      Download Speed      Latency     
  31. Fast.com         0.00 Mbit/s       109.6 Mbit/s        -           
  32. ----------------------------------------------------------------------
  33. Finished in  : 1 min 7 sec
  34. Timestamp    : 2020-09-19 22:24:06 GMT+8
  35. Results      : ./superbench.log
  36. ----------------------------------------------------------------------
  37. Share result:
  38. · https://paste.ubuntu.com/p/SpNX9K5HRS/
  39. ----------------------------------------------------------------------

  40. root@debian:~# wget -qO- bench.sh | bash
  41. ----------------------------------------------------------------------
  42. CPU Model             : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
  43. CPU Cores             : 1
  44. CPU Frequency         : 3491.912 MHz
  45. CPU Cache             : 15360 KB
  46. Total Disk            : 490.0 GB (1.0 GB Used)
  47. Total Mem             : 1907 MB (1478 MB Used)
  48. Total Swap            : 2045 MB (5 MB Used)
  49. System uptime         : 0 days, 0 hour 23 min
  50. Load average          : 0.10, 0.32, 0.21
  51. OS                    : Debian GNU/Linux 10
  52. Arch                  : x86_64 (64 Bit)
  53. Kernel                : 4.19.0-10-amd64
  54. TCP CC                : cubic
  55. Virtualization        : Hyper-V
  56. Organization          : AS24940 Hetzner Online GmbH
  57. Location              : Frankfurt am Main / DE
  58. Region                : Hesse
  59. ----------------------------------------------------------------------
  60. I/O Speed(1st run)    : 87.6 MB/s
  61. I/O Speed(2nd run)    : 83.4 MB/s
  62. I/O Speed(3rd run)    : 83.3 MB/s
  63. Average I/O speed     : 84.8 MB/s
  64. ----------------------------------------------------------------------
  65. Node Name        Upload Speed      Download Speed      Latency     
  66. Speedtest.net    28.51 Mbps        454.87 Mbps         30.78 ms   
  67. Beijing    CU    20.35 Mbps        317.75 Mbps         273.54 ms   
  68. Shanghai   CU    0.66 Mbps         345.87 Mbps         337.29 ms   
  69. Guangzhou  CT    28.19 Mbps        226.68 Mbps         213.54 ms   
  70. Hongkong   CN    27.00 Mbps        371.01 Mbps         198.58 ms   
  71. Singapore  SG    26.38 Mbps        506.01 Mbps         260.11 ms   
  72. Tokyo      JP    28.70 Mbps        6.02 Mbps           255.40 ms   
  73. ----------------------------------------------------------------------
复制代码




  1. wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench-CN.sh && bash ZBench-CN.sh
  2. --------------------------------------------------------------------------
  3. 节点名称                  IP地址            下载速度            延迟
  4. CacheFly                  205.234.175.175   28.6MB/s            6.371 ms   
  5. Linode, Singapore, SG     2400:8901::4b     11.0MB/s            169.522 ms  
  6. Linode, London, UK        2a01:7e00::4b     27.6MB/s            21.662 ms   
  7. Linode, Frankfurt, DE     2a01:7e01::4b     26.8MB/s            5.952 ms   
  8. Linode, Fremont, CA       2600:3c01::4b     9.42MB/s            147.431 ms  
  9. Softlayer, Dallas, TX     2607:f0d0:1101:4::28.25MB/s            118.702 ms  
  10. Softlayer, Seattle, WA    2607:f0d0:2001:3::25.18MB/s            147.954 ms  
  11. Softlayer, Frankfurt, DE  2a03:8180:1201:45::426.0MB/s            16.801 ms   
  12. Softlayer, Singapore, SG  2401:c900:1101:8::25.63MB/s            178.230 ms  
  13. Softlayer, HongKong, CN   2401:c900:1201:60::24.93MB/s            206.958 ms  
  14. --------------------------------------------------------------------------
  15. 节点名称                  上传速度          下载速度            延迟
  16. --------------------------------------------------------------------------
  17. 合肥        : Fail       北京        : Fail       武汉        : 295.08 ms
  18. 昌吉        : Fail       成都        : Fail       上海        : Fail
  19. 太原        : 264.27 ms  杭州        : 223.57 ms  宁夏        : Fail
  20. 呼和浩特    : 188.34 ms  南昌        : Fail       拉萨        : Fail
  21. 乌鲁木齐    : 278.93 ms  天津        : 163.02 ms  襄阳        : Fail
  22. 郑州        : Fail       沈阳        : Fail       兰州        : Fail
  23. 哈尔滨      : Fail       宁波        : Fail       苏州        : Fail
  24. 济南        : 299.66 ms  西安        : 256.86 ms  西宁        : Fail
  25. 重庆        : Fail       深圳        : Fail       南京        : Fail
  26. 长沙        : Fail       长春        : 285.3 ms   福州        : 293.77 ms
  27. --------------------------------------------------------------------------
复制代码
 楼主| 发表于 2020-9-26 21:45:08 | 显示全部楼层
本帖最后由 zxxx 于 2020-9-20 10:23 编辑

unixbench 跑分 163.1

  1. wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh && \
  2. chmod +x unixbench.sh && \
  3. ./unixbench.sh
  4. ========================================================================
  5.    BYTE UNIX Benchmarks (Version 5.1.3)

  6.    System: debian: GNU/Linux
  7.    OS: GNU/Linux -- 4.19.0-10-amd64 -- #1 SMP Debian 4.19.132-1 (2020-07-24)
  8.    Machine: x86_64 (unknown)
  9.    Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
  10.    CPU 0: Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz (6983.8 bogomips)
  11.           x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
  12.    10:46:55 up 43 min,  1 user,  load average: 1.13, 0.55, 0.36; runlevel 5

  13. ------------------------------------------------------------------------
  14. Benchmark Run: Sat Sep 19 2020 10:46:55 - 11:15:14
  15. 1 CPU in system; running 1 parallel copy of tests

  16. Dhrystone 2 using register variables        6057653.9 lps   (10.0 s, 7 samples)
  17. Double-Precision Whetstone                      950.9 MWIPS (9.7 s, 7 samples)
  18. Execl Throughput                                495.8 lps   (29.9 s, 2 samples)
  19. File Copy 1024 bufsize 2000 maxblocks         90051.0 KBps  (30.0 s, 2 samples)
  20. File Copy 256 bufsize 500 maxblocks           24275.2 KBps  (30.0 s, 2 samples)
  21. File Copy 4096 bufsize 8000 maxblocks        264990.4 KBps  (30.0 s, 2 samples)
  22. Pipe Throughput                              127399.5 lps   (10.0 s, 7 samples)
  23. Pipe-based Context Switching                  37649.3 lps   (10.0 s, 7 samples)
  24. Process Creation                               1272.9 lps   (30.0 s, 2 samples)
  25. Shell Scripts (1 concurrent)                    977.1 lpm   (60.1 s, 2 samples)
  26. Shell Scripts (8 concurrent)                    124.5 lpm   (60.2 s, 2 samples)
  27. System Call Overhead                          72348.3 lps   (10.0 s, 7 samples)

  28. System Benchmarks Index Values               BASELINE       RESULT    INDEX
  29. Dhrystone 2 using register variables         116700.0    6057653.9    519.1
  30. Double-Precision Whetstone                       55.0        950.9    172.9
  31. Execl Throughput                                 43.0        495.8    115.3
  32. File Copy 1024 bufsize 2000 maxblocks          3960.0      90051.0    227.4
  33. File Copy 256 bufsize 500 maxblocks            1655.0      24275.2    146.7
  34. File Copy 4096 bufsize 8000 maxblocks          5800.0     264990.4    456.9
  35. Pipe Throughput                               12440.0     127399.5    102.4
  36. Pipe-based Context Switching                   4000.0      37649.3     94.1
  37. Process Creation                                126.0       1272.9    101.0
  38. Shell Scripts (1 concurrent)                     42.4        977.1    230.4
  39. Shell Scripts (8 concurrent)                      6.0        124.5    207.5
  40. System Call Overhead                          15000.0      72348.3     48.2
  41.                                                                    ========
  42. System Benchmarks Index Score                                         163.1



  43. ======= Script description and score comparison completed! =======
复制代码


YABS Geekbench 5 跑分 114 上行网速限制 30M 下行 1G

  1. root@debian:~# curl -s https://raw.githubusercontent.com/masonr/yet-another-bench-script/master/yabs.sh | bash

  2. 开始 Sat 19 Sep 2020 11:19:29 AM EDT
  3. 结束 Sat 19 Sep 2020 11:51:17 AM EDT


  4. # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
  5. #              Yet-Another-Bench-Script              #
  6. #                     v2020-09-15                    #
  7. # https://github.com/masonr/yet-another-bench-script #
  8. # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #

  9. Sat 19 Sep 2020 11:19:29 AM EDT

  10. Basic System Information:
  11. ---------------------------------
  12. Processor  : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
  13. CPU cores  : 1 @ 3491.912 MHz
  14. AES-NI     : ✔ Enabled
  15. VM-x/AMD-V : ❌ Disabled
  16. RAM        : 1.9Gi
  17. Swap       : 2.0Gi
  18. Disk       : 489G

  19. fio Disk Speed Tests (Mixed R/W 50/50):
  20. ---------------------------------
  21. Block Size | 4k            (IOPS) | 64k           (IOPS)
  22.   ------   | ---            ----  | ----           ----
  23. Read       | 20.61 MB/s    (5.1k) | 41.15 MB/s     (643)
  24. Write      | 20.63 MB/s    (5.1k) | 41.45 MB/s     (647)
  25. Total      | 41.24 MB/s   (10.3k) | 82.61 MB/s    (1.2k)
  26.            |                      |
  27. Block Size | 512k          (IOPS) | 1m            (IOPS)
  28.   ------   | ---            ----  | ----           ----
  29. Read       | 40.34 MB/s      (78) | 39.71 MB/s      (38)
  30. Write      | 42.26 MB/s      (82) | 42.80 MB/s      (41)
  31. Total      | 82.61 MB/s     (160) | 82.51 MB/s      (79)

  32. iperf3 Network Speed Tests (IPv4):
  33. ---------------------------------
  34. Provider                  | Location (Link)           | Send Speed      | Recv Speed
  35.                           |                           |                 |
  36. Bouygues Telecom          | Paris, FR (10G)           | 28.0 Mbits/sec  | 910 Mbits/sec
  37. Online.net                | Paris, FR (10G)           | 28.6 Mbits/sec  | 586 Mbits/sec
  38. WorldStream               | The Netherlands (10G)     | 29.1 Mbits/sec  | 735 Mbits/sec
  39. wilhelm.tel               | Hamburg, DE (10G)         | 29.1 Mbits/sec  | 666 Mbits/sec
  40. Biznet                    | Bogor, Indonesia (1G)     | 27.0 Mbits/sec  | 86.9 Mbits/sec
  41. Hostkey                   | Moscow, RU (1G)           | 28.0 Mbits/sec  | 870 Mbits/sec
  42. Velocity Online           | Tallahassee, FL, US (10G) | 27.4 Mbits/sec  | 290 Mbits/sec
  43. Airstream Comms           | Eau Claire, WI, US (10G)  | 27.6 Mbits/sec  | 270 Mbits/sec
  44. Hurricane Electric        | Fremont, CA, US (10G)     | busy            | busy

  45. iperf3 Network Speed Tests (IPv6):
  46. ---------------------------------
  47. Provider                  | Location (Link)           | Send Speed      | Recv Speed
  48.                           |                           |                 |
  49. Bouygues Telecom          | Paris, FR (10G)           | 28.4 Mbits/sec  | 915 Mbits/sec
  50. Online.net                | Paris, FR (10G)           | 28.6 Mbits/sec  | 656 Mbits/sec
  51. WorldStream               | The Netherlands (10G)     | 29.1 Mbits/sec  | 710 Mbits/sec
  52. wilhelm.tel               | Hamburg, DE (10G)         | 28.2 Mbits/sec  | 610 Mbits/sec  
  53. Airstream Comms           | Eau Claire, WI, US (10G)  | 27.2 Mbits/sec  | 190 Mbits/sec  
  54. Hurricane Electric        | Fremont, CA, US (10G)     | busy            | busy           

  55. Geekbench 5 Benchmark Test:
  56. ---------------------------------
  57. Test            | Value                        
  58.                 |                              
  59. Single Core     | 114                           
  60. Multi Core      | 114                           
  61. Full Test       | https://browser.geekbench.com/v5/cpu/3822211
复制代码
 楼主| 发表于 2020-9-26 21:45:09 | 显示全部楼层
安装 NFS 服务器

  1. root@debian:~# apt update && apt install nfs-kernel-server

  2. root@debian:~# cat << EOF >> /etc/exports
  3. /data  *(rw,no_root_squash,no_subtree_check,sync,fsid=1)
  4. EOF

  5. root@debian:~# exportfs -ra
  6. root@debian:~# systemctl restart nfs-server
复制代码


安装 NFS 客户端

  1. root@debian:~# apt update && apt install nfs-common

  2. root@debian:~# mkdir /mnt/data
  3. root@debian:~# mount -t nfs [ipv6:address]:/data /mnt/data
  4. root@debian:~# cd /mnt/data
  5. root@debian:/mnt/data# touch hello.txt
  6. root@debian:/mnt/data# ls -l
  7. total 16
  8. -rw-r--r-- 1 root root     0 Sep 19 12:30 hello.txt
  9. drwx------ 2 root root 16384 Sep 19 10:12 lost+found

  10. root@debian:/mnt/data# ls /data -l
  11. total 16
  12. -rw-r--r-- 1 root root     0 Sep 19 12:30 hello.txt
  13. drwx------ 2 root root 16384 Sep 19 10:12 lost+found
复制代码


可以通过 IPv6 连接NFS服务器,但是通过 IPv4 无法连接NFS服务器。
 楼主| 发表于 2020-9-26 21:45:10 | 显示全部楼层
注册 ZeroTier 配置网络

进入官网 https://www.zerotier.com/ 选择 Sign Up 注册帐号,并通过EMail中的链接进行验证。

进入 https://my.zerotier.com/network 创建网络

ScreenShots_1016.png (5.12 KB, 下载次数: 0)

  1. Your Networks
  2. All ZeroTier networks have a unique ID like: 9f77fc393ef81859

  3. Devices use a Network's ID to join the network.
复制代码


安装 ZeroTier 加入网络

  1. root@debian:~# apt install curl gnupg gnupg2 && curl -s https://install.zerotier.com | bash
  2. *** Success! You are ZeroTier address [ 71688a6c4c ].
  3. root@debian:~# zerotier-cli join 9f77fc393ef81859
  4. 200 join OK

  5. root@debian:~# ip a
  6. 3: ztuzeqiilh: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2800 qdisc pfifo_fast state UNKNOWN group default qlen 1000
  7.     link/ether 5a:69:90:b4:55:b0 brd ff:ff:ff:ff:ff:ff
  8.     inet6 fe80::5869:90ff:feb4:55b0/64 scope link
  9.        valid_lft forever preferred_lft forever
复制代码


管理网络 https://my.zerotier.com/network/9f77fc393ef81859

勾选 Auth 栏的对号,允许加入网路,出现 ip 地址 - 192.168.193.150

ScreenShots_1018.png (24.28 KB, 下载次数: 0)

再次查看 ip 地址已经被分配 - 192.168.193.150

  1. root@debian:~# ip a
  2. 3: ztuzeqiilh: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2800 qdisc pfifo_fast state UNKNOWN group default qlen 1000
  3.     link/ether 5a:69:90:b4:55:b0 brd ff:ff:ff:ff:ff:ff
  4.     inet 192.168.193.150/24 brd 192.168.193.255 scope global ztuzeqiilh
  5.        valid_lft forever preferred_lft forever
  6.     inet6 fe80::5869:90ff:feb4:55b0/64 scope link
  7.        valid_lft forever preferred_lft forever
复制代码


查看 NFS 服务器导出的文件夹

  1. root@debian:~# showmount -e 192.168.193.150
  2. Export list for 192.168.193.150:
  3. /data *
复制代码


通过 IPv4 连接 NFS 服务器

  1. root@debian:~# umount /mnt/data
  2. root@debian:~# mount -t nfs 192.168.193.150:/data /mnt/data
  3. root@debian:~# ls /mnt/data -l
  4. total 16
  5. -rw-r--r-- 1 root root     0 Sep 19 12:30 hello.txt
  6. drwx------ 2 root root 16384 Sep 19 10:12 lost+found
  7. root@debian:~# ls /data -l
  8. total 16
  9. -rw-r--r-- 1 root root     0 Sep 19 12:30 hello.txt
  10. drwx------ 2 root root 16384 Sep 19 10:12 lost+found
复制代码

 楼主| 发表于 2020-9-26 21:45:11 | 显示全部楼层
在另外一个 VPS 上面测试

  1. root@ubuntu:~# apt install curl gnupg gnupg2 && curl -s https://install.zerotier.com | bash
  2. *** Success! You are ZeroTier address [ 06fa4577ff].
  3. root@debian:~# zerotier-cli join 9f77fc393ef81859
  4. 200 join OK

  5. root@ubuntu:~# ip a
  6. 3:ztuzeqiilh: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2800 qdisc fq state UNKNOWN group default qlen 1000
  7.     link/ether 5a:1e:02:7b:4e:03 brd ff:ff:ff:ff:ff:ff
  8.     inet6 fe80::581e:2ff:fe7b:4e03/64 scope link
  9.        valid_lft forever preferred_lft forever
复制代码


ScreenShots_1019.png (38.14 KB, 下载次数: 0)

IP - 192.168.193.141

  1. root@ubuntu:~# ip a
  2. 3: ztuzeqiilh: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2800 qdisc fq state UNKNOWN group default qlen 1000
  3.     link/ether 5a:1e:02:7b:4e:03 brd ff:ff:ff:ff:ff:ff
  4.     inet 192.168.193.141/24 brd 192.168.193.255 scope global ztuzeqiilh
  5.        valid_lft forever preferred_lft forever
  6.     inet6 fe80::581e:2ff:fe7b:4e03/64 scope link
  7.        valid_lft forever preferred_lft forever

  8. root@ubuntu:~# showmount -e 192.168.193.150
  9. Export list for 192.168.193.150:
  10. /data *

  11. root@ubuntu:~# mkdir /mnt/data
  12. root@ubuntu:~# mount -t nfs 192.168.193.150:/data /mnt/data
  13. root@ubuntu:~# cd /mnt/data
  14. root@ubuntu:/mnt/data# ls -al
  15. total 24
  16. drwxr-xr-x 3 root root  4096 Sep 19 11:30 .
  17. drwxr-xr-x 4 root root  4096 Sep 19 12:09 ..
  18. -rw-r--r-- 1 root root     0 Sep 19 11:30 hello.txt
  19. drwx------ 2 root root 16384 Sep 19 09:12 lost+found
复制代码


连接成功。
发表于 2020-9-26 21:46:43 | 显示全部楼层
这么辛苦的嘛
 楼主| 发表于 2020-9-26 21:47:28 | 显示全部楼层

NFS 用到端口太多了,没办法映射。
发表于 2020-9-26 21:47:40 来自手机 | 显示全部楼层
很厉害的评测,大佬考虑下上个图床?!
发表于 2020-9-26 22:04:47 | 显示全部楼层
测试得很全面了

点评

大佬。你快飞升了!  发表于 2020-9-26 22:24
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-18 12:03 , Processed in 0.077702 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表