Mount DVD as YUM Repo

August 20th, 2009

We need several packages to create yum repository, you can install them from CD/DVD disks or ISO images.

# yum install createrepo wget

# cd /mnt # createrepo .
Mount your CD/DVD or ISO images
DVD Disk or DVD ISO image

* If you have DVD disk, please mount dvd-rom first, and then create yum repository:

# mkdir /mnt/dvd/
# mount /dev/cdrom /mnt/dvd/

* If you use DVD iso, please copy it to the system, and then create yum repository:

# mkdir /mnt/dvd/
# mount -o loop /root/rhel5.1-dvd.iso /mnt/dvd

CD images

If you have multiple CD image files, you should mount all iso images and then create yum repository.

* Mount all iso images:

# mkdir -p /mnt/{1,2,3,4,5}
# mount -o loop rhel5.1-disc1.iso /mnt/1
# mount -o loop rhel5.1-disc2.iso /mnt/2
# mount -o loop rhel5.1-disc3.iso /mnt/3
# mount -o loop rhel5.1-disc4.iso /mnt/4
# mount -o loop rhel5.1-disc5.iso /mnt/5

Install necessary package

* Find and install ‘createrepo’ package in /mnt directory:

# find /mnt -iname ‘createrepo*’
/mnt/dvd/Server/createrepo-0.4.11-3.el5.noarch.rpm

# rpm -ivh /mnt/dvd/Server/createrepo-0.4.11-3.el5.noarch.rpm

Create yum repository
Create metadata

* Create yum repository:

# cd /mnt/
# createrepo .

Define yum repository

Create yum repository define file /etc/yum.repos.d/dvdiso.repo:

[MailRepo]
name=MailRepo
baseurl=file:///mnt/
enabled=1
gpgcheck=0

Test it

# yum clean all
# yum list




Install FreeType Support for DirectAdmin

August 20th, 2009
# install freetype-devel
yum install freetype-devel -y

# patch the build script
cp -f /usr/local/directadmin/customapache/build /usr/local/directadmin/customapache/build.bak
cat /usr/local/directadmin/customapache/build.bak | sed "s/without-freetype/with-freetype/g" > /usr/local/directadmin/customapache/build
chmod 755 /usr/local/directadmin/customapache/build

cd /usr/local/directadmin/customapache
./build gd -y

POST Install X Windows

August 20th, 2009

yum groupinstall “groupname” yum groupinstall “X Window System” “GNOME Desktop Environment”

 

 

 


How to get Linux to re-read partition without Reboot

August 20th, 2009

Run this command

partprobe

Upgrade to PHP 5.2 in CentOS 5.3

July 23rd, 2009
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

Change VMWare Workstation Screen Resolution

July 7th, 2009

I’m a noob and I’ve just ‘battled’ with this same problem, having just installed Hardy. This is how I solved it.
My setup is a laptop 1280×800 connected to a external screen 1680×1050.
I need to have laptop resolution available when mobile and large resolution when connected to external.

1280×800 (this was found in the ubuntu forums - can’t remember the post.
——–
In Vmware server console, diasble the tick options in View menu:
-disable View->AutofitWindow
-disable View->AutofitGuest

Start the XP guest.
In VMWare server console choose View->FitGuestNow

This creates a registry entry on the guest.

In the XP guest, start regedit.
Navigate to:
HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Control->Video->a number of GUID

Note a GUID is a global unique identifier term used by microsoft and is a set of long digits.
In one of the GUID id’s is a key folder ‘0000′
In this folder, choose key type REG_SZ named Resolution.kvm and enter (modify) to 1280×800
N.B.> there may be more than one guid available with the key folder ‘0000′ containing the key value name Resolution.kvm, so I chose to change all instances of that key value.

Close regedit. The resolution is now available following xp reboot

1680×1050 (from vmware knowledge base)
———
In the .vmx file of the vmware image (you need to switch off the vm image) append to the bottom the following:
svga.maxWidth = 1680
svga.maxHeight = 1050
svga.vramSize = 7056000

By the way, the vramSize value is obtained by multiplying by 4 the resolution value i.e. 1680×1050x4
So that maximum reslution is now available.

This is a rubbish solution to what should NOT be a problem, but it got me there in the end.

Thanks for that - been trying for ages to find something that could give me my 1280×768 resolution. Your method worked flawlessly.

Although, I do have to wonder why 1280×768 wouldn’t be one of installed options, as it’s quite a common widescreen resolution…


Upload ISO files into XenServer 5.5

June 28th, 2009

1) SCP the ISO files into the folder called /ISO or any folders that you like

2) symbol link it.
====
cd /var/opt/xen/iso_import
ln -s /opt/xensource/packages/iso/CentOS-5.3-i386-bin-DVD.iso .
====

3) rescan the ISO files folder.in order to have it appear under the XenServer Client Console

xe sr-create name-label=ISOs type=iso device-config:location=/var/opt/xen/iso_import device-config:legacy_mode=true content-type=iso

Done

Install PDO MySQL under CentOS 5.3

June 27th, 2009

# yum install php-devel php-pear mysql-devel httpd-devel
# pecl install pdo
# PHP_PDO_SHARED=1 pecl install pdo_mysql

add php.ini

extension=pdo.so
extension=pdo_mysql.so

# apachectl restart

Enable HTTPS in Zimbra’s WebMail

June 24th, 2009

zmtlsctl https
tomcat stop
tomcat start

How to activate the Tomcat Engine

June 20th, 2009

yum install tomcat5 tomcat5-jsp tomcat5-webapps -y