PlanetIT.WS - Beta

Welcome, Guest

Search: Advanced

Home » Virtualization » Vmware-server » Install VMware Server on Ubuntu 7.10

Install VMware Server on Ubuntu 7.10 Print View

Article Stats:
Submitted by: alex
Date: 2007-12-30 00:00:00
Views: 387
Rating: 2.50

Introduction
This document applies to Ubuntu 7.10 Server. It may work on other version, but I didn’t tested them.
 
Initial Installation of Ubuntu Server
It is recommended to use clean installation of Ubuntu Server.
I used the "Server install CD" image but it's possible to use the "Alternate install CD" and select the server installation from the initial menu.
 
Personally I want to have the root account active on my servers so I usually activate it right after installation.
 
# sudo passwd root
 
And follow the screen.
 
Adding more software repositories
Login to the newly installed Ubuntu system, modify /etc/apt/sources.list and update the installed packages to the latest versions. With the following repositories you have more applications available for download and install. Replace il with your country code (il = Israel) in the following example to access the closest national mirror.
 
# sudo vi /etc/apt/sources.list
 
## MAIN REPOSITORY
deb http://il.archive.ubuntu.com/ubuntu gutsy main restricted
deb-src http://il.archive.ubuntu.com/ubuntu gutsy main restricted
 
## MAJOR BUG FIX UPDATES
deb http://fi.archive.ubuntu.com/ubuntu gutsy-updates main restricted
deb-src http://il.archive.ubuntu.com/ubuntu gutsy-updates main restricted
 
## UBUNTU SECURITY UPDATES
deb http://il.archive.ubuntu.com/ubuntu gutsy-security main restricted
deb-src http://il.archive.ubuntu.com/ubuntu gutsy-security main restricted
 
## UNIVERSE AND MULTIVERSE REPOSITORY
deb http://il.archive.ubuntu.com/ubuntu gutsy universe multiverse
deb http://il.archive.ubuntu.com/ubuntu gutsy-security universe multiverse
deb-src http://il.archive.ubuntu.com/ubuntu gutsy universe multiverse
deb-src http://il.archive.ubuntu.com/ubuntu gutsy-security universe multiverse
 
## CANONICAL REPOSITORY
deb http://archive.canonical.com/ubuntu gutsy partner
 
Next update the currently installed packages.
 
# sudo apt-get update
# sudo aptitude dist-upgrade

Installing applications
Next install some useful programs.
 
# sudo apt-get install openssh-client
# sudo apt-get install openssh-server
# sudo apt-get install wget
# sudo apt-get install joe
# sudo apt-get install unattended-upgrades
 
## NFS, to use Network File System sharing
# sudo apt-get install nfs-common
 
## NTP, to synchronize your server clock with centralized time server
# sudo apt-get install ntp
 
Configuring SSH server
Modify the settings.
 
# sudo jmacs /etc/ssh/sshd_config
 
Personally I want to prevent root connecting thought SSH and allow access only to default user, that I was created during installation.
Look for # Authentications: text and add/replace following configuration options:
 
PermitRootLogin no
AllowUsers imadmin
 
Restart the SSH server.
 
# sudo /etc/init.d/ssh restart
 
Sometimes you may need to limit which hosts can contact the SSH server. Restrictions can be implemented by using the /etc/hosts.allow and /etc/hosts.deny files.
The next allows connections only from trusted networks.
 
# sudo jmacs /etc/hosts.allow
 
# Allow SSH from my own networks
sshd : localhost
sshd : 10.10. 192.168.
sshd : .simenduev.com .planetit.ws
 
# sudo jmacs /etc/hosts.deny
 
# Deny everything by default
ALL : ALL : severity auth.info
 
Installing VMware Server
VMware Server is a free virtualization software which enables you to run Windows, BSD and Linux on your Linux server. With VMware Server it's possible to access the virtual machines remotely as the VMware Server is always running in the background on the server. The server does not even need X server installed.
 
