CentOS 6.4 Netinstall

Download the network installation iso file and burn to CD.
Place the CD in the CD-Rom and reboot the system.
When ask to select the network install method, choose “HTTP” and enter the following:

1) for 32 Bit
Host: mirror.centos.org
Directory: centos/6.4/os/i386

2) for 64 Bit
Host: mirror.centos.org
Directory: centos/6.4/os/x86_64

Posted in CentOS, Linux, Linux Installation and tagged , , by with comments disabled.

VirtueMart – Terms Of Service on Joomla 2.5.9 Doesn’t Work

Just as indicated in my earlier post, I’m having troubles making the ToS on my customer’s site work. I later got an idea from VirtueMart forum. Actually, my problem was not having a link to the ToS and got this fixed by editing the laguage file for virtuemart component. If you have similar problems just follow these steps:

1.) Use your favourite editor to open language/en-GB/en-GB.com_virtuemart.ini

2.) Search for “COM_VIRTUEMART_CART_TOS_READ_AND_ACCEPTED” (line 99 on Joomla 2.5.9/VirtueMart 2.0.18a)

3.) Edit and change to:

     <a href=http://www.mydomain.com/index.php/path-to-ToS target=”_new”>Click here to read terms of service and check the box to accept them.</a>

Your ToS should now be linked properly.

 

*) If you use a different language outher than english, you need to change the settings also in that language file same like above but translated as wished. My customer’s web site uses german as the default language for example and the settings is as follows:

1.) Use your favourite editor to open language/de-DE/de-DE.com_virtuemart.ini

2.) Search for “COM_VIRTUEMART_CART_TOS_READ_AND_ACCEPTED” (line 99 on Joomla 2.5.9/VirtueMart 2.0.18a)

3.) Edit and change to:

     <a href=http://www.mydomain.com/index.php/path-to-ToS target=”_new”>Bitte lesen und bestätigen Sie Ihr Einverständnis mit den <em>Allgemeinen Geschäftsbedingungen</em>.</a>


Posted in VirtueMart, Web Design and tagged , , by with 1 comment.

VirtueMart – Terms-of-Service Checkbox Field Shows Up With ToS Disabled

I’m having troubles making the TOS (Terms Of Service) on my cutomers web site work. After much troubleshooting and research on Google, I discovered that the issue has already been reported  on this forum https://forum.virtuemart.net/. There I found the solution and decided to post it here for future reference. Maybe this might help someone else.

This web site in question is using VirtueMart 2.0.18/Joomla 2.5.9

Problem:

After configuring the “Terms Of Service” (shop –> vendor) and making sure the following are activated, the TOS simply cannot be viewed. On the checkout page, the link to the TOS is same as the main index page. (example: http://www.mysite.com/)

a) Must agree to Terms of Service on EVERY ORDER? [checked] (Configuration –> Checkout)

c) agreed (Configuration –> Shopper Fields –> agreed – checked and click required)

Solution:

As there is not fix at the moment, I decided to disable this feature for now by unchecking option “a and b” above. While the TOS link is removed from the checkout page, the checkbox will remain untill you perform the option “c” make sure “Not Required” ist clicked this time.

 

Summary:

VirtueMart v2.0.18 / Joomla 2.5.9

To disable the “Terms Of Service”, do the following:

a) Must agree to Terms of Service on EVERY ORDER? [unchecked] (Configuration –> Checkout)

b)Show Terms of Service on the cart/checkout? [unchecked]

c) agreed (Configuration –> Shopper Fields –> agreed – checked and click Not Required)

I hope this will help someone in search for solutions to these problems.


Posted in VirtueMart, Web Design and tagged , , by with 2 comments.

Can’t Mount A USB Device On ESX/ESXi Server

You may want to mount a USB device (Key or media) on an ESX server to export or import files (e.g. vmdk). The problem is the USB devices shows up with “lsusb” but is not mounted properly.

The reason for this behaviour is that the ESX/ESXi 4.1 is designed for passthrough to any virtual machine on the system. As such, the usbarbitrator service will always claim external devices plug into the host using the passthrough technology to make it available for the virtual machines. To resolve this issue, the usbarbitrator must be stopped first before the external device can successfully be mounted. In the following steps, I will explain how it’s been done:

Requirement:

  • SSH server must be running on the host (ESX/ESXi)
  • PuTTY or the console of another UNIX/Linux system 

1.) Stop the usbarbitrator service by running this command

/etc/init.d/usbarbitrator stop

2.) Disconnect and reconnect the usb device. The device might be automatically mounted under

/vmfs/volumes/NO NAME/ (just navigate here to export or import your files)

**) If not automatically mounted, use the following commands to find out where the device is connected to (e.g. /dev/sda1)

fdisk -l
tail /var/log/messages

To mount the device, first create a folder

mkdir /ExtUSB

mount the device with

mount -t ext3 /dev/sda1 /ExtUSB/

3.) After using the device, run the following command to start the usbarbitrator service

/etc/init.d/usbarbitrator start

We are done!


