Posts

Showing posts with the label RedHat Linux-7

Linux Basic

Image
  A command line is a text-based interface , which can be used to input instructions to a computer system. The Linux command line is provided by a program called the shell . Over the long history of UNIX-like systems, many shells have been developed. The default shell for users in Red Hat Enterprise Linux is the GN U Bourne-Again Shell (bash). Bash is an improved version of one of the most successful shells used on UNIX-like systems, the Bourne Shell (sh). Another way to access a shell is from a virtual console. A Linux machine's physical console supports multiple virtual consoles which act like separate terminals. Each virtual console supports an independent login session. If the graphical environment is available, it will run on the first virtual console in Red Hat Enterprise Linux 7. Five additional text login prompts are available on consoles two through six (or one through five if the graphical environment is turned off). With a graphical environment running, access a tex...

Basic Bash Scripting in Linux (Part-1)

  Script for adding users and their password: ==================================== (1) Method-1 ============= [root@itbd ~]# vim users.sh for a in `seq 1 5`; do useradd ituser$a; echo pass$a | passwd --stdin ituser$a; chage -d 0 ituser$a; done [root@itbd ~]# chmod +x user.sh [root@itbd ~]# bash users.sh (2) Method-2 ============ [root@itbd ~]# vim admin-user.txt mamun imran shazzad [root@itbd ~]# vim users.sh #!/bin/sh for a in `more admin-user.txt` do echo "$a" useradd $a echo "123" | passwd --stdin "$a" chage -d 0 $a done [root@itbd ~]# chmod +x user.sh [root@itbd ~]# bash users.sh Method-3: ========== #vim  user-list.txt mushfiq:mushfiq123:1003:1003::/home/mushfiq:/bin/bash testuser:testuser123:1004:1004::/home/testuser:/bin/bash demouser:demouser123:1005:1005::/home/demouser:/bin/bash # newusers user-list.txt                                        ...

NIC-Teaming in RedHat Linux Server

  NIC-Teaming: =========== Red Hat Enterprise Linux 7 implements network teaming with a small kernel driver and a userspace daemon, teamd. The kernel handles network packets efficiently and teamd handles logic and interface processing. Software, called runners, implement loadbalancing and active-backup logic, such as round robin. The following runners are available to teamd: 1. Broadcast: a simple runner which transmits each packet from all ports. 2. Round Robin: a simple runner which transmits packets in a round-robin fashion  from each of the ports. 3. Activebackup: this is a failover runner which watches for link changes and selects an active port for data transfers. 4. Loadbalance: this runner monitors traffic and uses a hash function to try to reach a perfect balance when selecting ports for packet transmission. 5. LACP: implements the 802.3ad Link Aggregation Control Protocol. Can use the same transmit port selection possibilities as the loadbalance runner. We ...

Samba Server Configuration in RedHat Linux

Image
  Samba Server Configuration in RedHat Linux At Server Site(IP Address: 10.1.1.3/24): yum  -y  install  samba* mkdir      /share chmod  -R  777  /share chcon  -R  -t  samba_share_t  /share/ semanage   fcontext   -a   -t   samba_share_t   /share/ setsebool   -P   samba_enable_home_dirs   on useradd  smbuser1 usermod   -G   hr-dept   smbuser1 smbpasswd  -a  smbuser1 cd /etc/samba/ cp -p smb.conf smb.conf.orig         ;[We are taking backup of  main configuration file for safety] vim   /etc/samba/smb.conf    # To allow network to reach samba server: workgroup = MYGROUP interfaces = eth0  10.1.1.0/24 hosts allow = 127.    10.1.1.     # To share the folder and others facts: [share_name]      path = /shar...

AutoFS Configuration in Redhat Linux 7/8

  AutoFS Configuration: Extra Note:      You can use  cat  /etc/mtab  command to permanent mount. Just copy your partition line and paste it into /etc/fstab file; save it. At Server Side: Server IP=10.1.1.1/24 yum  install  -y  nfs* mkdir  /public mkdir  /private chmod  777  /public chmod  777  /private cd  /public cal > calpublic.txt cd  /private cal 2020 > calprivate.txt vim /etc/exports      /public  10.1.1.2(ro,sync)       /private  10.1.1.2(rw,sync) exportfs  -arvf firewall-cmd  --permanent --add-service=nfs firewall-cmd  --permanent --add-service=rpc-bind firewall-cmd  --permanent --add-service=mountd          ** you can use below command instead of above 3 commands firewall-cmd  --permanent --add-service={nfs,rpc-bind,mountd} firewall-cmd  --reload systemctl  start nfs-server.service...

AUTOMATING INSTALLATION WITH KICKSTART

Image
  CHAPTER 1  AUTOMATING    INSTALLATION    WITH      KICKSTART Some Information about Kickstart If we install Linux OS on  single standalone machine, it is easy to install manually. But if we want to install 30/40 or more machines  for your organization, then it will be more complicated work due of time. Right? So, then we will use automated  installation process. so that all client machines can be installed from a single server machine automatically.  That's why - we will  " kickstart method" **  Kickstart  is an automated installation method used primarily by Red Hat Enterprise Linux. ** Kickstart in Red Hat Enterprise Linux is similar to Jumpstart for Oracle Solaris, or to an unattended installation (WDS Deployment) for Microsoft Windows. Video Links: Part-01: Part-02: Our LAB Scenario : But we will take One Client and One Server Server Name -> Kickstart-Server Client Name -> Kickstart-Client-...