Tuesday, May 12, 2020

How to install centos7 on virtual box


With the help of virtualbox & vmware its very easy to install 2 or more operating systems on the          same hardware. Today we are going to learn how to install centos7 on virtualbox. where i have           install virtual box on windows system. Link to how to install virtual box is here:
After installation of virtualbox if you open it. We will see below window. Then click on Add button.


After add you will see Create Virtual Machine image. where You can give name to your new OS. I have given here as Centos1. Type i have used as Linux with Red Hat(64 bit) OS. Then Please click on Next Button.


Now, you need to edit memory size for your system. I have set it as 2048 MB which is nothing but 2 GB. Then click on next button.


Then next window appears, where you have to select hard disk of 8 GB. Click on create a virtual disk now. Then click on create.


    Then select hard disk file type as VDI ( Virtual disk Image). Then click on next button.


Then Storage on physical hard disk select as dynamically allocated. Then click on next button. 


Now provide File location and size. I have given File location as C:\Users\Shree\Virtualbox VMs\Centos1.vdi . Next Assign memory as per requirement. Then, Click on create. 


 Now Virtually vm has created. Now Start the System by using start button.


   An iso image of os is nothing but the mirror image of operating system. Download Centos 7 64/32     bit OS as per the your system requirement. Then browse the downloaded iso image. Click on start       button. It will start the installation process.


    Select by using up arrow  Install Centos7. Click on it. Then installation begins.


 Do the country & language setting, as per your requirement.Then Continue.
Select hard disk & click on done button. Need to complete user & root creation with        password.Then actual installation will start. It will take approximately half an hour for complete  installation. When installation will finish. You will get below window. Then reboot your system by clicking reboot button.


    You can able to login to centos system by using root user & password. as below.



Now, You have successfully login to your newly installed centos7 OS. In the same way you can try another OS installation like fedora, ubuntu, kali linux, windows different versions, Redhat OS, etc.

Thank you very much for reading above article.






Thursday, May 7, 2020

Configuration of Network- File-Sharing(NFS)


 Hello friends, today i am going to share you how to perform Network file sharing (NFS) on centos7 system. This configurations are mainly used for linux to linux machin files sharing.
File sharing steps are given below:
You will required 2 systems to perform the above mentioned configuration. If suppose, you have windows machine with you.Then by using virtualbox/vmware install centos7 or redhat7.Then consider one system of centos as a server & other as a client.
1)Install nfs package on server side by using command sudo yum install nfs*
install nfs package on client side by using command sudo yum install nfs-utils
2)Linux is very secure because it provides 3 layers of security like root,firewall,selinux.
Now disable selinux on both server & client side.
Steps to disabled selinux: Edit below mentioned configuration file.
i)vi /etc/selinux/config
 selinux=disabled
ii)reboot - then reboot the system.
iii) getenforce - check selinux is disabled or not by using getenforce command, output should be disabled.
3) STOP firewall as below:
Check the firewall status by using systemctl status firewalld command.
Stop the firewall by using systemctl stop firewalld.
4) Steps to perform server side:
i) Make new directory onto /mnt file as Mkdir /mnt/nfs1
change the directory by using command cd /mnt/nfs1
create empty files by using command touch 1 2 3 4 . This will create 1, 2, 3 & 4 empty files.
Edit file 1 as vi 1 and write the file like This is my nfs file.
5) Edit /etc/exports file as below:
i) vi /etc/exports then press enter write below content like
ii) /mnt/nfs1 * (rw,sync) where * indicates all ip addresses
iii) Change the permissions of /mnt/nfs1 file.
  chmod 777 /mnt/nfs1
