INTRODUCTION OF LINUX

INTRODUCTION OF LINUX - Hallo sahabat Download APK, Pada Artikel yang anda baca kali ini dengan judul INTRODUCTION OF LINUX, kami telah mempersiapkan artikel ini dengan baik untuk anda baca dan ambil informasi didalamnya. mudah-mudahan isi postingan Artikel LINUX, yang kami tulis ini dapat anda pahami. baiklah, selamat membaca.

Judul : INTRODUCTION OF LINUX
link : INTRODUCTION OF LINUX

Baca juga


INTRODUCTION OF LINUX



VENDOR
OPERATING SYSTEM
AT & Bell Labs
SYS-3 & SYS-5
SUN
(Standard University Network)
SOLARIS

IBM
( International Business Machines Co-operation)
AIX
SG
(Silicon Graphics)
IRIX
SCO
(Santa Cruz Operation)
Sco-Unix
BSD
(Berkelay Software Distribution)
Fee-BSD
HP
(Hewlett Packard)
HP UX

Features of Linux Operating System:
Open Source:
   Free Software along with the source Code& Documentation.
Multi Tasking:
   Capable of running multiple applications and process at same time.
Multi User:
  Allows Multi User to login and use the resource at same time.
Portability:
   Can be installed on all Hardware Architecture
Scalablity:
   Same Operating System can be used on a desktop to a Uper Computer.
Reliability:
   Large Servers have been successfully being running without a single second of down timer.
Security:
In-built  Firewall and SE linux













FHS
FILE SYSTEM HIRERACHY STANDARD

STRUCTURE OF WINDOWS OPERTING SYSTEM:

BASIC COMMANDS

How to Open a Terminal?

Ø Right click open in Terminal

OR
Ø Click On application Terminal

 OR
Ø Click on Alt+F2

To increase Size of Terminal
Ø Ctrl+Shift ’+’

To decrease Size of Terminal
Ø Ctrl+ ’-’

To Get Ful Screen
Ø F11



#### HOW TO CHECK THE PRESENT WORKING LOCATION ####
# pwd
#### TO CHANGE THE LOCATION####
# cd
Ex:   cd  /
        Cd  /usr
        Cd  /var
     Cd desktop

#### TO CHECK THE CONTENTS OF DIRECTORY ####
# ls

#### TO CHECK THE PROPERTIES OF FILES & DIRECTORIES ####
# ll                                                                           

#### TO CHECK THE HIDDEN FILES & DIRECTORIES ####
# ls –a

#### TO CHECK THE INODE NUMBER OF FILES &DIRECTORIES ####
# ls –i

How to Create a File?
->To create the file

There are 3 commands:
Ø cat
Ø touch
Ø vi

CAT(concatenation):
Ø CAT command is a user to create a new text file
Ø To read the file and also append the file
Drawback:
Ø Cat command cannot be used to modify be the files and also to create multiple files.
     #cat > redhat (This is a root file)
     To Save: ctrl+d

TOUCH: Touch command is used to create multiple empty files.

DRAWBACKS:
         
Ø Touch command cannot be used to Write the file, Read the file and also modify the file
Ø Multiple # Touch
         
VI: Visual Interface

EDITOR:  Editor is used to editing adding, modifying and deleting text.

The different editors used

          *WINDOWS: Notepad
          *DOS: Edit
          *Linux/Unix
          -CLI BASED: EX, ED, VI
          -GUI BASED: Emacs,Gedit,nedit,nani,pico

Ø VI editor is a screen oriented text editor written by “Bill Joy” in 1976

Ø This is the most commonly used editor for editing files in Linux

VI EDITOR MODELS:
       
        VI editor has 3 models of operation

Ø Command mode
Ø Insert mode
Ø EX mode(extended mode)







Command Mode:

·        dd                - Delete’s a line
·        ndd              - Delete’s ‘N’ lines
·        yy                - Copies a line
·        nyy              - Copies ‘N’ lines
·        p                  - Put(pastes the deleted or copied text)
·        u                  -Undo(you can undo 1000times)
·        ctrl+r            -redo
·        G                 -Moves the cursor
·        /<word to final> -Finds a word(press for next)

INSERT MODE:

·        i                   -Inserts the texts at the current cursor
                       Position
·        I                   -Inserts the text in beginning of line
·        a                  -Adds the text after the current cursor
                       Position
·        A                  - Adds the text at the end of line
·        o                  -Inserts the text one line below current
                       Cursor position
·        O                 - Inserts the text one line above current
                            Cursor position
EXTENDED MODE:

·        q                  -Quit without saving
·        q!                 -Quit forcefully without saving
·        w                  -Write(save)
·        wq                -Save and Quit
·        wq!              -Save and Quit forcefully
·        se nu           -Set line numbers
·        se nenu        -Removes line numbers



### TO CREATE A FILE WITH DATA ####
# cat > (filename)
# cat > linux
This is linux
Press ctrl+D to save & quit the file
# cat linux (to read the file)

#### TO APPEND THE DATA WITHOUT OVERWRITING ####
# cat >> linux
Added data by root
Press ctrl+D to save & quit the file
# cat linux (read the file)

#### TO CREATE MULTIPLE FILES WITHOUT DATA ####
# Touch unix solaris redhat
# ls (to check)

#### TO CREATE A DIRECTORY ####
# mkdir <dir_name>
# mkdir zoom
# ls (to check)
# cd zoom (to enter into dir)
# cd (to come out)

#### TO CREATE A MULTIPLE DIRECTORIES ####
# mkdir zoom1 zoom2 zoom3 zoom4
# ls (to check)

#### TO CREATE A PARENT DIRECTORY ####
# mkdir –p world/asia/india/ap/hyd/dsnr/zoom
# ls –R world (to check)

#### NAVIGATION OF DIRECTORIES ####
# cd world/asia/india/ap/hyd/dsnr/zoom
# pwd (to check)
# cd .. (to come 1 step back)
# cd ../.. (to come 2 step back)
# cd ../../.. (to come 3 step back)
# cd – (to go at last working directory)
# cd (to go at user home directory)
# pwd (to check)


#### TO CHECK AND CHANGE THE DATE & TIME ####
# date (to check)
# date –s “wed Mar 19 12:00:00 IST 2014”

#### TO CHECK THE CALENDER ####
# cal (for current month & year)
# cal 2014 (for year)ot be
# cal 5 2014 (for particular month & year)

#### TO OPEN THE CALCULATOR ####
# bc
1+2+3
7
Type „q‟ to come out

#### TO GET THE HELP RELATED TO ANY COMMAND ####
# man <command name>
# man cat (for example)
Type „q‟ to come out

#### TO SHUTDOWN THE SYSTEM ####
# init 0

#### TO RESTART THE SYSTEM ####
# init 6

#### TO SEARCH FILES OR DIRECTORIES ####
# find / -iname <filename or dirname>

#### TO ACCESS ANY LOCATION IN GUI ####
# nautilus <Path>
# nautilus /etc (for example)

#### TO COPY A EXISTING FILE WITH NEW NAME ####
# cp <source_file> <new_name>
# cp linux unix
# ls (to check)
# cat unix (to read)

#### TO COPY FILE INTO DIFFERENT LOCATION ####
# cp (filename) (destination)
# cp linux /opt
# ls /opt (to check)

#### TO COPY MULTIPLE FILES ####
# cp unix redhat solaris /opt
# ls /opt (to check)

#### TO COPY DATA FROM SOURCE FILE TO DESTINATION WITHOUT
OVERWRITING ####
# cat (source_file) >> (destination_file)
# cat linux >> redhat
# cat redhat (to check)

#### TO COPY A DIRECTORY ####
# cp –rv (source_dir) (destination)
# cp –rv zoom /opt
# ls /opt (to check)

#### TO COPY MULTIPLE DIRECTORIES ####
# cp –rv zoom1 zoom2 zoom3 /opt
# ls /opt (to check)

#### TO COPY COMPLETE DATA FROM PRESENT WORKING LOCATION ####
# cp –rv * /media
# ls /media (to check)



#### TO CUT & PASTE FILE OR DIRECTORIES ####
# mv (source_dir or file) (destination)
# mv zoom /mnt
# ls (to check)
# ls /mnt (to check)

#### TO RENAME A FILE OR DIRECTORY ####
# mv (existing_name) (new_name)
# mv zoom1 zoomgroup
# ls (to check)

#### TO REMOVE A FILE OR DIRECTORY ####
# rm (filename)
# rm –rf (directory_name)

### TO OPEN THE TASK MANAGER ####
# ps –aux

#### TO KILL THE PROCESS OF RUNNING APPLICATION ####
# kill -9 (process_id)
# kill -9 2354 (for example)

#### TO CHECK THE CONFIGURATION OF CPU ####
# cat /proc/cpuinfo

#### TO CHECK THE RUNNING PROCESS OF CPU ####
# top

#### TO CHECK THE OS VERSION ####
# cat /etc/redhat-release

#### TO CHECK THE LAST LOGIN TIME ####
# last
(1)USER ADMINISTRATION PRACTICAL STEPS

'#### TO CREATE A USER ####'
# useradd <username>
# useradd tom
'#### TO CHECK THE USER DETAILS ####'
# cat /etc/passwd (for complete details)
# tail /etc/passwd (for last 10 users details)
# tail -3 /etc/passwd (for last 3 users details)
# head /etc/passwd (for top 10 users details)
# head -3 /etc/passwd (for top 3 users details)
# grep tom /etc/passwd (for particular user details)

