I tried to install webmin by following the instructions on http://www.webmin.com/rpm.html but I got the following error messages:
# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.730-1.noarch.rpm
# wget http://www.webmin.com/jcameron-key.asc
# rpm -Uvh webmin-1.730-1.noarch.rpm
Preparing… ################################# [100%]
Unable to identify operating system
error: %pre(webmin-1.730-1.noarch) scriptlet failed, exit status 2
error: webmin-1.730-1.noarch: install failed
To fix the problem, I did the following (thanks to kayvan):
# mv /etc/redhat-release /etc/redhat-release.bak
# echo “Fedora release 20 (Heisenbug)” > /etc/redhat-release
# rpm -Uvh webmin-1.730-1.noarch.rpm Preparing…
# ################################ [100%]
Operating system is Fedora Linux
Updating / installing…
# ################################# [100%]
Webmin install complete. You can now login to http://pidora.local:10000/
as root with your root password.
# mv -f /etc/redhat-release.bak /etc/redhat-release
Webmin should work fine. It will only report the version to be “Fedora Linux 20”
You should be able to live with that!
You may want to use the current version of webmin:
Using the Webmin YUM repository is another alternative to keep things clean and automatically updated.
If you like to install and update Webmin via RPM, create the /etc/yum.repos.d/webmin.repo file containing :
name=Webmin Distribution Neutral
You should also fetch and install my GPG key with which the packages are signed, with the commands :
rpm –import jcameron-key.asc
You will now be able to install with the command :
yum install webmin
All dependencies should be resolved automatically.
Posted in Linux, pidora, Raspberry Pi, Recent Posts and tagged Linux, pidora, Raspberry Pi by Stan with .
Posted in CentOS, Linux, Linux Installation and tagged CentOS, Linux, Netinstall by Stan with .
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:
- 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
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)
To mount the device, first create a folder
mount the device with
mount -t ext3 /dev/sda1 /ExtUSB/
3.) After using the device, run the following command to start the usbarbitrator service
We are done!
Posted in ESX, ESXi, Linux, VMware and tagged esx, esxi vmware, Linux by Stan with .
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.
- 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:
- 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 ” “)
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
- Check the to see that the new partition is mounted as expected by typing
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’.
- 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:
tar -czvf [vm_name].tar.gz *.vmx *.log *.nvram *.vmxf *.vmsd
cp [vm_name].tar.gz /mnt/usb/
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 the Data Storage
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)
cp /ExtUSB/[vm_name].tar.gz VMK-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:
Now, go ahead and start your VM machine. If carefully done, it should work as expected.
Posted in ESX, ESXi, Linux, VMware and tagged esx, esxi, Linux, vmware by Stan with .
Posted in Linux and tagged cd, disable, dvd, Linux, usb by Stan with .
Posted in Windows and tagged cd, disable, dvd, Linux, usb by Stan with .
I recently used the netinstall CentOS CD to install one of my Linux systems. During the installation process, I decided to install CentOS 6.3 minimal to quiken the overall install process. After the successful installation, I decided it was time to add Gnome/GUI to the system. The following were the steps taken to achive this task.
First, it is worth mentioning that there are two versions of this installation.
a.) Short version
b.) Long version
a. ) Short version:
Start a new terminal and enter the following:
yum -y groupinstall basic-desktop basic-platform x11 fonts
b.) Long version:
yum -y install “Desktop” “Desktop Platform” “X Window System” “Fonts”
That’s it! It will work regardless the method used 😉
Posted in CentOS, Linux, Linux Installation and tagged CentOS, centos 6.3, gnome, gui, Linux, minimal by Stan with .
Most linux distribution uses the zero configuration network ( ZEROCONF) suite to automatically configure themselves and communicate on a network without the need of DHCP or DNS servers. ZEROCONF is an IETF organ that planned and coordinated a series of dynamic protocols to allow many operating systems to automatically configure themselves.
ZEROCONF commonly referred to as IPv4 Link-Local (IPv4LL) and Automatic Private IP Addressing (APIPA) utilises the 169.254.0.0/16 network address to auto-configure a network interface. It uses a series of unanswered “ARP” queries and then assumes an address if the queries yield an empty result. As a result, a route to the ZEROCONF network is added to the routing table by the network initscripts. Example:
ZEROCONF can be disabled by adding the following entry to the “/etc/sysconfig/network” configuration file.
|[bash] # vi /etc/sysconfig/network|
|NOZEROCONF=yes or no (either answer will disable the “ZEROCONF route”)|
It is important to note that the value of the “NOZEROCONF” parameter can actually be set to any value. The initscripts can only check to determine whether the parameter has a zero length or not. In other words, setting “NOZEROCONF=no” will have the same effect as setting it to “yes”. In order to reactivate ZEROCONF, the above entry “NOZEROCONF=yes/no” will have to either be commented out or removed entirely.
The network service must be restarted for the changes above to take effect.
|[bash] # vi /etc/init.d/network restart|
To see if the ZEROCONF route has been disabled, we have to check the routing table again.
If you ever wonder and want to know more about the the makeup and history of the ZEROCONF, check this very informative zeroconf article written by John C. Welch and this zeroconf article on wikipadia.
Posted in CentOS, ESX, ESXi, Linux and tagged Linux, ZEROCONF by Stan with .
A swap file is an ordinary file that is in noway special to the kernel. The purpose of the swap file is to reserve the disk space so that the kernel can quickly swap out a page without having to go through all the things that are necessary when allocating a disk sector to a file.Because a hole in a file means that there are no disk sectors allocated (for that place in the file), it is not good for the kernel to try to use them.
In order to create the swap file without holes, use the following command:
1.) Assuming we want to create a swap file with 2GB size (1024 x 1024 x 2 = 2097152).
|[bash]# dd if=/dev/zero of=/swapfile bs=1024 count=2097152|
where if is source, of is output file for dd to write to which is /swapfile in this case, bs is read/write byte size at a time and count is number of blocks.
2.) The next step is to make it a swap file
|[bash]# mkswap /swapfile|
3.) Activate the swap file
|[bash]# swapon /swapfile|
4.) Check the newly created swap space usinf free or top
|[bash]# free -m|
5.) Write it to fstab to make it available for the system even after a reboot
|[bash]# echo “swapfile swap swap defaults 0 0“ >> /etc/fstab|
**) Using cat give you the following output:
|[bash]# cat /etc/fstab|
|/swapfile1 swap swap defaults 0 0|
Posted in CentOS, ESX, ESXi, Linux and tagged Linux, Swap by Stan with .
CUPS – Common Unix Printing System is a modular printing system for unixlike computer operating system which allows a computer to act as a print-server. A computer running CUPS is a host that accept print jobs from client computers, process them and send them to the appropriate printers.
CUPS was initially developed by a guy called Michael Sweet and the protocol used back then was LPD. Due to LPD limitations and vendors incompactibility, it was replaced with IPP (internet printing protocol). CUPS was quickly adopted by various linux distributions as the default printing system. Notable among them were Red Hat Linux, Fedora, SuSE, Mandrake and in March 2002, Apple joined (using CUPS as printing system for Mac OS X 10.2). In February 2007, Apple hired chief developer Michael Sweet and purchased CUPS source code.
Now, let’s proceed with the step-bystep installing and configuring CUPS
Step #1 – Install cups service
a.) # su –
b.) # yum -y install cups
Step #2 – Configuration
a.) # vi /etc/cups/cupsd.conf
The default CUPS configuration limits access only to the local machine (cups server). If you wish to open up the access, edit /etc/cups/cupsd.conf and comment out the following lines:
Order deny, allow
Deny from all
Allow from 127.0.0.1
b.) #vi /etc/cups/cupsd.conf
I’m not sure if this is advicable but if you wish to avoid password authentication, you need to edit and comment out the following lines:
These lines above restrict the printer access to system users.
Step #3 – Restart the CUPS server
# service cups restart
To be continued…
Posted in Linux, Linux Installation, samba and tagged CUPS, Linux, Samba by Stan with .