Posted in ESX, ESXi, Linux, VMware and tagged , , by with comments disabled.

How To Clean The MSCONFIG Startup

MSCONFIG is a Windows system configuration utility used to manage the startup applications. While this utility does its job of listing all applications (both enabled and disabled), it doesn’t have an option to delete disabled applications even they no long exist as they may already have been uninstalled from the system.

Now, these disabled applications could stay there forever without having any effects on the system but the list could grow very long. If you don’t want this list to continue to grow, you could remove the unwanted items from the list by editing the Windows registry. There are also a number of third party utilities to help take care of these unwanted items on the list. I prefer to directly edit the registry as some of these tools might prove to be harmful.

Locations of the entries in MSConfig:

The enabled/checked items are populated from the following locations:

HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Windows \ CurrentVersion \ Run

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Run

and

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows NT \ CurrentVersion \ Windows

Values named Run & Load

The disabled entries are present in these locations:

HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Shared Tools \ MSConfig \ startupreg

HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Shared Tools \ MSConfig \ startupfolder

To remove these entries, you first have to start the registry editor (regedit.exe), backup the folder MSConfig before deleting the unwanted items’ folders.

After doing this, all the deleted entries should disappear from the MSConfig startup.

Be careful NOT to break your system. Once again remember to backup before deletion.


Posted in Vista, Windows, Windows 7 and tagged , , , by with comments disabled.

How to Export/Import Virtual Machine On ESX Server

We recently updated our hardware (old ESX server) and had to export and import the virtual machines to the new server

In achieving this goal, we had to use an external USB drive to backup and transfer VMDK files from an old ESX server to the new one.

Requirements:

  • External USB drive with enough capacity
  • The drive has to be formated (preferably ext3 or ext4)
  • Coffee, cigarett or anything but no alcohol 😉

Format and Mount the Drive:

 Steps:

  • Connect the external drive to the ESX server
  • Login to the server console using ssh connection (e.g putty)
  • To find out where the device is connected, enter “fdisk -l” (without the quotes ” “)
  1. fdisk -l

 

 

 

 

Note: As seen above, a partition has been created and only need to be formated

  • Format the new drive by typing these commands

  mkfs.ext3 -m 1 /dev/sdb1

 e2label /dev/sdb1 /ExtUSB (optional)

  where sdb1 is the partition shown above and 1 for 1% of the partition for administrative purposes

  for more information, type man mkfs.ext3   

  • Create a folder (mount point) where you want to mount the new drive (Example: mkdir /ExtUSB)
  • mount -t ext3 /dev/sdb1 /ExtUSB

  To make this permanet, type vi /etc/fstab and enter:

  LABEL=/ExtUSB1  /ExtUSB   ext3   defaults        0 0

  Save the file (type  :wq and press ENTER)

  • mount the partition

  mount -a

  • Check the to see that the new partition is mounted as expected by typing

  mount

Export the VM files and Logs to the external USB drive:

Vmktools is the VMware ESX Server file system management tool we used for this task. It is a program for creating and manipulating virtual disks, files systems, logical volumes and physical storage devices on the VMware ESX Server. To export or import VMDK (virtual disk) files, the command to use is ‘vmkstools’.

Export:

  • Enter the following comands as it is to export the VMDK files

  vmkfstools -i /vmfs/volumes/[datastore_name]/[vm_name]/[vm_name].vmdk /mnt/usb/[vm_name].vmdk -d 2gbsparse

  • To also export the configuration files for the virtual machine, just copy all those files with the following extentions: *.vmx, /.log, *.nvram, *.vmxf and *.vmsd. The best way to do this, is to first zip the files in tar.gz format and then copy to the external USB drive as follows:

  cd /vmfs/volumes/[datastore_name]/[vm_name]/

  tar -czvf [vm_name].tar.gz *.vmx *.log *.nvram *.vmxf *.vmsd

  cp [vm_name].tar.gz /mnt/usb/

Import:

Prior to importing the exported files, make sure you have created a new virtual machine (name it whatever you want). The VMDK and other files in the newly created virtual machine must be deleted to avoid conflicts with the ones to be imported. Take a look at these images to get an idea where to find these files:

Browse Data Storage

Browse the Data Storage

Delete VMDK Files

Delete all files from the VM folder as shown above

  • Enter the following comands to import the VMDK files

 vmkfstools -i /[path_to_USB_mount]/[vm_name].vmdk /vmfs/volumes/[datastore_name]/[vm_name]/[vm_name].vmdk

  • To also import the configuration files for the virtual machine, first extract [vm_name].tar.gz file to a folder (should be created first) and just copy all those files with the following extentions: *.vmx, /.log, *.nvram, *.vmxf and *.vmsd to /vmfs/volumes/[datastore_name]/[vm_name]/. The following comands should take care of this task:

  cd ~ (change to home directory)

  mkdir VMDK-Files

  cp /ExtUSB/[vm_name].tar.gz VMK-Files/

  cd VMDK-Files/

 tar -xzvf [vm_name].tar.gz

  rm -rf [vm_name].tar.gz

    cp * /vmfs/volumes/[datastore_name]/[vm_name]/