'#### ASSIGNING A PASSWORD TO USER ####'
# passwd <username>
# passwd tom
Password: 1
Re-Password: 1

'#### TO CHECK THE USER PASSWORD DETAILS ####'
# cat /etc/shadow
# tail /etc/shadow

'#### TO CHECK THE PASSWORD ENCRYPTION TOOL ####'
# passwd -S <username>
# passwd -S tom

'#### TO LOGIN WITH A USER ####'
# su - tom (In root Console)
# exit (to logout)
# gdmflexiserver (to open extra graphical console)
Select the user and enter the password
Create Some Data
Go to root console by pressing ctrl+alt+F1
And check the user data
# ls /home/tom/Desktop
# who (to get the details of active users)

'#### TO LOCK A USER ####'
# usermod -L <username>
# usermod -L tom
# grep tom /etc/shadow (to check)
'!' sign indicates that a user is lock
# gdmflexiserver
Try to login with user tom

'#### TO UNLOCK A USER ####'
# usermod -U <username>
# usermod -U tom
# grep tom /etc/shadow (to check)
# gdmflexiserver
Try to login with user tom

'#### TO CHECK THE MAIL ACCOUNT OF USERS ####'
# cd /var/spool/mail
# ls (to check)

'#### TO CHECK THE GROUP OF THE USER ####'
# tail /etc/group























GROUP ADMINISTRATION

Content of /etc/group:
The information of each group created is stored in a separate line in the file /etc/group
Each record has 4 fields separated by:
As given:
Linux :                 x:                1000:                   ccna,ccnp
  
Group name:                LINUX
Mask password: X
GIP:                               1000
Secondary mask pwd:ccnp

Content of/etc/gshadow:
This fie content the encrypted group pwd
Passwords are encrypted using MD5(message digest version5)

Linux1:abcd8:adminname:ccna,ccnp

Group name:                                             linux
Encrypted pwd:                                        abcd8
List of administrative members:            adminname
List of members:                                      ccnp



'#### TO CREATE A GROUP ####'
# groupadd <group_name>
# groupadd zoom
# tail /etc/group (to check)

'### TO ADD A SINGLE USER INTO GROUP ###'
# gpasswd -a <username> <groupname>
# gpasswd -a a1 zoom
# grep zoom /etc/group (to check)

'### TO ADD MULTIPLE USERS INTO GROUP ###'
# gpasswd -M a2,a3,a4 zoom
# grep zoom /etc/group (to check)


### TO REMOVE A USER FROM GROUP ###'
# gpasswd -d <username> <groupame>
# gpasswd -d a4 zoom
# grep zoom /etc/group (to check)

'### TO MAKE A USER AS GROUP ADMIN ###'
# gpasswd -A <username> <groupname>
# gpasswd -A a2 zoom
# grep zoom /etc/gshadow (to check)
# su - a2 (to check,login as a user)
# gpasswd -d a3 zoom (try to remove)
# gpasswd -a a5 zoom (try to add)
# grep zoom /etc/group (to check)
# exit (logout)

'### TO RENAME A GROUP ###'
# groupmod -n <newname> <oldname>
# groupmod -n zoomgroup zoom
# tail /etc/group (to check)
'## TO REMOVE A GROUP ###'
# groupdel zoomgroup
# tail /etc/group (to check)
PERMISSIONS

Basic file pemissions:
Files and directory attributes:
Unix/linux files have 8 attributes that can be seen with ls –ld
 commands
Ex: [root@comp1~]#ls  -ld mcse
Note: Only the owner or the root can change the permissions
#### TO CREATE A FILE ####
# cat>mcse
This is a root file

#### TO CHECK THE PROPERTIES OF FILE####
# ls    -ld mcse
                                                                                  
#### TO CHANGE THE PERMISSIONS OF FILES FOR OTHERS####
# chmod 455 mcse

#### TO CHECK  ####
# ls     -ld mcse
#### TO CHANGE THE PERMISSIONS FOR GROUP####
# chmod 45 mcse

#### TO CHECK  ####
# ls     -ld mcse
#### TO CHANGE THE  GROUP OWNER####
#groupadd mcse
#chgrp mcse


#### TO CHECK  ####
# ls     -ld mcse
#### TO CHANGE THE  OWNER####
#chown ccna mcse
#### TO CHECK  ####
# ls     -ld mcse


ACL
Access control list:
Ø Access control is used to apply different permissions for different users& different groups
Ø ACL is imolemented with the help of “setfacl”.
Ø To check the ACL we can use the command”getfacl”
          To apply different permissions for different users
