Virtualization

Headless VirtualBox Installation With phpvirtualbox

Phpvirtualbox is a web-based VirtualBox front-end written in PHP that allows you to access and control remote VirtualBox instances.It is a nice replacement for the VirtualBox GUI if you run VirtualBox on headless servers.I do not issue any guarantee that this will work.

1 Preliminary Note

Headless VirtualBox is already installed on the local OpenSUSE 12.1 server
running all the steps in this notes are with root privileges so lo gin as root

2 Installing phpvirtualbox

Create system user as vbox  and add to vboxusers

useradd -m vbox -G vboxusers

password for the vbox user

passwd vbox

Create the file /etc/default/virtualbox and put the line VBOXWEB_USER=vbox in it (so that the VirtualBox SOAP API which is called vboxwebsrv runs as the user vbox)

Continue reading “Headless VirtualBox Installation With phpvirtualbox” »

Be the first to comment - What do you think?  Posted by Aniruddh - August 8, 2012 at 5:53 pm

Categories: virtual box, Virtualization   Tags:

Using And Installing OpenVZ On CentOS 6.3

multiple Virtual Private Servers (VPS) by the use of OpenVZ on the same hardware, similar to Xen and the Linux Vserver projectThe OpenVZ kernel patch is licensed under the GPL license, and the user-level tools are under the QPL license

 

1 Installing OpenVZ

To Install of OpenVZ wwant to add OpenVZ repository to yum

cd /etc/yum.repos.d

wget http://download.openvz.org/openvz.repo
rpm –import http://download.openvz.org/RPM-GPG-Key-OpenVZ

 

open openvz.repo

 

vi openvz.repo

 

[...]
[openvz-kernel-rhel6]
name=OpenVZ RHEL6-based kernel
#baseurl=http://download.openvz.org/kernel/branches/rhel6-2.6.32/current/
mirrorlist=http://download.openvz.org/kernel/mirrors-rhel6-2.6.32
enabled=1
gpgcheck=1
gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ


 Continue reading “Using And Installing OpenVZ On CentOS 6.3” »

Be the first to comment - What do you think?  Posted by Aniruddh - at 1:55 am

Categories: CentOS, OpenVZ, Virtualization   Tags:

Using DPKG To Install OpenVZ On Debian

DPKG package manager to install OpenVZ, all you need to do is download the OpenVZ components, and let DPKG do the rest.

Download the lastest kernel revision level, for your particular DEBIAN distro. For me, this was:

linux-image-2.6.18-openvz-k7_028.18.1-2.6.18-12-1_i386.deb

Next,go to this URL: http://download.openvz.org/debian-systs/pool/openvz/v/

Download:

* vzctl
* vzprocps
* vzquota

and an OS template cache, from the “vzctl-ostemplate” directory. I chose DEBIAN 5.0.

vzctl-ostmpl-debian-5.0-i386-minimal_20090121_i386.deb

Open a terminal shell, and log in as “root”.(use “SU” or “SUDO”)

Create a “/vz” directory.

Continue reading “Using DPKG To Install OpenVZ On Debian” »

Be the first to comment - What do you think?  Posted by Aniruddh - December 20, 2011 at 4:33 pm

Categories: Debian, OpenVZ   Tags:

Basic HTTP Authentication With Nginx

HTTP authentication with Nginx to password-protect directories on your server or even a whole website

1 Preliminary Note

here with the document root /var/www/www.example.com/web/ and the Nginx vhost configuration file /etc/nginx/sites-enabled/www.example.com.vhost. The directory I want to password-protect is /var/www/www.example.com/web/test/.

2 Creating The Password File

a password file where users that should be able to log in are listed with their passwords (in encrypted form). To create such a password file, we can either use Apache’s htpasswd tool, or we use the Python script from http://trac.edgewall.org/browser/trunk/contrib/htpasswd.py.

2.1 Using Apache’s htpasswd Command

to use Apache’s htpasswd command, check if it exists on your system

which htpasswd

root@server1:~# which htpasswd
/usr/bin/htpasswd
root@server1:~#

On Debian/Ubuntu, it’s part of the apache2-utils package which we can install

apt-get install apache2-utils

.htpasswd; I just named it .htpasswd because that’s the way password files are named under Apache

htpasswd -c /var/www/www.example.com/.htpasswd falko

want to add another user without deleting all existing users, use the htpasswd command without the -c switch:

htpasswd /var/www/www.example.com/.htpasswd till

2.2 Using The htpasswd.py Python Script

download it to /usr/local/bin and make it executable

cd /usr/local/bin
wget http://trac.edgewall.org/export/10791/trunk/contrib/htpasswd.py
chmod 755 /usr/local/bin/htpasswd.py

to create the password file /var/www/www.example.com/.htpasswd now and store the user falko in it

htpasswd.py -c -b /var/www/www.example.com/.htpasswd falko falkossecret

use the htpasswd.py command without the -c switch

htpasswd.py -b /var/www/www.example.com/.htpasswd till tillssecret

3 Configuring Nginx

to add it to our Nginx vhost configuration in /etc/nginx/sites-enabled/www.example.com.vhost, inside the server {} container.

vi /etc/nginx/sites-enabled/www.example.com.vhost

Reload Nginx

/etc/init.d/nginx reload

Be the first to comment - What do you think?  Posted by Aniruddh - November 12, 2011 at 1:46 am

Categories: Nginx, OpenVZ, Virtualization   Tags: