On Windows, use VMWare. I’ve run into problems with Oracle VirtualBox and Windows networking, although it works very well on Linux.
On the Thinkpad T420s I needed to enable VT-x (Virtualization support) in the BIOS setup under the Security-Virtualization menu.
For a Core i5 vPro with four cores, I assign:
- Four GB of RAM
- Two processors
- 32 GB of disk in a single file
On my hardware (Thinkpad T420s) I’ve had problems with Fedora. Ubuntu derived distributions work fine, including Linux Mint. I’ll assume that you’re using Linux Mint 16 Petra 64-bit.
I’ll download the .iso version via BitTorrent. Both VMWare and VirtualBox can mount and use ISO files for VM installation, plus it boots significantly faster than physical media.
Post-install VMWare Configuration
First, install the Linux kernal sources. VMWare’s install script will complain if you don’t have them, and VMWare’s install script will complain that it can’t find what it wants when you do install them.
sudo apt-get install linux-kernel-headers
Verify the headers are installed by looking in /usr/src
Second, install the VMWare tools: VMWare should be bugging you about this in the VM window toolbar. This will include significant quality of life improvements such as a shared clipboard and dynamic screen resizing: I found modern X.org builds have been cranky when it comes to configuring the monitor resolution on a VM. VMWare will install the vmware-tools-distrib on your desktop: expand it if necessary, then run the vmware-install.pl script either in a shell with sudo ~/Desktop/vmware-tools-distrib/vmware-install.pl or with the right-click context menu and Open as administrator… (with Gnome/MATE).
The only tricky part of the VMWare tools install will be that it has trouble finding the kernel headers. Give it your best path /usr/src/linux-headers-3.xxx and let it go from there. The install will work.
After the VMWare tools are installed log out and restart the VM.
Development Environment Configuration
I add a minimal .bashrc to my home directory.
Now, I need to install Java, Maven, Go, Idea, and Postgresql. I go to the respective websites to download the latest versions:
As root (sudo bash) execute the following commands:
tar zxvf ~/Downloads/jdk-7u45-linux-x64.tar.gz
ln -s jdk1.7.0_45/ java
tar zxvf ~/Downloads/apache-maven-3.1.1-bin.tar.gz
ln -s apache-maven-3.1.1/ maven
tar zxvf ~/Downloads/go1.2.linux-amd64.tar.gz
apt-get install postgresql
End your sudo session and, as a non-privileged user, install Idea:
tar zxvf ~/Downloads/ideaIU-13.0.1.tar.gz
ln -s idea-IU-133.331 idea
ln -s idea/bin/idea.sh idea.sh
Open a new non-privileged terminal window and test your configuration with:
Create a Dev Postgresql Database
You’ll need to execute the following commands as root (or as user postgres if you want to drop the sudo). Feel free to rename the database.
# create a database user
sudo -u postgres createuser --no-superuser --no-createdb --nocreaterole devdbu
# create the schema owner
sudo -u postgres createuser --superuser --no-createdb --no-createrole devdb
# create the database
sudo -u postgres createdb -E UTF8 -O devdb devdb "Dev database"
# add the users to the database
sudo -u postgres psql -c "ALTER USER devdb WITH PASSWORD 'devdb'"
sudo -u postgres psql -c "ALTER USER devdbu WITH PASSWORD 'devdbu'"
To later add a schema:
psql -f schema.sql -d devdb devb