Раздел: root - VirtualBox
The alternative installer performs the following steps:
which cannot be changed.
The installer must be executed as root with either install or uninstall as the first parameter.
sudo ./VirtualBox.run install
Or if you do not have the "sudo" command available, run the following as root instead:
After that you need to put every user which should be able to access USB devices from VirtualBox guests in the group vboxusers, either through the GUI user management tools or by running the following command as root:
sudo usermod -a -G vboxusers username
The usermod command of some older Linux distributions does not support the -a option (which adds the user to the given group without affecting membership of other groups). In this case, find out the current group memberships with the groups command and add all these groups in a comma-separated list to the command line after the -G option, e.g. like this: usermod -G group1,group2,vboxusers username.
Performing a manual installation
If, for any reason, you cannot use the shell script installer described previously, you can also perform a manual installation. Invoke the installer like this:
./VirtualBox.run --keep --noexec
This will unpack all the files needed for installation in the directory install under the current directory. The VirtualBox application files are contained in VirtualBox.tar.bz2 which you can unpack to any directory on your system. For example:
sudo mkdir /opt/VirtualBox
sudo tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox
or as root:
tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox
The sources for VirtualBox's kernel module are provided in the src directory. To build the module, change to the directory and issue
If everything builds correctly, issue the following command to install the module to the appropriate module directory:
sudo make install
In case you do not have sudo, switch the user account to root and perform
The VirtualBox kernel module needs a device node to operate. The above make command will tell you how to create the device node, depending on your Linux system. The procedure is slightly different for a classical Linux setup with a /dev directory, a system with the now deprecated devfs and a modern Linux system with udev.
On certain Linux distributions, you might experience difficulties building the module. You will have to analyze the error messages from the build system to diagnose the cause of the problems. In general, make sure that the correct Linux kernel sources are used for the build process.
Note that the /dev/vboxdrv kernel module device node must be owned by root:root and must be read/writable only for the user.
Next, you will have to install the system initialization script for the kernel module:
cp /opt/VirtualBox/vboxdrv.sh /etc/init.d/vboxdrv
(assuming you installed VirtualBox to the /opt/VirtualBox directory) and activate the initialization script using the right method for your distribution. You should create VirtualBox's configuration file:
echo INSTALL_DIR=/opt/VirtualBox > /etc/vbox/vbox.cfg
and, for convenience, create the following symbolic links:
ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VirtualBox
ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage
ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxHeadless
ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxSDL
|← Содержание ...|