Skip to content

Instantly share code, notes, and snippets.

@korayguclu
Last active April 14, 2018 09:46
Show Gist options
  • Save korayguclu/0889f4cf804f23a643b7dbd3ab24e042 to your computer and use it in GitHub Desktop.
Save korayguclu/0889f4cf804f23a643b7dbd3ab24e042 to your computer and use it in GitHub Desktop.
How to configure development VM Box

Xubuntu VM Development Machine

Packages to install

Install OhMyZH as described here

Install silversearcher ag apt-get install silversearcher-ag

Install Mitmproxy by using this binary

Install gitkraken

Install vim spf13 from vim.spf13.com

install docker as described here

install java as describe here

install visual studio code from here

dpkg -i code_1.20.1-1518535978_amd64.deb 

install cntlm proxy

wget https://netcologne.dl.sourceforge.net/project/cntlm/cntlm/cntlm%200.92.3/cntlm_0.92.3_amd64.deb
dkpg -i cntlm_0.92.3_amd64.deb

install ansible 2.4.3.0 (wont work behind a proxy)

sudo  apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible

selenium drivers can not be loaded behind proxy you need to install them without a company proxy. If you are using a VM you need to use bridge networking (instead of NAT) without a proxy

Configuration

ssh keys

create ssh keys as described here

git

git config --global user.name "firstname lastname"
git config --global user.email "firstname.lastname@company.com"

Watch (Max open files fix)

If your watch processing is breaking use following code to increase max_user_watches variable in linux as described here

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Networking & Proxy

use NAT on your VirtualBox Configuration

If you are behind a corporate firewall you can configure a central proxy on your VM. Because it is tedies to change all the configuration files once you need to work from home. I use for that tinyproxy and forward all request in VM to central proxy(tinyproxy).

install proxy

sudo apt-get install tinyproxy 

After that you can edit following files to forward your request to local proxy (tinyproxy)

Edit environment: following file sudo nano /etc/environment and append afterwards use source /etc/environment to load your new variables.

http_proxy=http://127.0.0.1:8888/
https_proxy=http://127.0.0.1:8888/
ftp_proxy=http://127.0.0.1:8888/
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY=http://127.0.0.1:8888/
HTTPS_PROXY=http://127.0.0.1:8888/
FTP_PROXY=http://127.0.0.1:8888/
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"

Edit apt: go to /etc/apt/apt.conf.d/ and create a file named 95proxies sudo nano /etc/apt/apt.conf.d/95proxies and add those lines

Acquire::http::proxy "http://127.0.0.1:8888/";
Acquire::ftp::proxy "http://127.0.0.1:8888/";
Acquire::https::proxy "http://127.0.0.1:8888/";

Shared folders

If you get following error when you try to change to shared folder /media/sf_shared/: Permission denied you need to add yourself to the vboxsf group within the guest VM.

Solution 1: Edit the file /etc/group. Look for the line vboxsf:x:999 and add at the end :<yourusername> e.g. vboxsf:x:999:<yourusername>

Solution 2: Run sudo adduser <yourusername> vboxsf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment