CentOS: How To Create a Local VMware Repository


image_thumb1[1] image_thumb[1]

The first step is to configure the repository server. Before you can start, you have to install the createrepo package. Just run the following command:

yum install createrepo

If you didn’t already, also install Apache on the Server that’s hosting the repository.

Let’s create a folder structure so we can place the rpm’s on the server. In case you want create a repository for 32 bit and 64 bit CentOS. You have to create a i386 and a x86_64 directory.

i368:

/var/www/html/repo/centos/5/i386/vmware

Upload your rpm files to the vmware directory and run the createrepo command:

createrepo /var/www/html/repo/centos/5/i386/vmware/

x86_x64

/var/www/html/repo/repo/centos/5/x86_64/vmware

Upload your rpm files to the vmware directory and run the createrepo command:

createrepo /var/www/html/repo/centos/5/x86_64/vmware/

The next step is to test the repository. Just open your favorite web browser and browse to the url. In my case this is: http://distribution.ict-freak.local/repo/centos/5/i386/vmware.

image

If this works, your local vmware repository is ready for action. But first we need to add the repository on the client side.

Open the following file in your favorite text editor

/etc/yum.repos.d/vmware_local.repo

Add the following lines and edit the baseurl so it will match your environment.

[vmware_local]
name=Uniserver CentOS-$releasever-$basearch
baseurl=http://distribution.ict-freak.local/repo/centos/$releasever/$basearch/vmware/
gpgcheck=0
enabled=1

Save the vmware_local.repo file and run the yum update command.

image

Now you’re ready to install packages from the vmware_local repository. Let’s install VMware server 2.0.2-203138 by running the following command:

yum install VMware-server

The install process will start:

image

When you also upload the VMware Tools rpm file, you can install or update the package with the following commands:

Install:

yum install VMwareTools

Update:

yum update VMwareTools

When you need to upgrade de VMware Tools, the only thing you have to do is upload the new rpm file and run the yum update command. The finals step is to run the vmware-config-tools.pl script. But this step can be replaced by the check-vmware-tools script. More info about this script can be found here: http://bit.ly/97fpcD

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s