6) Then, Start nfs service by using systemctl start nfs command.
7) Check the firewall status again, if firewalld is not stopped then stop it again by using systemctl stop firewalld
8) write exportfs-av command you will get output as below.
9) Check the ip address by using hostname –I
10) Steps to perform at client side:
i) mount 192.168.1.100:/mnt/nfs1 /mnt
11) Check the connectivity from client to server side by using ping command as ping 192.168.1.100
Where 192.168.1.100 is a server ip.
If ping is successful that means file sharing is successful.
12) at client side change directory to mnt by using cd /mnt, Then list the files associated with respective directory. You will get output as below.
Then Cat 1 you will get output as below.
If any error observer do the changes into network as bridge adapter on both system.
Thanks for reading above blog.

Tuesday, April 28, 2020

How to assign IP address on linux system(Centos, RHEL7)


Today we are going to learn static  & automatic IP assignment. In centos or RHEL7 hostname -I command is used to check ip address of a system. There are 2 different types of IP addresses,  IPV4 & IPV6. Let's learn how to set it on system.
We are considering you have already install virtual box or vmware on your windows operating system. Then, Install linux like centos7 which is freely available on internet.
nmtui command is used to assign ip address in a graphical way. In our practical we are going to learn command line interface to assign ip address.
nmcli connection show - This command shows adapter or network interface. 
You will get interface name by using ip addr command. here, interface name is enpos3

nmcli connection mod "enp0s3" ipv4.method manual ipv4.address 192.168.1.1/24

nmcli stands for network management command line interface, enp0s3 is the name of interface you will get the name of interface by using ifconfig or ip addr command. we want to assign ipv4 version for assigning the IP address so ipv4.method. We are assigning the ip manually that's why manual.Then assign ip address as 192.168.1.1 by following ipv4.address, /24 indicates class c. There are 5 types of IP classes available. Im which only 3 are useful for us.
Then use nmcli con down enp0s3 to down the ethernet interface. Next use nmcli conn up enp0s3 command to open up connection.


Now, check ip address of your system by using ip addr command.


Thanks for reading the above article. If you have any query , Please feel free to contact on email id zurangechaitali13@gmail.com

How to set hostname on your system


Dear friends, today we are going to learn 2 different ways to set hostname.
1st method
hostnamectl set-hostname server.linuxlearning.com
You can set any hostname  by using above mentioned command. Give any hostname in the place of server.linuxlearning.com as per your mind.

2nd method
By editing configuration file /etc/hostname
Edit the file by using vi /etc/hostname Then enter a hostname as server.linuxlearning.com

After saving file reboot  the system by using reboot command.

Check hostname by using hostname command.
Hostname is the command to check hostname of a system. Hostname -I is used to check the IP address of a system.


Hostname -d is used to check domain name of a system.



Hostname -f is used to check fully qualified domain name (FQDN) of a system.


We can also set the hostname by using graphical user interface(GUI) 
Use command nmtui & press enter. You will get window as shown below. Click on Set System hostname. 


Press Enter & type hostname you want to set. here we have set hostname as server.linuxlearning.com             



Thanks for reading the above article . Please feel free to send your queries on zurangchaitali13@gmail.com.

Monday, April 27, 2020

How to change root password in centos7 or RHEL7


Today, we are going to learn at any case we forgot root password then how to change it. During RHCSA examination they  will provide you a system where root password is needed to change. Its a first step of the examination. Every administrator should know it by default.

Lets, see steps to change root password on centos7 system.

i) Reboot the server by pressing reboot command , when you will see image like below




then press e to edit the file.

ii) write rd.break into the kernel file after UTF-8 as given into image.


iii)Then press ctrl+x to come out from kernel file.

iv)Press mount command you will see that kernel file has only read only permission.




vi) Type chroot /sysroot then press enter.






vii) write passwd command & press enter





you will get prompt for entering new password . Enter password two times.



after entering password you will get below message.




viii)write command touch /.autorelabel







Then type exit then enter. again type exit & enter.








after that automatically server  will turn on. you will get login prompt. you can login by using updated password as shown in below image.










Thanks for reading the above learning & sharing document. If you have any query please feel to contact on mail id as zurangechaitali13@gmail.com