Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
vms:python:django [2015/08/07 16:29]
admin [Python virtual environment (virtualenv)]
vms:python:django [2017/03/31 15:14]
admin ↷ Links adapted because of a move operation
Line 25: Line 25:
 ----- -----
 ===== Debian VM ===== ===== Debian VM =====
-We'll start with a [[debian|Debian template]].\\+We'll start with a [[..:debian|Debian template]].\\
 Then: Then:
 <​code>​ <​code>​
Line 59: Line 59:
 > nano /​etc/​hostname > nano /​etc/​hostname
 > nano /etc/hosts > nano /etc/hosts
-> reboot 
 </​code>​ </​code>​
  
Line 76: Line 75:
  
 === Put your public rsa key for login === === Put your public rsa key for login ===
-(From your workstation)+(From the host system)
 <​code>​ <​code>​
 > ssh-copy-id -i root@<​host.ip.address>​ > ssh-copy-id -i root@<​host.ip.address>​
 </​code>​ </​code>​
  
-=== Upgrade system & install ​sudo ===+You might want to reboot the VM at this point and login through a terminal instead of using the VirtualBox restricted screen. 
 + 
 +=== Install ​sudo ===
 As root: As root:
 <​code>​ <​code>​
-> apt-get update 
-> apt-get upgrade 
 > apt-get install sudo > apt-get install sudo
 </​code>​ </​code>​
Line 94: Line 93:
 </​code>​ </​code>​
  
 +
 +Adding to the sudoers group:
 +<​code>​
 +> sudo usermod -a -G sudo <​username>​
 +</​code>​
 ---- ----
 ==== Install VirtualBox Guest Additions ==== ==== Install VirtualBox Guest Additions ====
Line 151: Line 155:
 Enter new UNIX password: ​ Enter new UNIX password: ​
 Retype new UNIX password: ​ Retype new UNIX password: ​
-> sudo usermod -a -G sudo webdev 
 </​code>​ </​code>​
  
Line 162: Line 165:
 === Creating a shared folder for your development environment === === Creating a shared folder for your development environment ===
 ----- -----
-[[http://​wiki.strategicz.com/​vhyper/​doku.php?​id=vms:​webdev:​apache#​create_the_shared_www_folders]]+You have to create a **shared folder** for your VM, then "​prepare"​ it for correct symlinks operations from your **host** computer command line: See [[vms:​webdev:​apache#​create_the_shared_www_folders|Create VirtualBox shared folder]] in this wiki.
  
 Test-mount your shared folder: Test-mount your shared folder:
Line 263: Line 266:
 Apparently pip does the same, but better. Apparently pip does the same, but better.
  
-Under Wheezy:+**NOTE**: It seems that on most distribution,​ if you're running Python 2.7.9+ or Python 3.4+, pip should already be available. This is not the case in Debian. 
 + 
 +With Python 2:
 <​code>​ <​code>​
 > sudo apt-get install python-pip python-dev build-essential > sudo apt-get install python-pip python-dev build-essential
 </​code>​ </​code>​
 +
 +When using python 3:
 +<​code>​
 +> sudo apt-get install python3-pip python3-dev build-essential
 +</​code>​
 +
  
 Install virtualenv: Install virtualenv:
 <​code>​ <​code>​
 > pip install virtualenv > pip install virtualenv
 +OR
 +> pip3 install virtualenv
 </​code>​ </​code>​