DarkTime
  • README
  • SpringBoot
    • spring boot 运维
    • Spring Boot 部署war包
    • springboot搭建
    • spring boot 读取配置文件
    • 简单总结
    • spring配置文件
    • spring boot Configuration
    • spring boot 配置文件
    • spring boot 配置mybatis
  • MacAwesome
    • markdown使用
    • MAC APP Awesome
    • [markdown使用](/MacAwesome/SUMMARY.md)
    • chrome
    • intellij idea
    • MacAwesome
    • VS Code 的使用
    • MAC Shell命令
  • database
    • druid使用
  • 框架
    • 项目拆析
    • 各种框架和工具
  • docker
    • kubernetes
    • docker
    • docker 常用镜像
  • 效率工具
    • 解决dns污染导致域名解析失败
    • sonarqube 相关配置
    • Iterm2 使用
    • gitbook
    • github awesome github资源推荐
    • playground 在线试用平台汇总
    • linux中的office
    • linux screen 工具
    • 简单Mock服务(moco)
    • npm
    • Visual Studio Code 的使用
    • 配置开发环境
    • homebrew的使用
    • 汇总
  • tomcat
    • tomcat目录规范
  • code_snippets
  • 专题
    • RESTful API
    • serveless服务
    • 搭建私有云主机 折腾记
    • 开发中的各种疑难杂症问题
    • spring 最佳实践
    • LLM 大语言模型
    • notelive
      • 文章框架
      • notelive vue版本开发
      • notelive 开发 札记
    • webrtc技术分析
    • 反向代理
    • spring-cloud
      • spring boot admin 监控服务
      • Spring Cloud 整理汇总
  • python
    • python 学习
    • Python 修饰器的一些小细节
  • 云主机
    • aliyun 主机的种种
  • maven
    • maven使用
    • maven项目增加编译版本号 buildnumber-maven-plugin
    • 仓库
  • java
    • java 开发常用工具类
    • java
    • apache commons pool 对象连接池
  • 大数据
    • kafka
    • gobblin
    • sqoop 简介及使用
    • hbase
    • gobblin
    • sqoop源码解析
    • hadoop map reduce
    • 大数据 学习札记
  • 脚本
    • python
      • 批量请求url 解析json数据
    • js
      • sheetjs-js读取excel
    • shell
      • 自动生成bitbook的summary文件
      • linux/mac 实用脚本
      • 自动创建tomcat项目脚本
      • 批量处理文件内容脚本
  • nginx
    • nginx
    • ngix 文件浏览器 文件服务器
  • linux
    • 群晖nas札记
    • ftp
    • linux 运维
    • 常用命令
    • linux
    • mysqldump脚本
    • 代理
    • 简易灰度部署脚本 不使用jenkins的纯shell方式
    • shell脚本
    • 附加文档
  • mysql
    • sql
  • 游戏开发
    • Unity 2020 学习笔记
  • 学习笔记
    • centos常用环境安装
    • gradle 学习
    • 建站经历
    • python
      • 爬虫教程
    • 如何解决百度爬虫无法爬取搭建在Github上的个人博客的问题? - 知乎
    • baas
      • 在本地部署Parse Server
    • mysql学习标记
    • java code snippets
    • 非Spring Boot Web项目 注册节点到Eureka Server并提供服务
    • kotlin
      • Kotlin 学习札记
    • spring cloud
    • vim配置
    • 前端
      • 开发PWA应用
  • jenkins
    • jenkins配置备份
    • gitlab触发Jenkins 自动构建
    • 安装与使用
  • npm
    • npm 使用
  • git
    • ignore
    • git使用总结
    • git配置多个远程仓库
  • 前端
    • swig
    • 解决跨域请求问题
    • angularjs 学习
    • scriptbot的前端开发经验总结
    • 各种资源
    • 一些有用的js代码
Powered by GitBook
On this page
  • vagrant
  • 安装
  • 基本使用
  • 使用parallels desktop作为虚拟机
  • podman/docker 等虚拟环境
  • ubunt

Was this helpful?

  1. 效率工具

配置开发环境

PreviousVisual Studio Code 的使用Nexthomebrew的使用

Last updated 1 year ago

Was this helpful?

vagrant

vagrant可以快速启动一个虚拟机,在虚拟机环境中创建开发环境,与主机隔离。并且开发环境可以快速打包分享给他人。 而且和intellj brains系列的开发套件兼容很好。

安装

vagrant autocomplete install --bash --zsh

基本使用

amr64 架构的ubuntu镜像:

vagrant init bento/ubuntu-20.04-arm64
vagrant up

这个镜像的作者bento是受官方信任的,并且这个镜像支持parallels作为provider。

使用parallels desktop作为虚拟机

原理 parallese desktop的virtual machine包含一个uuid,vagrant同该uuid将一个vagrant的配置和指定的vm虚拟机建立联系。 打开一个pvm的虚拟机文件(右键显示包内容),其中包含一个config.vps文件,文本打开文件,内容:

<?xml version="1.0" encoding="UTF-8"?>
<ParallelsVirtualMachine schemaVersion="1.0" dyn_lists="VirtualAppliance 0">
   <AppVersion>18.1.1-53328</AppVersion>
   <ValidRc>2147485060</ValidRc>
   <Identification dyn_lists="">
      <VmUuid>{9c27ae79-fbe5-4c84-9cdc-e1459f642b91}</VmUuid>
      <VmType>0</VmType>

其中 <VmUuid> 就是这个虚拟机的uuid。 vagrant的配置文件

$cd .vagrant/machines/default/parallels
$ls -al
action_provision action_set_name  box_meta creator_uid id index_uuid private_key synced_folders vagrant_cwd
$cat id
9c27ae79-fbe5-4c84-9cdc-e1459f642b91
$cat action_set_name
1.5:9c27ae79-fbe5-4c84-9cdc-e1459f642b91

如果想使用一个现存的vm虚拟机作为vagrant的虚拟机,可以通过修改action_provision和id这两个文件的值来实现关联到存在的vm。

podman/docker 等虚拟环境

ubunt

安装c编译环境

apt-get update
apt install make
apt install gcc
apt install build-essential gdb 

arm64配置国内源

参考:https://blog.csdn.net/weixin_45902201/article/details/128821714

# 默认注释了源码仓库,如有需要可自行取消注释
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal main main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse

Install | Vagrant | HashiCorp Developer
Command-Line Interface | Vagrant | HashiCorp Developer
Vagrant Cloud by HashiCorp
GitHub - Parallels/vagrant-parallels: Vagrant Parallels Provider
ubuntu-ports | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror