Thursday, December 1, 2016

Wednesday, November 23, 2016

Configure Static IP On CentOS 6



Below steps will show configuration to set static IP address in Cent-OS machine.

    Network configuration files are under "/etc/sysconfig/network-scripts".
    We can open the file with editor like nano, vi, vim etc...
   
    Here I will use vi editor.
   
    In this server we will set Static IP for eth0 Ethernet port

1 - Start your server running Cent-OS enter root user credentials and login.

2 - Type the command,

         vi /etc/sysconfig/network-scripts/ifcfg-eth0

    This will open network configuration file, edit below lines:

         NM_CONTROLLED=yes
         ONBOOT=yes
         TYPE=Ethernet
         BOOTPROTO=static
         IPADDR=192.168.1.44            # Replace IP with your new
         NETMASK=255.255.255.0     # Replace IP with your subnet mask

3 - Type the command,

         vi /etc/sysconfig/network
   
    This will open file to set default gateway, edit below lines:

         NETWORKING=yes
         GATEWAY=192.168.1.1        # Replace IP with your gateway IP

4 - Type the command,

          vi /etc/resolv.conf
   
    This will open file to set DNS,

          nameserver 8.8.8.8                # Replace IP with your DNS IP
          nameserver 192.168.1.1        # Replace IP with your DNS IP

5 - To apply changes restart network interface, Type the command.
   
          /etc/init.d/network restart
   
NOTE:
Some time you might face issue in accessing your system. It can be due to firewall.
       
        To stop firewall temporary execute command,

            service iptables stop
           
        To stop firewall permanently execute command,

            service iptables stop
            chkconfig iptables off
           

 
ENJOY! and Stay connected.

Thursday, August 4, 2016

Install and Secure Apache, My SQL, PHP & phpMyAdmin on a CentOS 6




To Install Apache, My SQL, PHP & phpMyAdmin follow below process, 


    a) Run below command to install Apache, My SQL, PHP and phpMyAdmin
   
        yum install httpd mysql-server php php-mysql
   
    b) Run below command to start Apache & MySQL service,
   
        service httpd start
        service mysqld start
   
    c) Run below command to add Apache & MySQL service in startup,
   
        chkconfig httpd on
        chkconfig mysqld on

    d) Run below command to set database password, and other settings,
   
        mysql_secure_installation
       
     e) Run below command to install phpMyAdmin
      
        yum install epel-release
        yum install phpmyadmin

     f) Open below file, update required detais and restart apache service,
   
    /etc/httpd/conf.d/phpMyAdmin.conf

    Require ip your_workstation_IP_address
    . . .
    Allow from your_workstation_IP_address
    . . .
    Require ip your_workstation_IP_address
    . . .
    Allow from your_workstation_IP_address
    . . .

    service httpd restart

       
    g) Open below url to test apache and phpMyAdmin
   
        Apache
        http://<IP_address>
       
        phpMyAdmin
        http://<IP_address>/phpmyadmin

ENJOY! and Stay connected.
       

Friday, June 10, 2016

Modify host-name in Cent-OS 6

To change host name you must have root access of the system. We can do it using any text editor, here I am using text editor "vim".

Open /etc/sysconfig/network file.

         [root@lmntechnohub ~]# vim  /etc/sysconfig/network

Modify the HOSTNAME= value, and set your new host name.

     HOSTNAME=lmntechnohub.com

For internal networking, change the entries in host files at /etc/hosts .

     127.0.0.1    localhost localhost.localdomain

     10.10.10.10 lmntechnohub.com

Run the host-name command. This command will change host-name of Linux server, but it will not immediately update all programs that are running with old host-name.

     [root@lmntechnohub ~]# hostname lmntechnohub.com

     [root@lmntechnohub ~]# hostname

     lmntechnohub.com

     [root@lmntechnohub ~]#

To finalize it restart network service on your system, to ensure that changes will there on system restart.

     [root@lmntechnohub ~]# /etc/init.d/network restart

ENJOY! and Stay connected.

Wednesday, June 8, 2016

Networking between Host Computer and VM In VirtualBox

Hi friends,

How to access Virtual machine in Oracle VM VirtualBox from host computer to?



If you have a VM installed in virtual box, of your host system and want to access it from your host system. If your system is connected to a switch you can set network attached option as bridge and can access it in your network as a remote system.

But if you have a single system and want to access VM installed in virtual box of your host system without a switch.

Here I will show you how to do it, use VirtualBox host only Ethernet network adapter for communicating between VM and your Host computer. Host-only networking is another networking option in virtual box network.

With bridged networking option, the virtual machines can communicate with internet through physical Ethernet.

But as the name indicating there is only Host for networking. This adapter will connect VM in Virtual box and Host system. No outside connection (Internet or Other network).

Host only network adapter is for internal networking between VM and your Host computer only.

Lets check how to do so.

1- Open Network and Sharing center > Adapter Settings on your host computer and look for VirtualBox Host-Only Network adapter.

2- Double click on Internet Protocol Version 4. Put a Static IP. DNS and gateway are optional.

3- Now start Virtual Box application, go to  Settings > Network. Select Host-Only Adapter from Attached to drop down menu, and click OK.

4- Now start VM in Virtual Box and go to Network Adapter settings, Right click and select Properties.


5- Double click on Internet Protocol Version 4. Assign a Static IP address of the same range that you assigned to the your host system. DNS and gateway are optional.


6- Open command prompt then try to ping host and vice versa. Refer the screen shots below.


My Host (Windows 7) Static IP :- 10.10.44.100
Virtual Box VM (Windows 10) Static IP :-
10.10.44.254


Virtual box Windows 10 is able to ping Host Windows 7 and vice versa

ENJOY! and Stay connected.

Tuesday, April 14, 2015

How to use a Ethernet splitter.


Imagine u have One Ethernet point came in your room and you want to connect two device one your laptop and other one is your desktop.

Now what will you do?


You can purchase a switch or a hub and connect your devices with it, Or You May pull a new wire for the your second device.
But both the options are expensive.

I have one more options for you which is cheap and easy as compared to other.
You can use a Ethernet splitter.


But how does it work?
You might know a Ethernet cable has 8 wires.
But among them only 4 cables are only used to transmit and receive data for a device. So we can use the other 4 cables to transmit and receive data but for other device.


For more check the video below.
ENJOY! and Stay connected.