You can check to see if all files are imported as shown below:

Imported VMDK Files

Now, go ahead and start your VM machine. If carefully done, it should work as expected.

Related Site:

http://www.vladan.fr/


Posted in ESX, ESXi, Linux, VMware and tagged , , , by with comments disabled.

How To Disable CD/DVD ROM And USB Port On Linux Systems

 
There are many methods to do this and I will be covering some of these methods here
These methods has been successfully tested on RHEL and CentOS but I am also sure it will work on many other Linux distributions.
 
Disabling CD/DVD ROM
 
1. Method:
 
A more practical and reversible way is to rename the kernel module
Log into the linux system and enter the following inputs on the system console
 
[root@lnxesx ~]# cd /lib/modules/$(uname -r)/kernel/drivers/cdrom
[root@lnxesx cdrom]# ls
cdrom.ko-ok
[root@lnxesx cdrom]# mv cdrom.ko cdrom.ko-ok
 
Disabling USB Port

1. Method:

Similarly to the method used above for CD/DVD ROM, USB ports can be disabled using same method as well.
 
[root@lnxesx ~]# cd /lib/modules/$(uname -r)/kernel/drivers/usb/storage
[root@lnxesx storage]# ls
ums-alauda.ko   ums-datafab.ko  ums-isd200.ko    ums-karma.ko     ums-sddr09.ko  ums-usbat.ko
ums-cypress.ko  ums-freecom.ko  ums-jumpshot.ko  ums-onetouch.ko  ums-sddr55.ko  usb-storage.ko-ok
[root@lnxesx storage]# mv usb-storage.ko usb-storage.ko-ok
 
2. Method:
 
Grub option
 
You can get rid of all USB devices by disabling kernel support for USB via GRUB. Open grub.conf or menu.lst (Under Debian / Ubuntu Linux) and append “nousb” to the kernel line as follows:
 
kernel /vmlinuz-2.6.18-128.1.1.el5 ro root=LABEL=/ console=tty0 console=ttyS1,19200n8 nousb
 

Posted in Linux and tagged , , , , by with comments disabled.

Enable or Disable CDROM and USB Port On Windows Systems

A common security concern at organizations is allowing users to plug in a usb flash drive, because they could so easily copy corporate data.
 
To Enable or Disable USB port:
 
1. Method:
 
1. Click Start, and then click Run.
2. In the Open box, type regedit, and then click OK.
3. Locate, and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor
4. In the right pane, double-click Start.
5. In the Value data box, type 3 to Enable and 4 to disable, click Hexadecimal (if it is not already selected), and then click OK.
6. Quit Registry Editor.
 
2. Method:
 
Since Windows XP SP2, you can disable writing to USB devices altogether using a simple registry hack. Here it is:
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
“WriteProtect”=dword:00000001
 
You can also just download one of the following registry tweaks to enable or disable writing to USB drives.
 
Enable USB Write
 
Disable USB Write
 
Once you use the registry hack, you will have to reboot for the changes to take effect. One should also note that if you are using this trick, you should make sure that the users are not administrators on the computer, because they could easily change this setting back.
 
This works on Windows Vista as well. Here’s the window you’ll get when you try and write to a USB drive: 
 
 
To Enable or Disable CD/DVD  ROMport:
 
1. Click Start, and then click Run.
2. In the Open box, type regedit, and then click OK.
3. Locate, and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\cdrom
4. In the right pane, double-click Start.
5. In the Value data box, type 1 to Enable and 4 to disable, click Hexadecimal (if it is not already selected), and then click OK.
6. Quit Registry Editor.
 

Posted in Windows and tagged , , , , by with comments disabled.

Fixing the BIND (named) Service Bug – Generating /etc/rndc.key

I must admit, I have never had this bug for a very loong time. I thought It must have been fixed or rather removed all together. It was first reported with RHEL 6.1 and was removed as commented here by the developers.

However, I came accross this bug again while trying configure one of my DNS servers running on CentOS 6.3. The DNS (named) service always stopped on the following

Problem:

#service named restart

Generating /etc/rndc.key:

Solution:

Just exceute the following command:

#rndc-confgen -a -r /dev/urandom

and if you’re runing chroot under /var/named/chroot, you must add “-t /var/named/chroot” to the command above. It should look like this:

#rndc-confgen -a -r /dev/urandom -t /var/named/chroot

More description to rndc-confgen can be found here

You should be able to start DNS (named) service after executing these commands.

Good luck 😉


Posted in Linux and tagged , , , , by with 2 comments.

CentOS 6.3 NetInstall

Download the network installation iso file and burn to CD.

Place the CD in the CD-Rom and reboot the system.

When ask to select the network install method, choose “HTTP” and enter the following:

1) for 32 Bit
Host: mirror.centos.org
Directory: centos/6.3/os/i386

2) for 64 Bit
Host: mirror.centos.org
Directory: centos/6.3/os/x86_64


Posted in CentOS, Linux, Linux Installation and tagged , , , by with comments disabled.