当前位置: 首页 > news >正文

vm 安装ubuntu server 18.04 周边配置

系统安装

与宿主机共享文件夹

要安装vmware-tools
sudo apt update
sudo 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 subtype=vmhgfs-fuse,allow_other
至此即可访问主机上的共享文件夹,继续执行:
ls -l /mnt/hgfs
就可以看到共享文件夹cpp了。
上述设置重启系统时会丢失,如果要在开机时自动挂载共享文件夹,则需要更改/etc/fstab文件夹,在末尾加:
.host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other,defaults 0 0

手机UBS共享网络

ip a show
ip link set ens35u1 up
dhclient ens35u1
ping 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 don't want/need a background service you can run: code-server Deploy code-server for your team with Coder: https://github.com/coder/coder

frp auto startup

/lib/systemd/system$ sudo vim frp-server@.service [Unit] Description=code-server After=network.target [Service] Type=exec WorkingDirectory=/home/ubuntu/frp_0.46.1/ ExecStart=nohup ./frpc -c ./frpc.ini Restart=always User=%i [Install] WantedBy=default.target sudo systemctl enable --now frp-server@$USER
/lib/systemd/system$ systemctl status frp-server@ubuntu.service ● frp-server@ubuntu.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-server@ubuntu.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. ubuntu@ubuntu2204-4389:/lib/systemd/system$
http://www.jsqmd.com/news/1349176/

相关文章:

  • FGO-py:解放双手的Fate/Grand Order全自动刷本神器
  • Windows-Auto-Night-Mode安全审计:保护用户设置与系统资源
  • 三元组存储引擎设计揭秘
  • 如何实现微信QQ防撤回:终极逆向工程指南
  • 3分钟解锁免费OpenAI API密钥:零门槛开启AI开发实战指南
  • 2026年三季度南充广告设计制作安装|华蔓广告|水晶字,穿孔字,烤漆字等标识制作综合服务公司 - 四川华蔓广告有限公司
  • 2026年三季度南充广告设计制作安装|华蔓广告|雪弗板,PVC板雕刻,KT板等标识制作综合服务公司 - 四川华蔓广告有限公司
  • 成都旧房翻新避坑指南!2026靠谱旧改装企多家整理推荐 - 推荐官
  • 30天小白学透大模型:从入门到实战,附收藏版自学路径
  • 2026小程序系统多维度技术与落地能力深度解析
  • 2026 年讷河靠谱的铜锅涮肉切片机源头厂家联系电话,店里天天排队的铜锅涮肉,原来用这玩意儿省了一半人力成本? - 行业推荐官[官方】--
  • 从理论到实践:TencentDB Agent Memory符号化记忆技术原理与应用
  • QEMU进阶:从虚拟机到动态模块测试沙盒的实战指南
  • 2026年C型铝箔复合内膜袋生产厂家与品牌机构实力解析 - 卓企推荐
  • Windows-Auto-Night-Mode错误处理机制:确保系统稳定性的策略
  • C++中constexpr的用法
  • 连云港通沃包装有限公司-C型抗老化吨包内胆:实力厂家,长效防护新** - 优企名品
  • RDPWrap.ini:Windows远程桌面多用户连接终极解决方案
  • 2026实力之选:抗老化防紫外线腻子粉阀口袋实力公司解析 - 优企名品
  • 在线拼图长图工具盘点:这六款让多图拼接不再抓狂 - 耶斯去水印
  • 成都旧房翻新公司哪家好?2026靠谱旧房改造公司调研推荐 - 推荐官
  • 2026 出口企业产品碳足迹核算选哪家?5 家头部机构盘点 - 互联网科技品牌测评
  • 如何用NixThePlanet快速部署macOS Ventura?从安装到SSH访问的完整指南
  • Obsidian CSS美化终极指南:19个技巧打造个性化知识管理界面
  • 三步极速下载:国家中小学智慧教育平台电子课本PDF免费获取指南
  • [随笔260807] Sunflower, Sperner, LYM, Kruskal-Katona
  • OpenHFT开发者必知:年度发布周期与API演进策略全解析
  • Win11系统下Maven安装配置与优化全攻略
  • ImageNet对抗鲁棒性终极指南:用特征去噪打造坚不可摧的AI模型
  • 五款excel转pdf在线转换工具与两种本地方法实测盘点,无水印安全选哪家 - 软件小管家