VirtualBox shared folders
Intalling sudo
Become root
su -
Install sudo package
apt update
apt install sudo
Add the user to sudo group
usermod -aG sudo <username>
Log in as the user
su <username>
Check if it works
su whoami
Mounting VirtualBox shared folders
Install dependencies for VirtualBox guest additions
sudo apt update
sudo apt install build-essential linux-headers-`uname -r`
Mount the Guest Additions CD
sudo mount -t iso9660 /dev/cdrom /media/cdrom
Run the installation script for the guest additions
sudo /media/cdrom/VBoxLinuxAdditions.run
Shut down VM
sudo shutdown now
Add a new shared folder in the settings of VirtualBox. Turn VM on.
Create directory
mkdir ~/shared
Mount the shared folder
sudo mount -t vboxsf shared ~/shared
The host folder should now be accessible inside the VM
cd ~/shared
Add line to /etc/fstab
(separated by tabs)
shared /home/<username>/shared vboxsf defaults 0 0
Add line to /etc/modules
vboxsf
Install NodeJS
Install curl
sudo apt update
sudo apt install curl
Add NodeSource package signing key
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
To add nodejs repositories, create file /etc/apt/sources.list.d/nodesource.list
with the following two lines:
deb https://deb.nodesource.com/node_15.x buster main
deb-src https://deb.nodesource.com/node_15.x buster main
Install NodeJS
sudo apt update
sudo apt install nodejs
Check the installed version
node -v
npm -v
Install desirable npm packages, for example
sudo npm install --global surge
Further information is available at NodeSource Node.js Binary Distributions
Use shared folders as Apache root directory
Remove apache's old html directory
sudo rm -rf /var/www/html
Add a symbolic link in its place
sudo ln -s ~/shared /var/www/html
Add clean URL rewrites
Edit /etc/apache2/apache2.conf
file in <Directory /var/www/>
configuration set
Options Indexes FollowSymLinks Multiviews
Restart Apache
sudo systemctl restart apache2