lunedì 11 novembre 2013

RedHat CentOS setting Date and Time

Date and Time Setup
The date command allows the superuser to set the system date and time manually:
Change the current date. Type the command in the following form at a shell prompt, replacing the YYYY with a four-digit year, MM with a two-digit month, and DD with a two-digit day of the month:

~]# date +%D -s YYYY-MM-DD

For example, to set the date to 2 June 2010, type:
~]# date +%D -s 2010-06-02

Change the current time. Use the following command, where HH stands for an hour, MM is a minute, and SS is a second, all typed in a two-digit form:

~]# date +%T -s HH:MM:SS

If your system clock is set to use UTC (Coordinated Universal Time), add the following option:
~]# date +%T -s HH:MM:SS -u
For instance, to set the system clock to 11:26 PM using the UTC, type:
~]# date +%T -s 23:26:00 -u

Change TimeZone Using /etc/localtime File

For this example, assume that your current timezone is UTC as shown below. You would like to change this to Pacific Time.
# date
Mon Sep 17 22:59:24 UTC 2010
On some distributions (for example, CentOS), the timezone is controlled by /etc/localtime file.
Delete the current localtime file under /etc/ directory
# cd /etc
# rm localtime
All US timezones are located under under the /usr/share/zoneinfo/US directory as shown below.
# ls /usr/share/zoneinfo/US/
Alaska          Arizona         Eastern         Hawaii          Michigan        Pacific
Aleutian        Central         East-Indiana    Indiana-Starke  Mountain        Samoa
Note: For other country timezones, browse the /usr/share/zoneinfo directory
Link the Pacific file from the above US directory to the /etc/localtime directory as shown below.
# cd /etc
# ln -s /usr/share/zoneinfo/US/Pacific localtime
Now the timezone on your Linux system is changed to US Pacific time as shown below.
# date
Mon Sep 17 23:10:14 PDT 2010

Redhat CentOS disable iptables Firewall

How Do I Disable Firewall?

First login as the root user.






Check if firewall is running



#service iptables status

Next enter the following three commands to disable firewall.

# service iptables save
# service iptables stop
# chkconfig iptables off


If you are using IPv6 firewall, enter:

# service ip6tables save
# service ip6tables stop
# chkconfig ip6tables off

Redhat CentOS mount USB key

TO MOUNT A USB KEY
insert key
dmesg to see the device name that can be any sb-b-c-d depending on your system.

mount /dev/sdb1 /

Remember the "1" after sdb

RedHat CentOS mounting virtual-phisical cdrom-dvdrom

When you plug the external USB drive in you should see messages like these from 'dmesg'

usb 1-2.3: USB disconnect, address 8
usb 1-2.3: new high speed USB device using ehci_hcd and address 9
scsi6 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 9
usb-storage: waiting for device to settle before scanning
Vendor: LITE-ON Model: DVDRW SHW-1635S Rev: YS0J?
Type: CD-ROM ANSI SCSI revision: 00
sr0: scsi3-mmc drive: 48x/48x writer cd/rw xa/form2 cdda tray
Attached scsi CD-ROM sr0 at scsi6, channel 0, id 0, lun 0
usb-storage: device scan complete

If you don't see the 'Vendor' stuff there's nothing that can be done. Your drive/enclusure combination do not work together. This isn't a Linux issue but a Firmware/BIOS issue between the drive and enclosure. Try another drive/enclosure combination, or give up.

If you seen the 'Vendor' stuff and the message regarding 'Attached scsi CD-ROM sr0' then you may be in luck! Linux recognised the drive and has attached it.

Put a CDROM or DVDROM in the drive and attempt to mount it.

    mount -t iso9660 -o ro /dev/sr0 /mnt

(you may have another device name. I have seen /dev/scd0)

No returned errors will mean that you have successfully mounted the CDROM under /mnt.

Any error about missing block device will mean that you need to install and load some kernel modules.

RedHat Centos Network configuration (CLI)

Set Default gateway:
insert in /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=
GATEWAY=

##############################################################################
Backup existing static configuration

First backup existing network configuration file using cp command:
# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /root/ifcfg-eth0.bak

Configuring a DHCP Client

Setting up a Linux for dhcp can be done by editing file using a text editor such as vi:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0

Following is sample static configuration:
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:19:D1:2A:BA:A8
IPADDR=10.10.10.10
NETMASK=255.255.255.0
ONBOOT=yes

Replace static configuration with DHCP:
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:19:D1:2A:BA:A8
ONBOOT=yes

Save and close the file. Just restart network service:
# /etc/init.d/network restart

Please note that you need a configuration file for each device that you want to configure to use DHCP.Backup existing static configuration

First backup existing network configuration file using cp command:
# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /root/ifcfg-eth0.bak


Save and close the file. Just restart network service:
# /etc/init.d/network restart

Please note that you need a configuration file for each device that you want to configure to use DHCP.

lunedì 10 giugno 2013

Amd Fusion E-350 epia boards Ubuntu Drivers.


http://en.wikipedia.org/wiki/AMD_Catalyst#Linux

Type in the following.





  1. sudo apt-get update
  2. sudo apt-get install fglrx-updates

worked fine for me. Solved slow machine wile file copy. smb slow transfer.

lunedì 18 marzo 2013

VMWARE Powering on a virtual machine from the command line

ESXi 5.0

To power on a virtual machine from the command line:
  1. List the inventory ID of the virtual machine with the command:

    vim-cmd vmsvc/getallvms |grep
    Note: The first column of the output shows the vmid.

  2. Check the power state of the virtual machine with the command:

    vim-cmd vmsvc/power.getstate
  3. Power-on the virtual machine with the command:
    vim-cmd vmsvc/power.on

ESXi 4.1

To power on a virtual machine from the command line:
  1. List the inventory ID of the virtual machine with the command:

    vim-cmd vmsvc/getallvms |grep

    Note: The first column of the output shows the vmid.
  2. Check the power state of the virtual machine with the command:

    vim-cmd vmsvc/power.getstate
  3. Power-on the virtual machine with the command:

    vim-cmd vmsvc/power.on

ESXi 4.0

To power on a virtual machine from the command line:
  1. List the inventory ID of the virtual machine with the command:

    vmware-vim-cmd vmsvc/getallvms |grep
    Note: The first column of the output shows the vmid.
  2. Check the power state of the virtual machine with the command:

    vmware-vim-cmd vmsvc/power.getstate
  3. Power on the virtual machine with the command:

    vmware-vim-cmd vmsvc/power.on

ESX 4.0 and ESX 4.1

To power on a virtual machine from the command line:
  1. To list the path of all the virtual machines on the host:

    vmware-cmd -l
  2. Get the state of the virtual machine with the command:

    vmware-cmd getstate
  3. Power on the virtual machine with the command:

    vmware-cmd start

ESXi 3.5

To power on a virtual machine from the command line:
  1. List the inventory ID of the virtual machine with the command:

    vim-cmd vmsvc/getallvms |grep
  2. Check the power state of the virtual machine with the command:

    vim-cmd vmsvc/power.getstate
  3. Power on the virtual machine with the command:

    vim-cmd vmsvc/power.on

ESX 3.5

To power on a virtual machine from the command line:
  1. To list the path of all the virtual machines on the host:

    vmware-cmd -l
  2. Get the state of the virtual machine with the command:

    vmware-cmd getstate
  3. Power on the virtual machine with the command:

    vmware-cmd start