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:webdev:apache [2015/08/06 14:20]
admin [Create the Shared www Folders]
vms:webdev:apache [2015/09/06 02:54]
admin [Pages Caching]
Line 237: Line 237:
  
 <WRAP center round tip> <WRAP center round tip>
-At this pointyou'll probably ​run into a mount error of type:+In case at this point you run into a mount error of type:
 <​code>​ <​code>​
 mount: unknown filesystem type '​vboxsf'​ mount: unknown filesystem type '​vboxsf'​
 </​code>​ </​code>​
  
-You need to install the VirtualBox Guest Additions: +You need to install the VirtualBox Guest Additions, see the [[vms:django#​install_virtualbox_guest_additions| ​Install ​VirtualBox ​Guest Additions]] section on this wiki.
-<​code>​ +
-> apt-get update +
-> apt-get upgrade +
-> apt-get install build-essential module-assistant +
-> m-a prepare +
-</​code>​ +
- +
-Click on Install Guest Additions… from the Devices menu (VM Window) +
 </​WRAP>​ </​WRAP>​
  
Line 561: Line 552:
 </​code>​ </​code>​
  
-We could also have a cron script running ​all the time, avoiding the need of the manual launch of the //watch// command. +We could also have a bash script running ​an endless loop every second, avoiding the need of the manual launch of the //watch// command. ​To this purpose, we'll create a shell //​**drop_caches.sh**//​ script file and put in an //**@reboot cron task**// (following commands assumed as root): 
- <​code>​+<​code>​ 
 +> nano /​etc/​init.d/​drop_caches.sh
  
 +PASTE:
 +#!/bin/bash
 +sync; echo 3 > /​proc/​sys/​vm/​drop_caches
 +
 +> chmod +x ~/​scripts/​drop_caches.sh
 +> crontab -e
 +
 +PASTE:
 +@reboot /​root/​scripts/​drop_caches.sh
 +
 +> reboot
 +</​code>​
 +
 +To make sure that the script is well running after reboot:
 +<​code>​
 +> ps aux | grep [c]aches
 +root      2260  0.0  0.0   ​4184 ​  576 ?        Ss   ​02:​50 ​  0:00 /bin/sh -c /​root/​scripts/​drop_caches.sh
 +root      2266  0.3  0.1  10768  1412 ?        S    02:50   0:00 /bin/bash /​root/​scripts/​drop_caches.sh
 </​code>​ </​code>​