顯示具有 Virtual Box 標籤的文章。 顯示所有文章
顯示具有 Virtual Box 標籤的文章。 顯示所有文章

2020年10月26日 星期一

[redmine][bitnami] How to virtualbox to build redmine quickly

  1. Download ova (virtualbox image) from bitnami webpage
  2. Start ova at virtualbox
  3. INSTALL SQLITE3 GEM FOR RUBY
    gem install sqlite3-ruby
  4. disable bundle deployment mode.
    bundle install --no-deployment
  5. Start to configure the environment settings.
    5-1. Set sqlite database
    cd REDMINE
    CONFIGURE DATABASE
    echo “production:” > config/database.yml &&
    echo " adapter: sqlite3" >> config/database.yml &&
    echo " database: db/redmine.sqlite3" >> config/database.yml
    5-2. POPULATE DATABASE
    cd REDMINE
    rake db:migrate RAILS_ENV=“production”
    rake redmine:load_default_data RAILS_ENV=“production”
    5-3. Create secret_token
    cd REDMINE
    echo “production:” > config/secrets.yml
    echo " secret_key_base: $(rake secret)" >> config/secrets.yml
  6. Change the permission of folder of redmine
    chmod 777 /home/bitnami/apps/redmine -Rf
  7. Restart redmine again
    /home/bitnami/stack
    ./ctlscript.sh restart

2019年8月10日 星期六

[VirtualBox] Install virtualbox driver

Install Linux Header

Install linux header
pacman -S linux-headers

check linux version
uname -a
Linux archlinux 5.2.4-arch1-1-ARCH #1 SMP PREEMPT Sun Jul 28 10:52:46 UTC 2019 x86_64 GNU/Linux

Download VirtualBox-6.0.10-132072-Linux_amd64.run from “All distributions 64-bit”:https://www.virtualbox.org/wiki/Linux_Downloads

Download linux header
Download linux-headers-4.13.9-1-x86_64.pkg.tar.xz