#### TO CREATE A FILE ####
# cat>mcse
This is a root file

#### TO CREATE A USER ####
# useradd u1
# useradd u2

#### TO APPLY ACL ####
#setfacl   _m  u:U1:r,u:U2:w,u:U3:rw  ccnp

#### TO CHECK  ####
#getfacl ccnp

#### TO ALLOW USER  TO ENTER INTO ROOT####
#chmod 666/root

#### TO VERIFY THE RESULT  LOGIN&USER####
#su_u1/ su u1
#### TO APPLY ACL FOR GROUPS####
#groupadd mcse
#groupadd ccna
#groupadd ccnp

Create users to add in  group:
# useradd m1
# useradd m2
# useradd c1
# useradd c2
# useradd n1
# useradd n2

To add all users into group:
#gpasswd  -M m1,m2      mcse
#gpasswd  -M c1,c2         ccna
#gpasswd  -M n1,n2        ccnp
#### TO APPLY DIFFERENT PERMISSIONS FOR DIFFERENT  FOR GROUPS####
#setfacl   _m  g:mcse:4;g:ccna:2;g:linux:6  ccnp

#### TO CHECK  ####
#getfacl ccnp

#### TO VERIFY THE RESULT  LOGIN&USER####
#su m1
#### TO COMEOUT  ####
#exit
PARTITIONS

DIVIDING OF HARDDISK SPACE INTO LOGICAL VALUES:
Advantages:
Ø Installing OS into multiple partitions
Ø To store the data
Ø To check the size of Harddisk
Types of Harddisks and no. of Partitions
#fdisk  -l
#### TO CHECK THE TYPES OF PARTITIONS ####
#parted

There 4 stages of creating Partition:
1st Stage:
Ø Verify linux partition by assigning sizes
2nd Stage:
Ø Activating/updating partition KERNEL
3rd Stage:
Ø Formatting
4th Stage:
Ø Mounting
Ø Accessing your new partition with the help of directory
'Step 1:-Check the Existing Partitions'
# fdisk -l (to check)

'Step 2:-To create a New Partition'
# fdisk /dev/sda
Press 'm' for help
Press 'p' to check the exisiting partitions
Press 'n' to create a new partition
Enter the Size: +1G (for example)
Press 'p' to check
Press 'w' to save & quit

'Step 3:-Activate the New Changes to Kernel'
# partx -a /dev/sda (run this 2 times)

'Step 4:-Format the Partition'
# mkfs.ext4 <partition_no>
# mkfs.ext4 /dev/sda8 (for example)

'Step 5:-To Use the Partition-Create Mount Point'
# mount <partition_no> <mount_point>
# mount /dev/sda8 /mnt
# mount (to check)
# cd /mnt (to access the partition)
# ls (to check)
'lost+found' dir is the indication of partition
# mkdir zoom{1..100} (create some data)
# ls (to check)

'#### TO CHECK THE FILESYSTEM OF PARTITIONS ####'
# blkid

'#### TO CHECK THE FREE SPACE OF THE PARTITION ###'
# df -h

'#### TO CHECK THE USED SPACE OF THE PARTITION ####'
# du –sh


'#### TO CHECK THE FREE SPACE OF THE HARDISK ####'
# parted
Type: print free
Type: quit (to come out)

'#### TO REMOVE THE MOUNT POINT(LINK) ####'
# umount <partition_no>
# umount /dev/sda8 (for example)
# mount (to check)

'#### TO DO THE PERMANENT MOUNTING ####'
# vim /etc/fstab (open this file)
Come at last & do the changes as given below
/dev/sda11 /mnt ext4 defaults 0 0
'partition_no' 'mount_pt' 'filesystem'
:wq(save & quit the file)
# init 6 (reboot the pc)
# mount (to check the permanent mount point)












LVM(LOGICAL VOLUME MANAGER)

Ø Creating a new partition
Ø Updating the partition
Ø LVM
Ø Formatting
Ø Mounting

è      LVM is a method of Hard disk space into logical  
         Volumes that can be easily resized.
è      With LVM the hard drive or set of hard drives is
          Allocated to one or more physical volumes.
è      The physical volumes are then combined into
 Volume groups.
è      Fetch volume group is divided into logical volumes,  
Which are formatted with a file system like ent3 and are then mounted

##### TO IMPLEMMENT LVM ON PARTITIONS #####
'Step 1:-Create 3 Raw Partitions'
# fdisk -l (to check)
# fdisk /dev/sda (to create-see partition notes)
# partx -a /dev/sda (to update kernel)

'Step 2:-Create Physcial Volume'
# pvcreate <partition_no's>
# pvcreate /dev/sda{12..14} (for example)
# pvdisplay (to check)
'Step 3:-Create Volume Group'
# vgcreate <vg_name> <partition_no's>
# vgcreate zoom /dev/sda{12..14}
# vgdisplay (to check)

'Step 4:-Create Logical Volume'
# lvcreate -L <size> <vg_name> -n <lv_name>
# lvcreate -L +500M zoom -n linux
# lvdisplay (to check)

'Step 5:-Format LV & Mount to Use'
# mkfs.ext4 /dev/zoom/linux
# mkdir /lvm (create new dir for mount point)
# mount /dev/zoom/linux /lvm (to mount)
# mount (to check)
# cd /lvm (access mount point to use LV)
# mkdir zoom{1..100} (create some data)
# ls (to check)
# df -h (to check the free space of partition)

'Step 6:-To Resize the Partition'
# cp -rv /usr/* /lvm (to make partition size full)
# df -h (check the size)
# lvresize -L +500M /dev/zoom/linux (to resize)
# resize2fs /dev/zoom/linux (to resize filesystem)
# df -h (check the extended size)

'Step 7:-To Remove LVM Concept from Partition'
# umount /lvm (un mount the lv)
# lvremove /dev/zoom/linux (1st remove lv)
# lvdisplay (to check)
# vgremove /dev/zoom (2nd remove vg)
# vgdisplay (to check)
# pvremove /dev/sda{12..15} (3rd remove pv's)
# pvdisplay (to check)



SWAP: Swap is called as Logical RAM. It is used to create
      Free space for the physical RAM.
By making(accessing and sleeping memory into SWAP)
There by a SWAP increases system performances
##### TO CREATE A SWAP PARTITION #####
'Step 1:-Check the RAM size'
# free -m (to check the RAM size in MB)

'Step 2:-Create One Partition'
# fdisk /dev/sda (to create)
Press 'n' to create new partition
Enter the size: +4G (for example 4GB)
Press 't' to change the ID of Partition
Enter Partition No:16 (for example)
Press 'L' to get the list of availabel ID's
Enter 82 for swap
Press 'p' to check
Press 'w' to save & quit

'Step 3:-Update & Format the Partition'
# partx -a /dev/sda (to update)
# mkswap /dev/sda16 (to create swap filesystem)
# blkid /dev/sda16 (to check)

'Step 4:-Enable the Swap Service'
# swapon /dev/sda16 (to enable)
# free -m (to check RAM size)
# swapon -s (to check the status of swap partition)

'Step 5:-To Disable the Swap Service'
# swapoff /dev/sda16 (to disable)
# free -m (to check the RAM size)
# swapon -s (to check the status)        

FTP SERVER

FTP SERVERS ARE TWO TYPES:
Ø DOWNLOADING
Ø UPLOADING
FTP(File Transfer Protocol):
Ø FTP is one of the oldest member of tcp/ip protocol stack and still in common use
Ø As the name suggests, it is optimized for transferring files
NOTE: This was introduced by USRVM
FTP SERVER FOR LINUX/UNIX:
VSFTPD: Very Secure FTP Document
Ø It is inbuilt application.
Ø It is securable
WUFTP: Washington Universities(St.LOUIS) FTP
PROFTPD: Professional FTP document.

Aim:  FTP server is used to transfer the file in the form of
          Uploading/Sending and Downloading/Receiving the files
Category: It is a independent service i.e., it can used in any OS.
Package: VSFTP
Configuration file: vi/etc/vsftpd/vsftpd.config
Default path: /var/ftp/pub
Port Numbers: 20-DATA TRANSFER,21-CONTROL CONNECTION   


##### TO CONFIGURE THE FTP SERVER #####
'Step 1:-Check the IP & Assign the Hostname'.
# ifconfig (to check ip)
# hostname ftp.zoom.com
# vi /etc/hosts (provide host entry with ip)
Come at last & provide the ip and hostname as given below:-
192.168.0.100 ftp.zoom.com
:wq(save & quit the file)
# vi /etc/hostname (to make host permanent)
Remove localhost.localdomain and add ftp.zoom.com
:wq(save & quit the file)

'Step 2:-Install the Package'
# yum install vsftpd* -y

'Step 3:-To Provide Downloading'
# cd /var/ftp/pub (for downloading)
# touch linux{1..5}.xls (add files for downloading)
# ls (to check)

'Step 4:-Restart the Service'
# service vsftpd restart
# systemctl enable vsftpd.service (to enable permanently)
# systemctl list-unit-files | grep vsftpd.service (to check)

