Thursday, 24 July 2014

Creating a virtual machine in VMware

                 Creating a new virtual machine in VMware Workstation 8


1. On creating Virtual Machine we can attach /detach the hardware devices i.e., we can enhance the existing      configuration.
2. We can create a Virtual Machine in two ways.
a.       Go to file menu and click on New Virtual Machine or ctrl + N.
b.      Default home page of VMware have an option create new virtual machine click on this.




3. Select type of configuration to create a virtual machine. 
     Typical will configure the machine some options automatically. 
     Always select custom to configuration the machine settings manually.







4. Always select last option for configuring a virtual machine.
    If we select 1 and 2 options will not let you to configure machine manually, it automatically install OS.


5. Select Guess OS by selecting the version and machine configuration i.e., 32 bit or 64 bit.



6. Assign a name for newly created virtual machine and provide the location to store virtual machine.



7. Virtual machine Processor configuration and number of cores per processor based on requirement.



8. Assigning memory i.e., RAM for virtual machine.



9. Network adapter configuration for network connections.




10. Select the type of input output controllers, always select recommended option.




11. Creating a hard disk for guest OS.


12. While creating hard disk, select hard disk type i.e., SCSI (small computer system interface).



13. Hard disk size, select store virtual disk as a single file.


14. On assigning hard disk size it creates file with extension as .vmdk (virtual machine disk).


15. Complete machine configuration of virtual machine i.e., (Guest OS).
      


16. All the above, for creating and setup hardware configuration. i.e., A Guest virtual machine created with         hard ware compatibility.  
      To install OS on Guest virtual machine, click on cd/dvd.




17. We have Connection through which OS will installed.
       If we want to install OS on Guest virtual machine through cd/dvd select use physical drive.
       If we want to install OS on Guest virtual machine through OS image files select use ISO image file and 
        browse the image file from the system and select it and click on ok.
       It is important to remember for selecting connect at power on option, Otherwise OS image file will not 
       be detected.   



    To install Guest OS in all the variant versions of VMware is similar to above process.
    If any questions related to these Post,will do post comments..


   Thank You.


Saturday, 12 July 2014

Extending partition in the VirtualBox

Today we have faced new problem in the Oracle Virtual Box. When we tried to install weblogic 12c on the Ubuntu Guest platform, got the following error.

You can extend the disk space by creating the new disk and adding it to the existing diskspace.


1. Creating new disk for Oracle Virtual Box
Processor changes in for Virtual Machine in Virtual Box

Step by Step approch for extending the disk space in Virtual box.

1. Goto the Settings -> Storage -> Controller SATA and click on add hard disk.
2. Select the disk file type as vmdi.
3. Select storage as fixed size.
4. Set the hard drive size as per requirement, before assigning check the availablity space of the         Windows partition.
5. Power ON the virtual box.

Note: During installation time if we create root filesystem with LVM, then we can extend the size of root file system. Otherwise its not possible to extend the existing patition size.

The problem we have is there is not enough space in /tmp for configuring a middleware application.
During installation if we create /tmp as individual filesystem with LVM, then we can extend the size of /tmp file system size. But if /tmp is not created as individual filesystem then it resides bu default as a directory under "/" root file system.
  So here we created a new file system and mounted as /tmp.

Now check whether newly attached hard drive detected logically or not.
 Run the command as
 # fdisk -l
  

 During Installation we configuring the file system on a hard drive i.e., /dev/sda.
The newly added hard drive is /dev/sdb.

Creating new partition from newly created disk. i.e., logical partition 
 after creating partition we need save and update to disk.
Then update modify disks to kernel as
   # partprobe /dev/sdb


Format the partition with ext4 file system type.


 mount the partition with /tmp.
 Remember mounting a logical device i.e., partition at shell prompt is temporary mounting. 
It will be available until session close.

To mount a file system permanently mounted, give the file system entry in /etc/fstab file as
# vi /etc/fstab
 Goto last line and give entries as
