
系统安装与宿主机共享文件夹要安装vmware-toolssudo apt updatesudo apt install open-vm-tools open-vm-tools-desktop -y进入终端界面执行一下命令vmware-hgfsclient如果看到cpp说明可以挂载执行命令sudo mkdir -p /mnt/hgfs创建共享文件夹专用的挂载目录执行以下命令挂载共享文件夹sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtypevmhgfs-fuse,allow_other至此即可访问主机上的共享文件夹继续执行ls -l /mnt/hgfs就可以看到共享文件夹cpp了。上述设置重启系统时会丢失如果要在开机时自动挂载共享文件夹则需要更改/etc/fstab文件夹在末尾加.host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other,defaults 0 0手机UBS共享网络ip a showip link set ens35u1 updhclient ens35u1ping www.baidu.com安装 Docker法一curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun法二也可以使用国内 daocloud 一键安装命令curl -sSL https://get.daocloud.io/docker | sh设置程序自动启动#!/bin/sh ### BEGIN INIT INFO # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### END INIT INFO cd /home/ubuntu/frp_0.48.0_linux_amd64 nohup ./frpc -c ./frpc.ini 相关参考命令 cd /etc/init.d sudo vim code-server ... sudo systemctl enable code-server sudo systemctl start code-server sudo systemctl daemon-reload sudo systemctl disable code-server安装code-server加默认启动manual script curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_${VERSION}_amd64.deb sudo dpkg -i code-server_${VERSION}_amd64.deb sudo systemctl enable --now code-server$USER eg. curl -fOL https://github.com/coder/code-server/releases/download/v4.11.0/code-server_4.11.0_amd64.deb auto script curl -fsSL https://code-server.dev/install.sh | sh Ubuntu 22.04.3 LTS Installing v4.20.0 of the amd64 deb package from GitHub. mkdir -p ~/.cache/code-server curl -#fL -o ~/.cache/code-server/code-server_4.20.0_amd64.deb.incomplete -C - https://github.com/coder/code-server/releases/download/v4.20.0/code-server_4.20.0_amd64.deb ######################################################################## 100.0% mv ~/.cache/code-server/code-server_4.20.0_amd64.deb.incomplete ~/.cache/code-server/code-server_4.20.0_amd64.deb sudo dpkg -i ~/.cache/code-server/code-server_4.20.0_amd64.deb [sudo] password for ubuntu: Selecting previously unselected package code-server. (Reading database ... 226252 files and directories currently installed.) Preparing to unpack .../code-server_4.20.0_amd64.deb ... Unpacking code-server (4.20.0) ... Setting up code-server (4.20.0) ... deb package has been installed. To have systemd start code-server now and restart on boot: sudo systemctl enable --now code-server$USER Or, if you dont want/need a background service you can run: code-server Deploy code-server for your team with Coder: https://github.com/coder/coderfrp auto startup/lib/systemd/system$ sudo vim frp-server.service [Unit] Descriptioncode-server Afternetwork.target [Service] Typeexec WorkingDirectory/home/ubuntu/frp_0.46.1/ ExecStartnohup ./frpc -c ./frpc.ini Restartalways User%i [Install] WantedBydefault.target sudo systemctl enable --now frp-server$USER/lib/systemd/system$ systemctl status frp-serverubuntu.service ● frp-serverubuntu.service - code-server Loaded: loaded (/lib/systemd/system/frp-server.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2024-01-17 22:24:24 CST; 8h left Main PID: 1406 (frpc) Tasks: 12 (limit: 77167) Memory: 6.1M CPU: 59ms CGroup: /system.slice/system-frp\x2dserver.slice/frp-serverubuntu.service └─1406 ./frpc -c ./frpc.ini 1月 17 22:24:24 ubuntu2204-4389 systemd[1]: Starting code-server... 1月 17 22:24:24 ubuntu2204-4389 systemd[1]: Started code-server. ubuntuubuntu2204-4389:/lib/systemd/system$