'Step 5:-Stop the Firewall Service If Enable'
# service firewalld stop (stop firewall service)
# systemctl disable firewalld.service (to disable permanently)
# service iptables stop (stop iptables service)
# systemctl disable iptables.service
DISABLE SELINUX SERVICE PERMANENTLY
# vim /etc/selinux/config (open selinux conf file)
Go to line number 7 & change the Status as given below
SELINUX=disabled
:wq(save & quit the file)
# init 6 (restart is required to update selinux service)

'Step 6:-Check the Result From Client'
IN THE CLIENT PC
# yum install ftp* -y (install this command)
# ftp <server_ip>
# ftp 192.168.0.100 (for example)
Username: ftp (for public user)
Password: enter
ftp> ls
ftp> cd pub
ftp> ls (to check files)
ftp> mget linux* (to download multiple files)
ftp> bye (logout)
# ls (to check the downloaded files)
# firefox ftp://192.168.0.100 (to access in gui)

'Step 7:-To Provide Uploading - Go to FTP SERVER'
# cd /var/ftp (in ftp server pc)
# mkdir upload (create one dir for uploading)
# chmod 777 upload (give full permission)
# vim /etc/vsftpd/vsftpd.conf (open configuration file)
Go to the line no.29 & remove # sign
:wq(save & quit the file)
# service vsftpd restart

'Step 8:-To Upload - Go to Client PC'
# touch unix{1..5}.xls (create some files to upload)
# ftp 192.168.0.100 (access ftp server)
Username:ftp Password:enter
ftp> ls
ftp> cd upload (for uploading)
ftp> prompt (to avoid confirmation)
ftp> mput unix* (to upload multiple files)
ftp> bye (to logout)
TO CHECK THE UPLOADED FILES - GO TO FTP SERVER & CHECK IN THE
LOCATION /var/ftp/upload
# ls /var/ftp/upload (in ftp server pc)

'#### TO BLOCK PUBLIC USER ACCESS ####'
# vim /etc/vsftpd/vsftpd.conf
Go to line no.12 & Replace YES with NO at last
:wq(save & quit the file)
# service vsftpd restart
TO CHECK THE RESULT: GO TO THE CLIENT PC & TRY TO ACCESS FTP
SERVER AS A PUBLIC USER

'#### TO BLOCK A PARTICULAR NORMAL USER ACCESS ####'
# cd /etc/vsftpd
# vi ftpusers (open this file)
At the Normal User Name at last line to block
tom (for example)
:wq(save & quit the file)
# service vsftpd restart
TO CHECK THE RESULT: GO TO THE CLIENT PC & TRY TO ACCESS FTP
SERVER AS A NORMAL USER (tom)

'#### TO BLOCK THE ALL NORMAL USER ACCESS ####'
# vim /etc/vsftpd/vsftpd.conf
Go to line no.16 & Replace YES with NO at last
:wq(save & quit the file)
# service vsftpd restart
TO CHECK THE RESULT: GO TO THE CLIENT PC & TRY TO ACCESS FTP
SERVER AS ANY NORMAL USER

DNS(DOMAIN NAMING SYSTEM)
DOMAIN NAMING SYSYTEM:
Ø The DNS is a hierarchical naming system where each level of name separated by a”. ”
Ø It resolves user friendly domain names into computer friendly IP addresses
Ø It also resolves IP address into domain
Ø It provides a centralized database for resolution
ZONE:
Ø Zone is a storage data base which contains the all records.

There are 2 ZONES:
Ø Forward look up zone
Ø Reverse look up zone

Forward look up zone:
Ø Used for resolving Host name to IP addresses
Ø It maintains Host to IP addresses mapping information

Reverse look up zone:
Ø Used for resolving IP addresses to Host name
Ø It maintains IP addresses to Host mapping information



RECORDS
SOA Record:
Ø Start  of authority
Ø It is the first record in zone file
NS Record:
Ø Name  server
Ø Identifies the DNS for each zone
A Record:
Ø Address
Ø Maps a host name into an IP address
CNAME Record:
Ø Canonical name(Alias)
Ø Maps on alias name to hostname
PTR Record:
Ø Pointer
Ø Maps on IP address to a host name
MX Record:
Ø Mail exchange
Ø Maps on a domain name to host name
Aim:DNS server is used to resolve name into IP address and IP
         address into Host name with help of Forward look up zone 
         and Reverse look up zone
Category: It is a independent service can be us as OS.
Package: BIND
Config files: vi/etc/named.config
Default path: var/named,              Port Number: 53
#### TO CONFIGURE THE DNS SERVER ####
'Step 1:-Check the IP & Assign the Hostname'
# ifconfig (to check)
# hostname dns.zoom.com
# vi /etc/hosts (provide host entry with ip)
# vi /etc/hostname (to make host permanent)

'Step 2:-Install the Package'
# yum install bind* -y