Decompress the package
mkdir /tmp/mozilla/linux-headers
tar xvf linux-headers-5.2.4.arch1-1-x86_64.pkg.tar.xz -C /tmp/mozilla/linux-headers
sudo cp /tmp/mozilla/linux-headers/usr/usr/src/linux-5.2.4.arch1/* /lib/modules/5.2.4-arch1-1-ARCH/build -rf

Install VirtualBox

make a folder was named test
mkdir /tmp/test

Extract file to the folder of test
sh ./VirtualBox-6.0.10-132072-Linux_amd64.run --target /tmp/test/

jump into /tmp/test
cd /tmp/test

Install Virtualbox
sudo ./install.sh

make a folder was named src
mkdir /tmp/test/src

extract VirtualBox.tar.bz2 into src
tar xvf VirtualBox.tar.bz2 -C src/

jump into /tmp/test/src/src/vboxhost and compile source code
cd /tmp/test/src/src/vboxhost/

editor build_in_tmp, remove rm command like below

execute script to compile vbox kernel
./build_in_tmp

copy all kernal which under /tmp/vbox.0 (0 will depend on, sometimes is 1 or 2) to any folder which you want.
cp /tmp/vbox.2/vbox*.ko to somewhere

#!/bin/sh
# $Id: build_in_tmp 118839 2017-10-28 15:14:05Z bird $
## @file
# Script to build a kernel module in /tmp.
#
# Useful if the module sources are installed in read-only directory.
#

#
# Copyright (C) 2007-2017 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
# The contents of this file may alternatively be used under the terms
# of the Common Development and Distribution License Version 1.0
# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
# VirtualBox OSE distribution, in which case the provisions of the
# CDDL are applicable instead of those of the GPL.
#
# You may elect to license modified versions of this file under the
# terms and conditions of either the GPL or the CDDL or both.
#

# find a unique temp directory
num=0
while true; do
  tmpdir="/tmp/vbox.$num"
  if mkdir -m 0755 "$tmpdir" 2> /dev/null; then
    break
  fi
  num=`expr $num + 1`
  if  [ $num -gt 200 ]; then
    echo "Could not find a valid tmp directory"
    exit 1
  fi
done

# Guest optimal number of make jobs.
MAKE_JOBS=`grep vendor_id /proc/cpuinfo | wc -l`
if [ "${MAKE_JOBS}" -le "0" ]; then MAKE_JOBS=1; fi

# Parse our arguments, anything we don't grok is for make.
while true; do
    if [ "$1" = "--save-module-symvers" ]; then
      shift
      SAVE_MOD_SYMVERS="$1"
      shift
    elif [ "$1" = "--use-module-symvers" ]; then
      shift
      USE_MOD_SYMVERS="$1"
      shift
    elif [ "$1" = "--module-source" ]; then
      shift
      MODULE_SOURCE="$1"
      shift
    else
      break
    fi
done

# copy
if [ -n "$MODULE_SOURCE" ]; then
  cp -a "$MODULE_SOURCE"/* $tmpdir/
else
  cp -a ${0%/*}/* $tmpdir/
fi
if [ -n "$USE_MOD_SYMVERS" ]; then
  cp $USE_MOD_SYMVERS $tmpdir/Module.symvers
fi

# make, cleanup if success
cd "$tmpdir"
if make "-j`echo ${MAKE_JOBS}`" "$@"; then  # strip leading space from "MAKE_JOBS"
  if [ -n "$SAVE_MOD_SYMVERS" ]; then
    if [ -f Module.symvers ]; then
      cp -f Module.symvers $SAVE_MOD_SYMVERS
    else
      cat /dev/null > $SAVE_MOD_SYMVERS
    fi
  fi
  #rm -rf $tmpdir   # Remove rm
  exit 0
fi

# failure
#rm -rf $tmpdir  # Remove rm
exit 1

Q: insmod: ERROR: could not insert module ./vboxdrv.ko: Invalid module format
A: dmesg

[ 2594.143481] vboxdrv: version magic '5.2.7-arch1-1-ARCH SMP preempt mod_unload ’ should be '5.2.4-arch1-1-ARCH SMP preempt mod_unload ’

Ref:

"[Virtualbox kernel module][Archlinux] How to compile virtualbox kernle module ":http://fkcsmart.blogspot.com/2017/11/virtualbox-kernel-modulearchlinux-how.html

2017年11月9日 星期四

[Virtualbox kernel module][Archlinux] How to compile virtualbox kernle module

Download linux-headers-4.13.9-1-x86_64.pkg.tar.xz

Decompress the package
tar xvf linux-headers-4.13.9-1-x86_64.pkg.tar.xz -C linux-headers
cd linux-headers/usr/lib/modules/4.13.9-1-ARCH/build

Copy the linux source code to corresponding folder.
sudo cp * /lib/modules/4.13.9-1-ARCH/build/ -Rf


Download vbox-kernel-module - vbox-kernel-module-src-5.2.0.tar.xz

Decompress the package
tar xvf vbox-kernel-module-src-5.2.0.tar.xz -C /tmp
cd /tmp/
make
sudo make install

Make install will copy to following folder
/lib/modules/4.13.9-1-ARCH/misc

According to following hyperlink will understand how to mount kernel module after reboot.
[Virtualbox][Archlinux] Upgrade vboxdrv.ko after upgrade Linux kernel
echo vboxdrv >> /etc/modules-load.d/virtualbox.conf &&\
echo vboxnetadp >> /etc/modules-load.d/virtualbox.conf &&\
echo vboxnetflt >> /etc/modules-load.d/virtualbox.conf &&\
echo vboxpci >> /etc/modules-load.d/virtualbox.conf


Vagrant

[VirtualBox][Vagrant] How to install and use vagrant

2017年6月22日 星期四

[Virtualbox] vbox-kernel-module compile

Now my archlinux os install kernel is 4.10-ARCH
My archlinux os install newest kernel, when I use following command.
pacman -S linux-headers (4.11.6-1)
After install linux-headers will put file under /lib/modules/4.10-ARCH/build.

I want install virtual box kernel module.
I download newest package from vbox-kernel-module-src
When I download old version, the gcc is new one. So alway compile error.
vbox-kernel-module-src-5.1.22.tar.xz


After decompress package.
I use following command to compile each module.

make KBUILD_VERBOSE= SUBDIRS=/tmp/mozilla_freeman0/1/vboxdrv SRCROOT=/tmp/mozilla_freeman0/1/vboxdrv CONFIG_MODULE_SIG= -C /lib/modules/4.11.6-1-ARCH/build/ -j4 modules

make KBUILD_VERBOSE= SUBDIRS=/tmp/mozilla_freeman0/1/vboxnetadp SRCROOT=/tmp/mozilla_freeman0/1/vboxnetadp CONFIG_MODULE_SIG= -C /lib/modules/4.11.6-1-ARCH/build/ -j4 modules

make KBUILD_VERBOSE= SUBDIRS=/tmp/mozilla_freeman0/1/vboxnetflt SRCROOT=/tmp/mozilla_freeman0/1/vboxnetflt CONFIG_MODULE_SIG= -C /lib/modules/4.11.6-1-ARCH/build/ -j4 modules

make KBUILD_VERBOSE= SUBDIRS=/tmp/mozilla_freeman0/1/vboxpci SRCROOT=/tmp/mozilla_freeman0/1/vboxpci CONFIG_MODULE_SIG= -C /lib/modules/4.11.6-1-ARCH/build/ -j4 modules

Copy ko to /lib/modules/extramodules-4.10-ARCH/
sudo cp ./vboxdrv/vboxdrv.ko          /lib/modules/extramodules-4.10-ARCH/
sudo cp  ./vboxpci/vboxpci.ko         /lib/modules/extramodules-4.10-ARCH/
sudo cp  ./vboxnetflt/vboxnetflt.ko   /lib/modules/extramodules-4.10-ARCH/
sudo cp  ./vboxnetadp/vboxnetadp.ko   /lib/modules/extramodules-4.10-ARCH/

Reference:

2016年7月14日 星期四

[Virtualbox][Question] The VirtualBox kernel modules do not match this version of VirtualBox.

Q:
When I execute virtalbox will appear following message.


The VirtualBox kernel modules do not match this version of VirtualBox.
The installation of VirtualBox was apparently not successful.


A:
Remove virtualbox from system
[happy@localhost tmp]$ pacman -R virtualbox
error: you cannot perform this operation unless you are root.
[happy@localhost tmp]$ sudo pacman -R virtualbox
checking dependencies...

Packages (1) virtualbox-5.0.24-1

Total Removed Size:  87.68 MiB

:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing virtualbox                                                                                          [#####################################################################] 100%
:: Running post-transaction hooks...
(1/3) Updating icon theme caches...
(2/3) Updating the desktop file MIME type cache...
(3/3) Updating the MIME type database...


Download from virtualbox webpage site and execute it.
[happy@localhost tmp]$ sudo bash VirtualBox-5.1.0-108711-Linux_amd64.run
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.............
VirtualBox Version 5.1.0 r108711 (2016-07-12T15:08:44Z) installer
Installing VirtualBox to /opt/VirtualBox
Python found: python, installing bindings...
Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /usr/lib/systemd/system/vboxdrv.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /usr/lib/systemd/system/vboxballoonctrl-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /usr/lib/systemd/system/vboxautostart-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /usr/lib/systemd/system/vboxweb-service.service.

VirtualBox has been installed successfully.

You will find useful information about using VirtualBox in the user manual
  /opt/VirtualBox/UserManual.pdf
and in the user FAQ
  http://www.virtualbox.org/wiki/User_FAQ

We hope that you enjoy using VirtualBox.


Reference:

2016年3月27日 星期日

[Virtualbox][Archlinux] Usb device can use in Virtualbox

For USB 2.0 or USB 3.0 (from Virtual Box > 5.x) we need to install an extension pack free for download from Oracle.

Install extension pack will let guest os understand device driver.

1. Instatll package
pacman -S dkms

2. gpasswd -a <username> vboxusers

3. check driver kernel
[Virtualbox][Archlinux] Upgrade vboxdrv.ko after upgrade Linux kernel

4. Restart computer

5. Open virtualbox
–> settings
–> USB
–> Add Filter From Device (Right click)
–> choose which usb device which you want to use.


Reference:

2015年12月27日 星期日

[Virtualbox][Archlinux] How to use host-only in virtualbox

Click “Download From Mirror” on the webpage virtualbox-host-dkms.

Decompress the file
tar xvf virtualbox-host-dkms-5.1.10-1-x86_64.pkg.tar.xz

cd usr/src/vboxhost-5.1.10_OSE
make
After compile the code will create four file(vboxdrv vboxnetadp vboxnetflt vboxpci).


Check extramodules-4.3.2-ARCH link under 4.3.2-ARCH-4.3.2
/lib/modules/4.3.2-ARCH-4.3.2
extramodules -> ../extramodules-4.3.2-ARCH/


All virtualbox module which under following path.
/lib/modules/extramodules-4.3.2-ARCH
vboxdrv.ko vboxnetadp.ko vboxnetflt.ko vboxpci.ko


Post all virtualbox ko file in following file
vim /etc/modules-load.d/virtualbox.conf


Add host-only interface




Use host-only option

2015年12月16日 星期三

[Virtualbox][Archlinux] Upgrade vboxdrv.ko after upgrade Linux kernel


  1. search “virtualbox-modules gentoo” on google
  2. Go to “Git repository browser”


    Find out the source code of virtualbox-modules

  3. Download vbox-kernel-module-src-5.0.10.tar.xz from vbox-kernel-module-src
  4. Method 1: pacman -S linux-headers
    Method 2: find out the kernel version
    uname -a
    Ex: my kernel version is 4.10.13.
    Download from internet.

    This is how to compiler kernel code
    Decompress the tarball to build.
    tar xvf linux-4.10.13.tar.gz /lib/modules/4.10.13-1-ARCH/build
    tar to above folder is very import, otherwise ko won't able to insert cause verimage.

    include/generated/autoconf.h is generated in the make prepare step.
    If you are trying to build a kernel module, you will also need the make scripts step:
    cd /lib/modules/4.10.13-1-ARCH/build/linux-4.10.13

    gunzip < /proc/config.gz > .config
    make oldconfig
    make prepare
    make scripts


    tar xvf vbox-kernel-module-src-5.0.10.tar.xz
    type "make" will produce vboxdrv.ko

  5. After reboot will auto mount the kernel module.
    pacman -S virtualbox-host-dkms
    echo vboxdrv >> /etc/modules-load.d/virtualbox.conf
    echo vboxnetflt >> /etc/modules-load.d/virtualbox.conf

Other Work:

Reference:

Q:

=== Building 'vboxdrv' module ===
make[1]: Entering directory '/usr/src/vboxhost-5.2.12_OSE/vboxdrv'
make V= CONFIG_MODULE_SIG= -C /lib/modules/4.16.10-1-ARCH/build SUBDIRS=/usr/src/vboxhost-5.2.12_OSE/vboxdrv SRCROOT=/usr/src/vboxhost-5.2.12_OSE/vboxdrv -j4 modules
make[2]: Entering directory '/usr/lib/modules/4.16.10-1-ARCH/build'
/usr/src/vboxhost-5.2.12_OSE/vboxdrv/Makefile.include.header:141: *** Error: unable to find the headers of the Linux kernel to build against. Specify KERN_VER=<version> (currently 4.16.10-ARCH) and run Make again.  Stop.
make[2]: *** [Makefile:1561: _module_/usr/src/vboxhost-5.2.12_OSE/vboxdrv] Error 2

A:
Patch Makefile

--- Makefile 2017-11-29 00:57:47.000000000 +0800
+++ /tmp/Makefile 2018-05-31 22:08:40.502607341 +0800
@@ -43,10 +43,11 @@
 # convenience Makefile without KBUILD_EXTMOD
 
 KBUILD_VERBOSE =
+KERN_VER := $(shell uname -r)
 
 all:
  @echo "=== Building 'vboxdrv' module ==="
- @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxdrv
+ @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) KERN_VER=$(KERN_VER)  -C vboxdrv
  @cp vboxdrv/vboxdrv.ko .
  @echo
  @if [ -d vboxnetflt ]; then \
@@ -54,7 +55,7 @@
          cp vboxdrv/Module.symvers vboxnetflt; \
      fi; \
      echo "=== Building 'vboxnetflt' module ==="; \
-     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxnetflt || exit 1; \
+     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE)  KERN_VER=$(KERN_VER) -C vboxnetflt || exit 1; \
      cp vboxnetflt/vboxnetflt.ko .; \
      echo; \
  fi
@@ -63,7 +64,7 @@
          cp vboxdrv/Module.symvers vboxnetadp; \
      fi; \
      echo "=== Building 'vboxnetadp' module ==="; \
-     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxnetadp || exit 1; \
+     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE)  KERN_VER=$(KERN_VER) -C vboxnetadp || exit 1; \
      cp vboxnetadp/vboxnetadp.ko .; \
      echo; \
  fi
@@ -72,21 +73,21 @@
          cp vboxdrv/Module.symvers vboxpci; \
      fi; \
      echo "=== Building 'vboxpci' module ==="; \
-     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxpci || exit 1; \
+     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE)  KERN_VER=$(KERN_VER) -C vboxpci || exit 1; \
      cp vboxpci/vboxpci.ko .; \
      echo; \
  fi
 
 install:
- @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxdrv install
+ @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE)  KERN_VER=$(KERN_VER) -C vboxdrv install
  @if [ -d vboxnetflt ]; then \
-     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxnetflt install; \
+     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE)  KERN_VER=$(KERN_VER) -C vboxnetflt install; \
  fi
  @if [ -d vboxnetadp ]; then \
-     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxnetadp install; \
+     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE)  KERN_VER=$(KERN_VER) -C vboxnetadp install; \
  fi
  @if [ -d vboxpci ]; then \
-     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxpci install; \
+     $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE)  KERN_VER=$(KERN_VER) -C vboxpci install; \
  fi
 
 clean:
@@ -103,7 +104,7 @@
  rm -f vboxdrv.ko vboxnetflt.ko vboxnetadp.ko vboxpci.ko
 
 check:
- @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxdrv check
+ @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE)  KERN_VER=$(KERN_VER) -C vboxdrv check
 
 unload:
  @for module in vboxpci vboxnetadp vboxnetflt vboxdrv; do \


2015年11月4日 星期三

2015年9月7日 星期一

[Virtualbox] Create new virtual disk

Virtualbox settings - Create a new storage
settings --> 
    storage --> 
    add new storage --> 
    Add Hard Disk --> 
    Create new disk

Partition disk
sudo fdisk /dev/sdb

Format disk
sudo mkfs -t ext4 /dev/sdb1

Edit fstab
vim /etc/fstab
#device        mountpoint             fstype    options  dump   fsck

/dev/sdb1    /home/happy               ext4    defaults    0    1

Referece :

2015年8月30日 星期日

[VirtualBox] useful command


Show VM list
VBoxManage list vms

```
"windowsXP" {4e7e6120-131c-4b55-80e8-a7c88427c1d0}
"winXP" {63999bea-f6f4-4b8d-bb6b-22cf6bf52ba3}
"gentoo" {95c51fce-6088-47f0-ae24-14d241eb5019}
"winXP2" {746a78d8-b60a-41e6-adb0-f63ea6d1257b}
"windowXP_1" {dd684655-1087-46d8-9fb3-e69b51088702}

```

Start VM
Open VM and put in the background
VBoxManage startvm "VM name || uuid" --type headless
VBoxManage startvm 63999bea-f6f4-4b8d-bb6b-22cf6bf52ba3  --type headless

With GUI
VBoxManage startvm 63999bea-f6f4-4b8d-bb6b-22cf6bf52ba3 --type gui

Shutdown ALL VM
vboxmanage list runningvms | sed -r 's/.*\{(.*)\}/\1/' | xargs -L1 -I {} VBoxManage controlvm {} savestate

Shutdown VM
Show help message
VBoxManage controlvm ?
VBoxManage controlvm 63999bea-f6f4-4b8d-bb6b-22cf6bf52ba3 poweroff


VM change network interface
    VBoxManage controlvm <vmname || uuid>  <vm virtual network interface> bridged <physical network interface>
    VBoxManage controlvm winXP  nic1 bridged eth1

VM take snapshot & restore snapshot
    Take a snapshot
    VBoxManage <Name_of_VM> take <Name_of_Snapshot>
    Restore a snapshot
    VBoxManage <Name_of_VM> restore <Name_of_Snapshot>
    List a snapshot
    VBoxManage <Name_of_VM> list

Reference :

2015年7月30日 星期四

[VirtualBox] Let ethernet driver work

  1. Shutdown Windows XP guest OS
  2. Change Network Adpater to “Intel PRO/1000 MT Desktop”
  3. Startup Windows XP Guest OS again
  4. Download driver from Network Adapter Drivers for Windows XP*, Final Release
  5. Use “Shared Folders” on VirtualBox to share the driver to Guest OS
  6. Install the driver.
Reference:

[VirtualBox] Backup up Image

UUID modify
VBoxManage internalcommands sethduuid <image>
VBoxManage internalcommands sethduuid windows_XP_office_full_screen.vmdk
UUID changed to: 0e03032b-2ffe-49a8-abe4-92d98631a339

Remove uuid
VBoxManage closemedium disk <image>
VBoxManage closemedium disk windows_XP_office_full_screen.vmdk

Reference:

2014年12月25日 星期四

2014年12月23日 星期二

2014年12月22日 星期一

[Packer] Quick to produce virtualbox image or vmware image

1. Download packer from official webpage
After download the compress file, uncompress it.
Edit Bash profile to set where packer is :
$ vim ~/.bashrc
Add lines to your $PATH variables:
export PATH=”~/packer:$PATH”
# ~/packer should be the path to wherever you installed packer
Source your profile:
$ source ~/.bashrc

2. Download bento from github
Most notably is Bento which has amassed a large collection of Packer base boxes:
https://github.com/opscode/bento
cd ./bento/packer

3. Choose one configuration file (json) to produce image
packer build config.json
Start to build image according to json which define the path of iso, the command of environment.



Reference :
1.The Quest for Automated Interrogation pt 3
2.Packer - 幫您打包好不同虛擬機器 image 的好幫手!

2014年12月13日 星期六

[Vagrant] Using virtual machine to quick implement Ruby on Rails


host $ git clone https://github.com/rails/rails-dev-box.git
host $ cd rails-dev-box
host $ vagrant up
What’s In The Box
Development tools
Blockquote
Git
Ruby 2.1
Bundler
SQLite3, MySQL, and Postgres
Databases and users needed to run the Active Record test suite
System dependencies for nokogiri, sqlite3, mysql, mysql2, and pg
Memcached
Redis
RabbitMQ
An ExecJS runtime
Reference:
1. A Virtual Machine for Ruby on Rails Core Development

2014年11月24日 星期一

[VirtualBox][Vagrant] How to install and use vagrant

Install :

1. Go to Vagrant and download suitable package and execute it.
2. Go to VirtualBox and download following package.
VirtualBox platform packages
VirtualBox Extension Pack

Archlinux: :

pacman -S --noconfirm virtualbox
pacman -S --noconfirm vagrant

Usage:


1. Create a folder
$ mkdir happy-1
$ cd happy-1

2.
Method 1:
vagrant box(image) search

Search the image which you want to.

Method 2:
Choose box Windows box or Mac OS box or following box
Windows 7 box - Simplified Chinese
[Vagrant] How to use vagrant box
hashicorp/precise64: Ubuntu 12.04 LTS (Precise Pangolin) 64-bit
ubuntu/trusty64: Ubuntu 14.04 LTS (Trusty Tahr) 64-bit
chef/centos-6.5: CentOS 6.5 x64
chef/debian-7.4: Debian 7.4 x64
yungsang/coreos: CoreOSsupport Docker
williamyeh/ubuntu-trusty64-docker: Ubuntu 14.04 LTSsupport Docker
williamyeh/debian-jessie64-docker: Debian Jessiesupport Docker

Choose to practice docker.
Method 1:
vagrant box add terrywang/archlinux

Method 2:
$ vagrant init yungsang/coreos
$ vagrant up

After system startup, then ssh into machine and have fun.
vagrant global-status (will show id)

vagrant ssh <vagrant-id>


Reference :

2014年8月24日 星期日

2014年7月22日 星期二