Wednesday, 2 September 2020

Linux 8 Udemy coupon code :SEP2020

Coupon code : SEP2020



https://www.udemy.com/course/nis-server-with-ntp-and-autofs-on-centos-linux-8-rhel-8/?couponCode=SEP2020

https://www.udemy.com/course/setup-centos-linux-8-and-ubuntu-2004/?couponCode=SEP2020

https://www.udemy.com/course/kvm-virtualization-on-centos-linux-8-rhel-8/?couponCode=SEP2020

Sunday, 21 June 2020

Top 4 HP Pen drives

1)HP FD236W 32GB USB 2.0 Pen Drive (Gray)

https://amzn.to/2V2KYwD


2)

HP HPFD302M 64GB OTG Flash Drive (Sliver)




3)HP HPFD302M 64GB OTG Flash Drive (Sliver)


4)HP v237w 16GB USB 2.0 Pen Drive



Thursday, 21 February 2019

VNCSERVER installtion and configuration in Ubuntu

sudo apt-get update && sudo apt-get upgrade -y


sudo apt-get install ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

sudo apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal


sudo apt-get install vnc4server


#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &

export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

gnome-session &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &



vncserver -geometry 1920x1200 -depth 24


sudo apt-get install xfce4 xfce4-goodies


gsettings set org.gnome.Vino require-encryption false

Wednesday, 20 February 2019

How to Install or Upgrade to Kernel 4.20 in RHEL 7

# uname -sr

# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

#yum --disablerepo="*" --enablerepo="elrepo-kernel" list available

# yum --enablerepo=elrepo-kernel install kernel-ml

#reboot

Select new kernel 

Set Default Kernel Version in GRUB


# vi /etc/default/grub

GRUB_TIMEOUT=5
GRUB_DEFAULT=0
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"


Next, run the following command to recreate the kernel configuration.

Rebuild the /boot/grub2/grub.cfg file by running the grub2-mkconfig -o command as follows:

On BIOS-based machines: ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
On UEFI-based machines: ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

Monday, 30 January 2017

create multiple users in Unix with default password user should change password in first login .

1) create bash script

# vi userlist.sh

  #!/bin/sh

  for i in user1 user2 user3 user4  userN

  do

  useradd -s /bin/bash -m -d /home/$i $i


  echo "$i:newpassword" | chpasswd


  chage -d 0 $i


  done

2) save and exit file . and give executive permission .


#chmod 777 userlist.sh


#./userlist.sh


thats it enjoy !!!:)

Monday, 23 November 2015

NFS Sever Configuration .

Network File System (NFS) protocol allow Linux client to mount remote file systems and interact with those file systems as they are mounted locally.

    NFS was developed by Sun Microsystems in 1980
    NFS stand for Network File System
    NFS is used to share files between Linux / Unix systems
    CentOS 6 supports NFSv2, NFSv3, and NFSv4 clients.
    By default CentOS 6 use NFSv4 if the server supports it.

NFSv1

NFSv1 was the development stage of NFS protocol. It was used only for in house experimental purpose. When a stable version of NFS was ready, Developers decided to release it as the new version of NFS known as NFSv2.
NFSv2

    NFSv2 supports only 32 bit.
    NFSv2 only allowed the first 2 GB of a file to be read
    NFSv2 operated only over UDP

NFSv3

    NFSv3 supports 64 bit file system.
    NFSv3 can handle files larger than 2 GB.
    NFSv3 supports asynchronous writes on the server. asynchronous writes improve write performance.
    NFSv3 supports additional file attributes in many replies, to avoid the need to re-fetch them.
    NFSv3 supports READDIRPLUS operation. READDIRPLUS operation get file handles and attributes along with file names when scanning a directory.
    NFSv3 supports TCP. Using TCP as a transport made NFS over a WAN more feasible.

NFSv4

    NFSv4 retains all NFSv3 advantages.
    NFSv4 supports ACLs.
    NFSv4 uses the virtual file system to present the server's export.
    NFSv4 supports Pseudo file system. Pseudo File System provide maximum flexibility. Exports Pathname on servers can be changed transparently to clients.
    NFSv4 have locking operations as the part of protocol which keep track of open files and delegations.
    NFSv4 works through firewalls and on the Internet.


1)NFS Network File System, is a server-client protocol used for sharing files between linux/unix to unix/linux systems. NFS enables you to mount a remote share locally. You can then directly access any of the files on that remote share.

2)NFS mounts work to share a directory between several servers. This has the advantage of saving disk space, as the home directory is only kept on one server, and others can connect to it over the network. When setting up mounts, NFS is most effective for permanent fixtures that should always be accessible.

3)An NFS mount is set up between at least two servers. The machine hosting the shared network is called the server, while the ones that connect to it are called 'clients' .

4)We will set up the server machine first .
 a) Start off by using yum  to install the nfs programs

]# yum install nfs-utils nfs-utils-lib rpcbind
 
 b) Subsequently, run several startup scripts for the NFS server.

]# service nfs start
]# service rpcbind start
]# chkconfig nfs on
]# chkconfig rpcbind on

 c) Export the Shared Directory.

A) The next step is to decide which directory we want to share with the client server. The chosen directory should then be added to the /etc/exports file, which specifies both the directory to be shared and the details of how it is shared.

B) Suppose we wanted to share the directory, /home.

C) We need to export the directory .

D) ]# vi /etc/exports

 -Add the following lines to the bottom of the file, sharing the directory with the client.

 /home           192.168.1.0/24 (rw,sync,no_root_squash,no_subtree_check)

 -These settings accomplish several tasks:

 rw: This option allows the client server to both read and write within the shared directory.

 ro: With the help of this option we can provide read only access to the shared files i.e client will only be able to read.

 sync: Sync confirms requests to the shared directory only once the changes have been committed.

 no_subtree_check: This option prevents the subtree checking. When a shared directory is the subdirectory of a larger filesystem, nfs performs scans of every directory above it, in order to verify its permissions and details. Disabling the subtree check may increase the reliability of NFS, but reduce security.

 no_root_squash: This phrase allows root to connect to the designated directory .

  d) Once you have entered in the settings for each directory, run the following command to export them .

]# exportfs -a

5)We will set up the client server .
 a) Start off by using yum  to install the nfs programs.

]# yum install nfs-utils nfs-utils-lib rpcbind

 b) Subsequently, run several startup scripts for the NFS client .

]# service nfs start
]# service rpcbind start
]# chkconfig nfs on
]# chkconfig rpcbind on

 c)Once the programs have been downloaded to the the client server, create the directory that will contain the NFS shared files .

]# mkdir -p /mnt/nfs/home

 d) Then go ahead and mount it .

]# mount Server IP :/home /mnt/nfs/home

 e)You can use the df -h command to check that the directory has been mounted. You will see it last on the list.

]# df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda               20G  783M   18G   5% /
server IP:/home       20G  785M   18G   5% /mnt/nfs/home

 f)Additionally, use the mount command to see the entire list of mounted file systems .

]# mount

/dev/sda on / type ext4 (rw,errors=remount-ro)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
server IP:/home on /mnt/nfs/home type nfs (rw,noatime,nolock,bg,nfsvers=2,intr,tcp,actimeo=1800,addr=12.34.56.789)

 g)You can ensure that the mount is always active by adding the directory to the fstab file on the client. This will ensure that the mount starts up after the server reboots.

]# vi /etc/fstab

server IP:/home  /mnt/nfs/home   nfs      auto,noatime,nolock,bg,nfsvers=3,intr,tcp,actimeo=1800 0 0

]# mount -a

6) Testing the NFS Mount .
 a)Once you have successfully mounted your NFS directory, you can test that it works by creating a file on the Client and checking its availability on the Server.

Create a file in the directory to try it out:

]# touch /mnt/nfs/home/example

CentOS

CentOS 5.8

1) Release date 7 march 2012.
2) end of life 31 march 2017 .
3) new pakages .
binutils220
iotop
mysql-connector-odbc64
pixman
postgresql-odbc64
python-ctypes
spice-client
spice-protocol
virt-who
unixODBC64
4)possible to upgrade 5.11  throught yum update .

--->but before that need to take backup of important data .
a) backup /etc directory .
b) backup important logs /var/log .
c) back webserver configution file .
d) dump database .


CentOS 5.11

1)30 September 2014 .
2)end of life 31 march 2017 .
3)new pakages .
gcc-libraries
mysql51
mysql51-mysql
mysql55
mysql55-mysql
        python-dateutil
        python-kerberos
        python-lxml
php53-odbc64
libitm
scl-utils
ant17
java-1.7.0-openjdk
rsyslog5
hypervkvpd  

CentOS 6.6


1) Release Date  November 15, 2014  .
2)end od life 30-Nov-20.
3) Major changes .
a)Enhanced SCSI unit attention handling to enable responding to certain unit commands.

b)The OpenvSwitch module is now available as a kernel module.
c)New HyperV daemons have been added to enable/improve running  CentOS in Microsoft HyperV hosts.
d)As a technology preview 6.6 can be run as a 2nd generation VM on  Microsoft's 2012R2 HyperV.
e)keepalived and haproxy are now fully supported.
f)Support added for the Intel Wildcat platform.
g)OpenJDK 8 has been added as technology preview. 

3)possible to upgrade 6.7 throught yum update .

--->but before that need to take backup of important data .
a) backup /etc directory .
b) backup important logs /var/log .
c) back webserver configution file .
d) dump database . 


CentOS 6.7


1) Release Date  November 15, 2014  .
2)end od life 30-Nov-20.
3) Major changes .
a)Enhanced SCSI unit attention handling to enable responding to certain unit commands.

b)The OpenvSwitch module is now available as a kernel module.
c)New HyperV daemons have been added to enable/improve running  CentOS in Microsoft HyperV hosts.
d)As a technology preview 6.6 can be run as a 2nd generation VM on  Microsoft's 2012R2 HyperV.
e)keepalived and haproxy are now fully supported.
f)Support added for the Intel Wildcat platform.
g)OpenJDK 8 has been added as technology preview. 

3)possible to upgrade 6.7 throught yum update .

--->but before that need to take backup of important data .
a) backup /etc directory .
b) backup important logs /var/log .
c) back webserver configution file .
d) dump database . 







not possible to upgrade ( CentOS 5.8 , CentOS 5.11)  to ( CentOS 6.6 , CentOS 6.7) .


some reason I am Mentioning below .


1) (CentOS 5.8 , CentOS 5.11) have  ext3 file system and (CentOS 6.6 , CentOS 6.7) have ext4 file system through yum update file system cannot upgrade . 

2)  Insufficient Hardware. new operating system requires fresh hardware but upgrading OS new virsion that run very slowly .

3)  Setup Error and Freezes . probabaly the worst case scenario is when the setup process fails in the middle of an upgrade this can leave you stuck in computer purgatory with neither the old operating system nor new usable .
  
4)  this can be also caused by hardware issue .

5)  driver problem .

6)  Application incompatabilities .

7)  performance problem .

8) permission acess problem .

9) interface proble . 



Fresh installation is always good as compaire to upgrede .
    


But there is way to upgrade .

1) take and test full backup off old system .

2) install CentOS 6.7 in new Machine .

3) look Old macine backup file /etc/*rpm* .

4)Find out the application from old data .


Mejor Difference of CentOS 5.11 and CenOS 6.7 .

1) Virtualization: In CentOS 6.7 KVM (Kernel based Virtual Machine) was used as a hypervisor but in the earlier releases of CentOS XEN was used as a hypervisor. The main advantage of KVM is that it supports the installation of many virtual machines/operating systems like Windows, Linux, Solaris and also it is very easy to manage those virtual machines.

2)Security: CentOS 6.7 has an enhanced version of SELinux(Security Enhanced Linux) now, Basically now the features are more improved and there are various new set of rules which are added to SELinux one of such rule/feature is of SVirt which provides security to virtual machines from hackers.
    EXT4: It stands for Extended 4, It has various new advantages then EXT2/3 which were used in earlier version(s) of RHEL. EXT4 is comparatively more faster and easy to manage then previous file systems.
    IPv6: CentOS 6.7 supports IPv6.
    NFS4: It uses NFSv4 (Network File Transfer) the latest version of NFS for the sharing of files in the network rather than NFSv3.
    GUI: It has a far better GUI(Graphical User Interface) then CentOS 5.11 or any of its prior version.