Wednesday, 8 January 2014

CCNP Basics | IT HELP (CCNA,CCNP,MCSE,LINUX,VMWARE,CLOUD MGN)

|0 comments

Thursday, 18 July 2013

How to launch VMware Player VMs without GUI

|0 comments

How to launch VMware Player VMs without GUI

 

I assume that you have already created a VM using VMware Player, and so have *.vmx files ready somewhere. Now you want to start/stop the VM using vmrun. You don’t need root permission to use vmrun command.
First, download VMware VIX for Linux, and then install it on the VMware host as follows.
$ chmod 755 ./VMware-VIX-1.11.0-471780.x86_64
$ sudo ./VMware-VIX-1.11.0-471780.x86_64
To start VM:
$ vmrun -T player start /path/to/vm/my.vmx nogui
To reboot VM:
$ vmrun -T player reset /path/to/vm/my.vmx soft
To power off VM:
$ vmrun -T player stop /path/to/vm/my.vmx soft
VMware Player does not support VM snapshot operations. So you cannot take a snapshot of VMware Player VMs using vmrun. But if your VM was created using VMware Workstation or VMware Fusion, you can take a snapshot of a running VM as follows.
$ vmrun -T ws (or fusion) snapshot /path/to/vm/my.vmx my_snapshot

 

 

Wednesday, 3 July 2013

How do I backup MySQL in Linux?

|0 comments
How do I backup MySQL in Linux?



1. Copying from the mysql directory
By default, MySQL databases on servers that use Linux are stored in the following directory:
/var/lib/mysql/
If you shut down the mysqld service first, you can copy your databases to an example /backup directory using the following command:
cp –Rp /var/lib/mysql/*.* /backup

The –R switch for the cp command means recursive, which you want to use because each database is in a separate directory. The –p switch is for permissions, which will maintain the permissions of what is copied.
You generally want to shutdown the mysqld service before using the above method because if a database is copied while it is actively being used, the resulting backup will be corrupt and therefore worthless. If you are certain none of the databases are not being used at the time, you can use the above command.

2. The mysqldump command
The mysqldump command lets you back up both individual databases and all databases on a server without having to shutdown the mysqld service. Because of this ability to make backups while still keeping databases online, this method is preferred.

Individual databases
An example command that would let you back up a database named example to the directory /backup while logged in as root is as follows:
mysqldump example > /backup/example_backup.sql

Unless it is a small database, it is recommended that you then compress the resulting database backup in order to reduce the amount of time necessary to transfer the backup. The following command would compress the backup of the example database:
tar czvf /backup/example_backup.tar.gz /backup./example_backup.sql

All database
If you have numerous databases and backing all of them up individually would be too time consuming, the following command will backup all MySQL databases on your server to the /backup directory:
mysqldump -A > /backup/databases.sql(or --all-databases)
The –A switch (“-all-databases” performs the same function) will dump any and all databases on the server.

How to Reset CentOS root Password

|0 comments


How to Reset CentOS root Password

For those who are forgot their CentOS root password, please do not panic. There was the easy way to reset the root password for CentOS. Please follow this steps and you will be able to access your CentOS.
1. Reboot the CentOS machine
2. When booting up, press any key to go into the select menu.
3. The press ‘e’ to navigate to second grub.conf line (kernel)
4. Once again press ‘e’ to edit the line and you can select one step from these option :
  • option 1 : 1 (’1′) at the end of the line. OR
  • option 2: S (‘S’) a the end of the line OR
  • option 3: add ‘single’ to “ro root=LABEL=/ single”
5. After edit, hit “ENTER
6. Press ‘b’ to reboot
7. After reboot it will stop at ‘#’ command line.
8. At ‘#’ command line, type ‘passwd’ to create new password.
9. Reboot machine as usual
10 Finish

How to Enable CentOS Desktop

|0 comments


CentOS: Enable CentOS GNOME Desktop





Mostly the CentOS servers that I am using is run on CLI (Command-Line Interface) mode. But in some cases, I need to have a desktop to install some applications with GUI (Grapich User Interface) mode. In this case, I will use GNOME, the most popular user-friendly desktop for any UNIX based system.
Variable that I used as below:
OS: CentOS 6.2 64bit
Desktop environment: GNOME
1. Using yum, we will need to install X Windows System  as the based for GUI and rich input device capability:
$ yum groupinstall -y 'X Window System'
2. Only then we can install GNOME desktop environment on top of it:
$ yum groupinstall -y 'Desktop'
3. Since previously the server is running on CLI mode, we need to change some value to tell CentOS to boot up in the GUI mode. Open /etc/inittab via text editor and change following line:
id:3:initdefault:
To:
id:5:initdefault:
4. Reboot:
$ init 6
Note: You can switch from GUI to CLI mode manually by using following method:
GUI to CLI: Ctrl + Alt + F6
CLI to GUI: Ctrl + Alt + F1
If you want to start the desktop from CLI console (not SSH session), use following command:
$ startx
In some cases, when you login into the system via GUI, you will see some kind of weird boxes replacing the fonts. You can overcome this problem by installing fonts group via yum:
$ yum groupinstall -y fonts