markdown[vagrant]fedora#linux上的vagrant和virtualbox安装(代码片段)

author author     2022-12-15     132

关键词:

# Vagrant and Virtualbox Installation on Fedora
This article explains how to install Vagrant and Virtualbox on Fedora 23/24 so you can build your development environments.
Vagrant and Virtualbox provide an easy way to create, configure and distribute development environments.

This play is also working on the brand new Fedora 26 with just a glitch about few missing headers files, see my note at the end.

VirtualBox Installation
Add VirtualBox repository and update your system:

```
$ sudo su -
# cd /etc/yum.repos.d/
# wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
# dnf update
```
Ensure that you are running latest installed kernel version, you can check it by comparing the output of following commands, version numbers should match:

```
# rpm -qa kernel |sort -V |tail -n 1
# uname -r
```
If you got a kernel update then reboot your system.

Install VirtualBox dependencies:

```
# dnf install binutils gcc make patch libgomp glibc-headers \
  glibc-devel kernel-headers kernel-devel dkms
```
`# dnf install VirtualBox`
Last command will build needed kernel modules, in case you need in the future to rebuild them, you can use the following command:
```# /usr/lib/virtualbox/vboxdrv.sh setup
```
In order to use VirtualBox, a user must be member of vboxusers group which was created automatically during Virtualbox installation. Add your username to vboxusers group

`# usermod -a -G vboxusers username`

## Vagrant Installation
Run the following commands to install Vagrant:

`$ sudo dnf install vagrant` 

Note that Fedora use libvirt as default provider, so to use Virtualbox instead you need to set an environment variable for it. Run the following commands:
```
$ echo "export VAGRANT_DEFAULT_PROVIDER=virtualbox" >> ~/.bashrc
If you prefer to use Vagrant with KVM, make sure to install libvirt packages for it.
```
`$ sudo dnf install -y vagrant vagrant-libvirt libvirt-devel`
Finally, install some useful vagrant plugins, but before we need to install .

```
$ vagrant plugin install vagrant-cachier
$ vagrant plugin install vagrant-hostmanager
```

While installing vagrant-cachier on a brand new Fedora 24 I had some errors about missing headers, to fix it you need to install the following packages:

`$ sudo dnf install ruby-devel redhat-rpm-config zlib-devel`
You can find more info about Gems installation in the Fedora Developer site.

Launch a Vagrant box
Now you can launch a vagrant box, for example try the official CentOS 7.

```
$ vagrant init centos/7
$ vagrant up --provider virtualbox
```
if you use libvirt provider:

`$ vagrant up --provider libvirt`


## What to do after a kernel update 

## launch the following command
> /usr/lib/virtualbox/vboxdrv.sh setup

## Add a second user
```
Vagrant.configure("2") do |config|
  if VAGRANT_COMMAND == "ssh"
      config.ssh.username = 'other_username'
  end
```

markdown使用vagrant限制virtualbox资源(代码片段)

查看详情

markdown使用phpstorm,vagrant配置xdebug(代码片段)

查看详情

markdown如何检测sq​​l数据库更改(代码片段)

查看详情

使用 Vagrant 访问日志文件夹

】使用Vagrant访问日志文件夹【英文标题】:AccesstologfolderwithVagrant【发布时间】:2014-10-1009:56:20【问题描述】:我有一个vagrant文件,它用apache安装了一个盒子。我想使用同步文件夹机制(而不是vagrantssh!)直接在我的主机中访... 查看详情

当主机更改源时,grunt karma 对 vagrant 进行测试 grunt/karma 未检测到它

】当主机更改源时,gruntkarma对vagrant进行测试grunt/karma未检测到它【英文标题】:gruntkarmatestingonvagrantwhenhostchangessourcesgrunt/karmadoesn\'tdetectit【发布时间】:2014-07-0710:04:30【问题描述】:这花了我很长时间才找到,但似乎无法找到... 查看详情

markdown[ログイン画面阅覧]#laravel#l54#unittest(代码片段)

查看详情

mac下安装vagrant虚拟环境(代码片段)

为了方便测试,我在mac电脑中安装了两个vagrant虚拟环境。一个是centos7,里面是oneinstack,ip:192.168.33.10一个是用于Laravel开发的Homestead。ip:192.168.10.10另外又安装了一个windows10。Vagrant简介Vagrant是一个基于Ruby的工具,用于创建和部署虚... 查看详情

在 Fedora 屏幕锁定上运行脚本

】在Fedora屏幕锁定上运行脚本【英文标题】:RunscriptonFedorascreenlock【发布时间】:2012-01-2013:06:51【问题描述】:我正在寻找一种在Fedora15(linux)中锁定屏幕时运行程序的方法。基本上我想在屏幕锁定时开始运行运动检测程序,或者... 查看详情

markdown(代码片段)

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文... 查看详情

[部署开发环境][1vagrant]vagrant部署开发环境--安装vagrant

#安装教程#安装vagrant教程#准备-windows操作系统-VirtualBox-5.1.18-114002-Win,-vagrant_1.9.3.msi-镜像文件https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20161122.0.0/providers/virtualbox.box#安装流程-1先后安装vagrant, 查看详情

postgres-为fedora14安装和创建数据库和用户

#Fedora%sudorpm-Uvhhttp://yum.pgrpms.org/reporpms/8.4/pgdg-fedora-8.4-2.noarch.rpm %sudoyuminstallpostgresqlpostgresql-serverpostgresql-contrib #Initialize%servicepostgresqlinitdb #Editconfaddingpermitedaddressesandport%nano-w/var/lib/pgsql/data/postgresql.conf #listen_addresses=... 查看详情

markdown常用语法

 #一,标题使用##二级标题###三级标题#二,列表##无序列表-列表1   -列表1.1   -列表1.2-列表2   -列表1.3   -列表1.4##有序列表1.列表1   1.列表1.1   2.列表l 查看详情

使用markdown编辑器写博客

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文... 查看详情

markdown字体大小与颜色

Markdown是一种可以使用普通文本编辑器编写的标记语言,通过类似HTML的标记语法,它可以使普通文本内容具有一定的格式。但是它本身是不支持修改字体、字号与颜色等功能的!  CSDN-markdown编辑器是其衍生版本,扩展了Ma... 查看详情

markdown下面这个符号怎么打出来?

如果你的Markdown编辑器支持LaTeX的话,输入$\\ell$即可得到这个字母,不过也只有l这个字母这么“特殊”,其他字母的花体都可以通过$\\mathcal$或$\\mathfrak$等得到。参考:LaTeX小写花体字母?追答麻烦采纳一下。参考技术A输入$\\ell$... 查看详情

使用vagrant在命令行快速创建虚拟机

一、Vgrant的安装Vagrant是一个跨平台的虚拟机管理工具,我们以Deepin20.2.3为例,安装和使用Vagrant。我们在这里所说的Vagrant包括Vagrant工具本身和虚拟引擎工具VirtualBox。1.安装Vagrant安装vagrant时,使用的VirtualBox版本必须要得到对应Va... 查看详情

在 python 中设置简单的 Markdown 脚本

】在python中设置简单的Markdown脚本【英文标题】:SetsimpleMarkdownscriptinpython【发布时间】:2022-01-2018:30:34【问题描述】:我正在尝试将Markdown与python一起使用,但遇到了问题:importmarkdownlayers=[1,2,3]lr=2dir=\'result\'withopen(\'readme.md\',\'a+... 查看详情

001_vagrant利器

一、这是一个关于Vagrant的学习系列,包含如下文章:Vagrant入门 http://www.cnblogs.com/davenkin/p/vagrant-virtualbox.html创建自己的Vagrantbox  http://www.cnblogs.com/davenkin/p/create-own-vagrant-box.html用Vagrant搭建Je 查看详情