First install some packages needed during the installation.
 
# sudo apt-get install xinetd
# sudo apt-get install build-essential
# sudo apt-get install linux-kernel-headers
# sudo apt-get install libX11-dev
# sudo apt-get install libxtst6
# sudo apt-get install libxt6
# sudo apt-get install libice6
# sudo apt-get install libsm6
# sudo apt-get install libxrender1
# sudo apt-get install libxi6
 
If you installed 64-bit version of Ubuntu:
# sudo apt-get install ia32-libs
 
If you installed from the Ubuntu Server Installation CD
# sudo apt-get install linux-headers-server
 
If you installed from Desktop or Alternate Installation CD
# sudo apt-get install linux-headers-generic
 
If you want to use VLANs, then install support for VLANs
# sudo apt-get install vlan
# sudo echo "8021q" >> /etc/modules
 
Download VMware Server from http://www.vmware.com/download/server/
Select .tar.gz packages for both Server and Management Interface.
 
Install the VMware Server.:
# mkdir ~/vmware
# tar xzvf VMware-server-1.0.4-56528.tar.gz -C ~/vmware
# cd ~/vmware/vmware-server-distrib
# sudo ./vmware-install.pl
And follow the installation script questions.
 
Install Management Interface:
# tar xzvf VMware-mui-1.0.4-56528.tar.gz -C ~/vmware
# cd ~/vmware/vmware-mui-distrib
# sudo ./vmware-install.pl
And follow the installation script questions.
               
The VMware Management Interface's startup scripts (/etc/init.d/httpd.vmware and /usr/lib/vmware-mui/src/lib/httpd.vmware) have a bug which makes the Apache server start fail after reboot.
To fix the script, follow the instructions below:
 
# sudo cp /etc/init.d/httpd.vmware /etc/init.d/httpd.vmware.orig
# sudo jmacs /etc/init.d/httpd.vmware
 
Go to line 200, find:
echo -ne "$rc_failed"
Replace with:
/bin/echo -ne "$rc_failed"
 
Go to line 208, find:
echo -ne "$rc_failed"
Replace with:
/bin/echo -ne "$rc_failed"
 
Go to line 244, find:
      USE_SSL="-DSSL_ONLY"
   fi
Below it, add:
   mkdir -p /var/run/vmware/httpd
   chown www-data:nogroup /var/run/vmware/httpd
 
Find:
 start)
        vmware_exec "Starting httpd.vmware:" vmware_start_httpd
Replace with:
        echo -n "   Starting httpd.vmware: "
        vmware_start_httpd
        if [ "$?" -gt 0 ]; then
            vmware_failed
        else
            vmware_success
        fi
        echo
 
Find:
 stop)
        vmware_exec "Shutting down http.vmware: " vmware_stop_httpd
Replace with:
        echo -n "   Shutting down http.vmware: "
        vmware_stop_httpd
        if [ "$?" -gt 0 ]; then
            vmware_failed
        else
            vmware_success
        fi
        echo
 
Finally copy these files also to /usr/lib/vmware-mui/src/lib/:
# cp /etc/init.d/httpd.vmware /usr/lib/vmware-mui/src/lib/
# cp /etc/init.d/httpd.vmware.orig /usr/lib/vmware-mui/src/lib/
 
In case is your company using firewalls (like mine), ensure that the following ports are opened to you:
902 TCP                VMware remote access authentication daemon
8222 TCP              VMware management interface (HTTPS)
8333 TCP              VMware management interface (HTTPS)
 
VLAN interfaces:
Do not use VLAN tag more than 999 (3 digits), VMware Server has a  bug which makes it fail when connecting to a VLAN interface if the interface name is longer than 8 characters.
I will update the article later with how to overcome this bug.

 


Comments

No comments posted.

Add Comment



Enter the code shown:

Visual CAPTCHA