Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/netbek/vagrant-lamp
Base box build script for Debian 7 (wheezy)
https://github.com/netbek/vagrant-lamp
Last synced: 11 days ago
JSON representation
Base box build script for Debian 7 (wheezy)
- Host: GitHub
- URL: https://github.com/netbek/vagrant-lamp
- Owner: netbek
- License: mit
- Created: 2015-04-25T02:36:51.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-22T00:29:36.000Z (over 9 years ago)
- Last Synced: 2024-11-13T21:49:18.738Z (2 months ago)
- Language: Shell
- Homepage:
- Size: 195 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vagrant-lamp
Base box build script for Debian 7 (wheezy)
## Download
* http://debian.mirror.ac.za/debian-cd/7.8.0/i386/iso-cd/debian-7.8.0-i386-CD-1.iso
* http://dlc-cdn.sun.com/virtualbox/4.3.26/virtualbox-4.3_4.3.26-98988~Debian~wheezy_i386.deb
* http://dlc-cdn.sun.com/virtualbox/4.3.26/VBoxGuestAdditions_4.3.26.iso## Create new VM in VirtualBox
* Name: wheezy32-lamp
* Type: Linux
* Version: Debian 32-bit
* Memory: 512 MB
* Select: Create a virtual hard drive now
* Select: VMDK
* Select: Dynamically allocated
* File location: wheezy32-lamp
* Size: 8 GB
* Change settingsMotherboard:
* Base memory: 512 MB
* Boot order: CD/DVD, hard disk
* Enable I/O APIC
* Hardware clock in UTC timeProcessor:
* 1 CPU
* Enable PAE/NXDisable audio, USB
Storage: Go to CD/DVD and insert debian-7.8.0-i386-CD-1.iso
Start VM
## Install Debian
* Set hostname (vagrant-debian-wheezy)
* Set domain name (vagrantup.com)
* Set root password (vagrant)
* Set up a user (vagrant with vagrant as the password too)
* Follow the defaults to set up the disk, all one partition
* Deselect all tasks except "Standard system utilities" and continute to allow the system to install the required packages.
* Next the installer asks about GRUB. Just take all the defaults and install it to the root of the drive.
* Shutdown VM
* Remove Debian ISO from CD/DVD and insert VBoxGuestAdditions ISO (VirtualBox > vm > Settings > Storage > CD/DVD)## Install LAMP
Start VM
Log in as root
Remove cdrom from APT sources:
```
nano /etc/apt/sources.list
```Update APT, install git, clone repo, start build:
```
apt-get update
apt-get install -y git
cd ${HOME}
git clone https://github.com/netbek/vagrant-lamp
cd ${HOME}/vagrant-lamp
chmod 0700 build.sh
bash build.sh
```Shutdown VM
Remove VBoxGuestAdditions ISO (VirtualBox > vm > Settings > Storage > CD/DVD)
## Package base box
Start VM
Log in as root
Zero free disk space and shutdown VM:
```
init 1
mount -o remount,ro /dev/sda1
zerofree /dev/sda1
shutdown -h now
```On host, package the base box:
```
cd "${HOME}/VirtualBox VMs"
vagrant package --base wheezy32-lamp --output wheezy32-lamp.box
```## Add or remove a base box
```
vagrant box add wheezy32-lamp wheezy32-lamp.box
vagrant box remove wheezy32-lamp
```