/dev/sdb5     /tmp      ext4     defaults     0  0
From above /dev/sdb5  --> logical device name
/tmp --> mount point
ext4 --> file system type
defaults -> file system permissions i.e., read & write.
0 -> no file system dump
0 -> don't run fsck at run time.






To lists all the permanently mounted file system information
# df -h


















Tuesday, 8 July 2014

SSH Installed and Configuration in Ubuntu



Installing Open-ssh server on ubuntu linux


OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions.

Ubuntu SSHD Installation
Type the following two command to install both ssh client and server:
# sudo apt-get install openssh-server openssh-client


 # sudo apt-get update


How To Configure SSH?



When you change the configuration of SSH, you are changing the settings of the sshd server.
In Ubuntu, the main sshd configuration file is located at /etc/ssh/sshd_config.
Back up the current version of this file before editing:



open ssh configuration using vi editor





You will want to leave most of the options in this file alone. However, there are a few you may want to take a look at:


The port declaration specifies which port the sshd server will listen on for connections. By default, this is 22.
 

If you are having difficulties with SSH, increasing the amount of logging may be a good way to discover what the issue is

These parameters specify some of the login information.

LoginGraceTime specifies how many seconds to keep the connection alive without successfully logging in. It may be a good idea to set this time just a little bit higher than the amount of time it takes you to log in normally.
PermitRootLogin selects whether root is allowed to log in.
In most cases, this should be changed to "no" when you have created user account that has access to elevated privileges (through su or sudo) and can log in through ssh.
strictModes is a safety guard that will refuse a login attempt if the authentication files are readable by everyone.

This prevents login attempts when the configuration files are not secure.

                                               
These parameters configure an ability called X11 Forwarding. This allows you to view a remote system's graphical user interface (GUI) on the local system.
This option must be enabled on the server and given with the client during connection with the "-X" option.
If you changed any settings in this file, make sure you restart your sshd server to implement your modifications

 
How To Log Into SSH with Keys 

While it is helpful to be able to log in to a remote system using passwords, it's often a better idea to set up key-based authentication

How Does Key-based Authentication Work?

Key-based authentication works by creating a pair of keys: a private key and a public key.
The private key is located on the client machine and is secured and kept secret.
The public key can be given to anyone or placed on any server you wish to access.
When you attempt to connect using a key-pair, the server will use the public key to create a message for the client computer that can only be read with the private key.
The client computer then sends the appropriate response back to the server and the server will know that the client is legitimate.

This entire process is done in the background automatically after you set up keys.
 
How To Create SSH Keys?

SSH keys should be generated on the computer you wish to log in from. This is usually your local computer.
   


Press enter to accept the defaults. Your keys will be created at ~/.ssh/id_rsa.pub and~/.ssh/id_rsa.

Change into the .ssh directory by typing



Look at the permissions of the files
 

 As you can see, the id_rsa file is readable and writable only to the owner. This is how it should be to keep it secret.
The id_rsa.pub file, however, can be shared and has permissions appropriate for this activity.

How To Transfer Your Public Key to the Server? 


This will start an SSH session, which you will need to authenticate with your password.
After you enter your password, it will copy your public key to the server's authorized keys file, which will allow you to log in without the password next time.

 Client-Side Options

There are a number of optional flags that you can select when connecting through SSH.
Some of these may be necessary to match the settings in the remote host's sshd file.
For instance, you if you changed the port number in your sshd configuration, you will need to match that port on the client-side by typing:


If you only wish to execute a single command on a remote system, you can specify it after the host like so



You will connect to the remote machine, authenticate, and the command will be executed.


As we said before, if X11 forwarding is enabled on both computers, you can access that functionality by typing:



To stop ssh server, type command as
# sudo /etc/init.d/ssh stop
 

To start ssh server type command as
# sudo /etc/init.d/ssh start
 

To restart ssh server type command as
# sudo /etc/init.d/ssh restart



Now we can easily login through putty from Host machines(Windows) to Remote machines (Ubuntu). We can copy/send files from Host machine (Windows) to Remote machines (Ubuntu) using Winscp tool.
   Install Winscp tool in windows to send files to remote machines using SSH.