Увидели сообщение с непонятной ссылкой, спам, непристойность или оскорбление?Воспользуйтесь ссылкой «Сообщить модератору» рядом с сообщением!
0 Пользователей и 1 Гость просматривают эту тему.
sudo apt update && sudo apt upgradesudo apt autoremoveecho "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee -a /etc/apt/sources.list.d/virtualbox.listwget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -sudo apt updatesudo apt install dkms virtualbox-6.0vboxwebsrv -Vsudo service vboxdrv statuswget https://download.virtualbox.org/virtualbox/6.0.24/Oracle_VM_VirtualBox_Extension_Pack-6.0.24-139119.vbox-extpacksudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.0.24-139119.vbox-extpack################################################################################sudo apt install apache2 libapache2-mod-php php php-gd php-common php-soap php-xml unzip mcsudo usermod -a -G daemon openonevm | sudo usermod -a -G vboxusers openonevm | sudo usermod -a -G cdrom openonevmsudo nano /etc/default/virtualbox################################################################################VBOXWEB_USER=openonevmVBOXWEB_HOST=192.168.111.12VBOXWEB_PORT=18083INSTALL_DIR=/home/openonevm/VBOXWEB_LOGFILE="/var/log/vboxwebservice.log"################################################################################sudo touch /var/log/vboxwebservice.log && sudo chown openonevm:vboxusers /var/log/vboxwebservice.logunzip phpvirtualbox-5.0-5.zipsudo mkdir -p /var/www/htmlsudo mv /home/openonevm/phpvirtualbox-5.0-5/* /var/www/html/sudo chown -R openonevm:openonevm /var/www/htmlsudo cp /var/www/html/config.php-example /var/www/html/config.phpsudo nano /var/www/html/config.php################################################################################Меняем пользователя и пароль к нему.var $username = 'openonevm';var $password = 'Tt4355';меняем ip:/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */var $location = 'http://192.168.111.12:18083/';// Host / ip to use for console connectionsvar $consoleHost = '192.168.111.12';################################################################################sudo service vboxdrv restartsudo service vboxweb-service restartsudo systemctl restart vboxweb-servicesudo service apache2 restart
test@test-u20:/tmp$ netstat -anActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 192.168.111.12:18083 0.0.0.0:* LISTEN tcp 0 0 192.168.111.12:46604 192.168.111.17:445 ESTABLISHEDtcp 0 0 192.168.111.12:22 192.168.111.11:43658 ESTABLISHEDtcp6 0 0 :::22 :::* LISTEN tcp6 0 0 :::80 :::* LISTEN tcp6 0 0 192.168.111.12:80 192.168.111.11:56776 FIN_WAIT2 udp 0 0 127.0.0.53:53 0.0.0.0:* udp 0 0 192.168.111.12:68 0.0.0.0:* raw6 0 0 :::58 :::* 7после sudo chown -R www-data:www-data /var/www/*test@test-u20:~$ netstat -anActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 192.168.111.12:18083 0.0.0.0:* LISTEN tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 192.168.111.12:22 192.168.111.11:44440 ESTABLISHEDtcp 0 0 192.168.111.12:37544 192.168.111.12:18083 TIME_WAIT tcp 0 0 192.168.111.12:37534 192.168.111.12:18083 TIME_WAIT tcp 0 0 192.168.111.12:37550 192.168.111.12:18083 TIME_WAIT tcp 0 0 192.168.111.12:37540 192.168.111.12:18083 TIME_WAIT tcp 0 0 192.168.111.12:37542 192.168.111.12:18083 TIME_WAIT tcp 0 0 192.168.111.12:43404 192.168.111.17:445 ESTABLISHEDtcp 0 0 192.168.111.12:37546 192.168.111.12:18083 TIME_WAIT tcp 0 0 192.168.111.12:37538 192.168.111.12:18083 TIME_WAIT tcp 0 0 192.168.111.12:37548 192.168.111.12:18083 TIME_WAIT tcp6 0 0 :::80 :::* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 192.168.111.12:80 192.168.111.11:57152 FIN_WAIT2 tcp6 0 0 192.168.111.12:80 192.168.111.11:57156 FIN_WAIT2 tcp6 0 0 192.168.111.12:80 192.168.111.11:57128 TIME_WAIT tcp6 0 0 192.168.111.12:80 192.168.111.11:57134 TIME_WAIT tcp6 0 0 192.168.111.12:80 192.168.111.11:57138 TIME_WAIT tcp6 0 0 192.168.111.12:80 192.168.111.11:57162 FIN_WAIT2 tcp6 0 0 192.168.111.12:80 192.168.111.11:57132 TIME_WAIT tcp6 0 0 192.168.111.12:80 192.168.111.11:57148 TIME_WAIT tcp6 0 0 192.168.111.12:80 192.168.111.11:57154 FIN_WAIT2 tcp6 0 0 192.168.111.12:80 192.168.111.11:57136 TIME_WAIT tcp6 0 0 192.168.111.12:80 192.168.111.11:57150 FIN_WAIT2 tcp6 0 0 192.168.111.12:80 192.168.111.11:57130 TIME_WAIT tcp6 0 0 192.168.111.12:80 192.168.111.11:57158 FIN_WAIT2 udp 0 0 127.0.0.53:53 0.0.0.0:* udp 0 0 192.168.111.12:68 0.0.0.0:* raw6 0 0 :::58 :::* 7
00:00:00.068146 main VirtualBox web service 6.0.24 r139119 linux.amd64 (Jul 9 2020 20:09:26) release log00:00:00.068149 main Log opened 2022-06-07T18:52:17.914662000Z00:00:00.068150 main Build Type: release00:00:00.068152 main OS Product: Linux00:00:00.068153 main OS Release: 4.15.0-177-generic00:00:00.068154 main OS Version: #186-Ubuntu SMP Thu Apr 14 20:23:07 UTC 202200:00:00.068189 main DMI Product Name: VirtualBox00:00:00.068198 main DMI Product Version: 1.200:00:00.068252 main Host RAM: 1992MB total, 1809MB available00:00:00.068255 main Executable: /usr/lib/virtualbox/vboxwebsrv00:00:00.068255 main Process ID: 1210300:00:00.068256 main Package type: LINUX_64BITS_UBUNTU_18_0400:00:00.406674 main IPC socket path: /tmp/.vbox-openonevm-ipc/ipcd00:00:00.934008 SQPmp Socket connection successful: host = 192.168.111.12, port = 18083, master socket = 900:00:05.913859 Watchdog Statistics: 0 websessions, 0 references00:00:22.423407 SQPmp Request 1 on socket 12 queued for processing (1 items on Q)00:00:22.423453 SQW01 New SOAP thread started00:00:22.423477 SQW01 Processing connection from IP=192.168.111.12 socket=12 (0 out of 1 threads idle)00:00:22.533548 SQW01 External authentication library is 'VBoxAuth'00:00:22.624644 SQW01 Access for user 'openonevm' granted00:00:22.750443 SQPmp Request 2 on socket 12 queued for processing (1 items on Q)00:00:22.750583 SQW02 New SOAP thread started00:00:22.750622 SQW02 Processing connection from IP=192.168.111.12 socket=12 (0 out of 2 threads idle)00:00:22.789892 SQW02 Access for user 'openonevm' granted00:00:22.799460 SQPmp Request 3 on socket 14 queued for processing (1 items on Q)00:00:22.799509 SQW01 Processing connection from IP=192.168.111.12 socket=14 (0 out of 2 threads idle)00:00:22.824405 SQPmp Request 4 on socket 15 queued for processing (1 items on Q)00:00:22.824449 SQW03 New SOAP thread started00:00:22.824475 SQW03 Processing connection from IP=192.168.111.12 socket=15 (0 out of 3 threads idle)00:00:22.827420 SQPmp Request 5 on socket 16 queued for processing (1 items on Q)00:00:22.827456 SQW04 New SOAP thread started00:00:22.827512 SQW04 Processing connection from IP=192.168.111.12 socket=16 (0 out of 4 threads idle)00:00:22.832121 SQPmp Request 6 on socket 18 queued for processing (1 items on Q)00:00:22.835012 SQW05 New SOAP thread started00:00:22.835063 SQW05 Processing connection from IP=192.168.111.12 socket=18 (0 out of 5 threads idle)00:00:22.835643 SQW01 Access for user 'openonevm' granted00:00:22.838501 SQPmp Request 7 on socket 17 queued for processing (1 items on Q)00:00:22.838542 SQW06 New SOAP thread started00:00:22.838581 SQW06 Processing connection from IP=192.168.111.12 socket=17 (0 out of 6 threads idle)00:00:22.881276 SQW04 Access for user 'openonevm' granted00:00:22.898612 SQW03 Access for user 'openonevm' granted00:00:22.914738 SQW05 Access for user 'openonevm' granted00:00:22.931332 SQW06 Access for user 'openonevm' granted00:00:22.941542 SQPmp Request 8 on socket 12 queued for processing (1 items on Q)00:00:22.941576 SQW04 Processing connection from IP=192.168.111.12 socket=12 (0 out of 6 threads idle)00:00:22.995147 SQW04 Access for user 'openonevm' granted
sudo apt update && sudo apt upgradesudo apt autoremove################################################################################Замечал, что vboxweb-service настойчево цеплялся почему то к ipv6, поэтому отключаем за одно.В /etc/default/grub дописываем строки:было:GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity"GRUB_CMDLINE_LINUX=""стало:GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity ipv6.disable=1"GRUB_CMDLINE_LINUX="ipv6.disable=1"обновляем grub и перезагружаемся:sudo update-grub2sudo reboot################################################################################Ставим сам virtualbox-6.0:echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee -a /etc/apt/sources.list.d/virtualbox.listwget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -sudo apt update && sudo apt upgradesudo apt install dkms virtualbox-6.0vboxwebsrv -Vsudo service vboxdrv statuswget https://download.virtualbox.org/virtualbox/6.0.24/Oracle_VM_VirtualBox_Extension_Pack-6.0.24-139119.vbox-extpacksudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.0.24-139119.vbox-extpack################################################################################sudo apt install php php-gd php-common php-soap php7.4-xml libapache2-mod-php unzipsudo apt install apache2Добавим пользователя если не создан ранее:sudo useradd -p Tt4355 -G vboxusers -s /bin/bash -m openonevmЕсли пользователь есть просто добавим в группу:sudo usermod -a -G vboxusers openonevmsudo nano /etc/default/virtualboxVBOXWEB_USER=openonevmVBOXWEB_HOST=192.168.1.12VBOXWEB_PORT=18083INSTALL_DIR=/home/openonevm/VBOXWEB_LOGFILE="/var/log/vboxwebservice.log"sudo touch /var/log/vboxwebservice.logsudo chown openonevm:vboxusers /var/log/vboxwebservice.logsudo service vboxdrv restartsudo service vboxweb-service restartcd /tmpwget https://github.com/phpvirtualbox/phpvirtualbox/archive/master.zipunzip master.zipsudo mv phpvirtualbox-master/* /var/www/html/sudo cp /var/www/html/config.php-example /var/www/html/config.phpsudo nano /var/www/html/config.phpМеняем на своего пользователя и пароль к нему.var $username = 'openonevm';var $password = 'Tt4355';меняем ip:/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */var $location = 'http://192.168.1.12:18083/';// Host / ip to use for console connectionsvar $consoleHost = '192.168.1.12';В инструкциях пишут что нужно сменить владельца для доступа apache к файлам, но я не делал.Но если кому понадобится:sudo chown -R www-data:www-data /var/www/*sudo systemctl restart vboxweb-servicesudo service apache2 restartОткрываем в браузере адрес нашего сервера: http://192.168.1.12Логин и пароль по умолчанию: admin
Убрать ошибку о версии:cd /var/www/html/endpoints/libnano config.phpбыло:define('PHPVBOX_VER', '5.0-5');стало:define('PHPVBOX_VER', '6.0-24');ln -s vboxweb-5.2.wsdl vboxweb-6.0.wsdlln -s vboxwebService-5.2.wsdl vboxwebService-6.0.wsdl
Jursha, куда тут ставить ЛАЙК за проделанную работу?
Можно и не ставить.
Админы сделайте, лайки!
Страница сгенерирована за 0.041 секунд. Запросов: 20.