'Step 3:-Edit 1st Main Configuration File'
# vim /etc/named.rfc1912.zones
Set the line no & do the modification
line no 19-23 for FORWARD LOOKUP ZONE (FLZ)
line no 31-35 for REVERSE LOOKUP ZOME (RLZ)
(Line no:19-23)
zone "zoom.com" IN {
type master;
file "forward";
allow-update { none; };
};
(Line no:31-35)
zone "0.168.192.in-addr.arpa" IN {
type master;
file "reverse";
allow-update { none; };
};
:wq(save & quit the file)




'Step 4:-Create Zone Files in DNS Database'
# cd /var/named (to access dns database)
# cp -p named.localhost forward (for FLZ)
# cp -p named.loopback reverse (for RLZ)
# ls (to check)
# vim forward
Do the modification as given below near the objects
SOA dns.zoom.com. rname.invalid. (
NS dns.zoom.com.
dns A 192.168.0.100
:wq(save & quit the file)
# vim reverse
Do the modification as given below near the objects
SOA dns.zoom.com. rname.invalid. (
NS dns.zoom.com.
100 PTR dns.zoom.com.
:wq(save & quit the file)

'Step 5:-Edit 2nd Main Configuration File'
# vim /etc/named.conf
Go to line no.11 & add self system ip,as given below
listen-on port 53 { 127.0.0.1;192.168.0.100; };
Go to line no.17 & allow query to all,as given below
allow-query { localhost;any; };
:wq(save & quit the file)

'Step 6:-Edit 3rd M.C.F'
# vim /etc/resolv.conf
nameserver 192.168.0.100
:wq(save & quit the file)
'Step 7:-Restart the Service'
# service named restart
# systemctl enable named.service
'Step 8:-To Check the DNS Configuration'
# dig dns.zoom.com (to resolve with name)
# dig -x 192.168.0.100 (to resolve with ip)
NOTE:-If you got Answer:1,then configuration is correct
If you got Answer:0,then configuration is incorrect

'Step 9:-To Check the Configuration from Client'
Go to Client PC
# vi /etc/resolv.conf (in client pc)
nameserver 192.168.0.100
:wq(save & quit the file)
# dig dns.zoom.com.
# dig -x 192.168.0.100
# ping dns.zoom.com (to check the ip)

'TO ADD THE SERVERS INTO DNS,BELONGS TO SAME DOMAIN'
(1)Configure One Server in Separate PC (for ex:ftp server) with
the Hostname: ftp.zoom.com IP:192.168.0.99 for example
(2)Add this Server Entry with IP into DNS - FLZ file
# cd /var/named (in dns server)
# vim forward (open flz)
add the entry as given below
NS dns.zoom.com.
NS ftp.zoom.com.
dns A 192.168.0.100
ftp A 192.168.0.99 (for ex:ftp server ip)
:wq(save & quit the file)
# service named restart
(3)To check the Result-Go to Client PC & Add the DNS
Ip into resolv.conf file & try to access FTP Server with

APACHE
WEB SERVER

WEB SERVER: To host web pages which contains information

Web server in Unix/Linux:
Ø Tux –in-Kernel web server that supports only text
Ø Apache- The most popular web server
Ø AOL- American Online Free web server
Ø Sun one- web server frm sun previously called as iplanet

Apache:
Ø Apache is a free and open source software
Ø The application is available for a wide variety of OS
Including linux,unix& windows
Ø The majority of all web servers using apache server are Linux web server
Ø It supports virtual hosting

Virtual Hosting:
Ø Hosting more than one web site on a single server is called as Virtual Hosting
Ø Types of Virtual Hosting:
§  Name based virtual hosting
§  Ip based virtual hosting
§  Port based virtual hosting

AIM:  Web server is used to host the web pages ,to publish the
           information to the publisher
Category:  It is independent service
Package: httpd.rpm
Configuration: vi/etc/httpd/conf
Default path: /var/www/html
Port number: 60
Service:httpd

###TO CHECK THE IP ADDRESS###
#ping 192.168.0.250

###TO ASSIGN HOST NAME###
#hostname www.zoom.com
#vi/etc/hostname

###TO INSTALL THE PACKAGE###
#yum install http –y

###GO TO CONFIGURATION FILE###
<virtualHost                                                  *:80>
Server Name                                                 www.zoom.com
Server Admin                                                root@www.zoom.com
Document Root                                            /var/www/html
Directory Index                                             zoom.html
</virtualHost>

###GO TO DEFAULT PATH###
#cd /var/www/html

###CREATE WEB PAGE USING HTML###
#vi    zoom.html
<html>
<body bgcolor=blue>
<marquee><h1>welcome</h1>
</marquee>
</html>
###RESTART THE SERVICE###
#systemCH            restart                             httpd.service
#iptube      -F
#setenforce 0
###TO CHECK WEB PAGE###
#vu/etc/hosts
###TO ACCESS FROM IP ADDRESS###
#vi/etc/httpd/conf/httpd.com
:s nu
G  i
<virtual host 192.168.0.18:80>
Esc
:nq
#systemCH restart httpd.service
###TO HOST WEB PAGE ON DIFFERENT PORT NUMBERS###
<isten2007
192.168.0.18:2007>

DHCP(DYNAMIC HOST CONFIGURATION PROTOCOL)

Aim: DHCP server is used to assign the ip address automatically
Category:  It is independent service
Package: dhcp
Configuration: vi  etc/dhcp/dhcp.conf
Working:It works on  “DORA” process
                    D=Discovery
                    O=Offer
                    R=Request
                    A=Acknowledge                             
Port number: 61(DHCP Server),             68(DHCP CLIENT)
Service:dhcpd

#### TO CONFIGURE THE DHCP SERVER ####
'Step 1:-Install the package'
# yum install dhcp* -y
'Step 2:-Copy Sample Files Data into Main File'
# cd /usr/share/doc/dhcp*
# ls (to check)
# cp dhcpd.conf.example /etc/dhcp/dhcpd.conf
'Step 3:-Edit the M.C.F'
# vim /etc/dhcp/dhcpd.conf
Set the line no's & Do the changes from line no.47-53
(line no:47-networkaddress,48-ip range,49-dns ip,50-domain name,51-
gateway,52-broadcast ip,53-time)
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.160 192.168.0.190;
option domain-name-servers 192.168.0.250;
option domain-name "ldap.zoom.com";
option routers 192.168.0.254;
option broadcast-address 192.168.0.255;
default-lease-time 700;
:wq(save & quit the file)
'Step 4:-Restart the Service & Check Result'
# service dhcpd restart
# systemctl enable dhcpd.service
GO TO LINUX CLIENT:-
# dhclient -v (to get dynamic ip)
# ifconfig (to check dynamic ip)
IN THE CLIENT PC - DYNAMIC IP YOU WILL BE GETTING FROM REVERSE ORDER
FROM DHCP SERVER
'Step 5:-For the Dhcp Reservation'
# arp (client_pc_ip) to get the mac address
# arp 192.168.0.190 (for example)
Copy the MAC Address & Paste in M.C.F
# vim /etc/dhcp/dhcpd.conf
Go to line no.76 & paste mac address as given below
hardware ethernet 00:07:e9:00:02:69;
Go to line no.77 & Reserve the Ip as given below
fixed-address 192.168.0.160;
:wq(save & quit the file)
# service dhcpd restart
TO CHECK THE RESULT - GO TO THE PARTICULAR MAC ADDRESS CLIENT:-
# dhclient -v (run this command)
# ifconfig (to check reserved ip)

MAIL SERVER
To exchange the mail communication
Unix/Linux based mail server
Ø Send mail
Ø Post fix
Ø Qmail
Ø Gmail
Ø Exim

Aim:   Mail server is used to exchange mails for the
            Communication purpose
Category:  It is independent service
Package: postfix
Configuration: vi  /etc/postfix/mail.conf
Working:It works on  “DORA” process
                    D=Discovery
                    O=Offer
                    R=Request
                    A=Acknowledge                             
Port number: INCOMING SERVICES       POP3-110,       imap-143
                             OUTGOING SERVICES     SMTP-25
Service:POSTFIX



###TO CHECK THE IP ADDRESS###
#ifconfig
#ping 192.168.0.250

###TO ASSIGN HOST NAME###
#hostname mail.zoom.com
I
esc
:wq

###TO INSTALL THE PACKAGE###
#yum install postfix –y

###GO TO CONFIGURATION FILE###
#vi   /etc/postfix/main.cf
:se    nu                                                        
113—remore
116—adding#

###CREATE USERS###
#useradd  u1
#useradd  u2
###ASSIGN THE PASSWORD TO USER###
#passwd U1
#passwd U2
###RESTART THE SERVICE###
#systemCH            restart                             postfix.service
#iptube      -F
#setenforce 0


---------------------------------------THE END----------------------------------------




Demikianlah Artikel INTRODUCTION OF LINUX

Sekianlah artikel INTRODUCTION OF LINUX kali ini, mudah-mudahan bisa memberi manfaat untuk anda semua. baiklah, sampai jumpa di postingan artikel lainnya.

Anda sekarang membaca artikel INTRODUCTION OF LINUX dengan alamat link https://aplikasimateri.blogspot.com/2017/01/introduction-of-linux.html

0 Response to "INTRODUCTION OF LINUX"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel