LINUX
Name: Santhosh Kumar. L
Designation: Associate Technical Consultant
TABLE OF CONTENT
NFS- Network File System
Samba
File Transfer, Web Server and Remote access.
Apache (web Server)
Schedule Task
Special Permission
NETWORK FILE SYSTEM
Used in Unix to Unix server
It is a way to share the local hard drive files between machines which are
NFS compatible.
NFS uses upd protocol.
server port is 2049 and client port is 1024
Configuration file /etc./exports.
Commands used ?
Server:
# yum install nfs-server
# mkdir /public
# echo “/public *(rw,sync)” >> /etc/exports
# exportfs -rv
# setenforce 0
# systemctl restart nfs
Client:
# yum install nfs-utils
# mkdir /common
# echo “[Link]:/public /common nfs defaults 0 0” >>
/etc/fstab
# mount -a
SAMBA
Samba is an open-source implementation of the Server Message
Block (SMB) and Common Internet File System (CIFS) protocols
It provides file and print services between clients across various
operating systems
Used in both Linux to Linux and Windows to Linux.
To install and start samba:
# yum install samba* -y
# systemctl start [Link]
SCP - (SECURE COPY):
Secure copy is a utility to transfer files between computers in a
network
#scp <file name> username@ipaddress_of_pc:file_name
FILE TRANSFER, WEB SERVER AND
REMOTE ACCESS
Protocol used for file transfer are ftp and sftp.
Protocols used for remote access are telnet and ssh.
Apache is the web server on service in linux used to manage websites.
To Know:
NFS and Samba are used for file sharing
scp can also be used to transfer files.
APACHE
Apache is free and open-source software. It is developed and maintained
by the Apache Software Foundation.
Apache permits the owners of the websites for serving content over the
web. It is the reason why it is known as a "web server."
It is use to manage websites.
windows server install and conf with IIS.
Unix server install and conf with Apache can be used to manage
websites.
Configuration File path:
1. NFS: -----> /etc/exports
2. Samba: ------> /etc/samba/[Link]
3. Sftp: ------>/etc/vstpd/[Link]
4. SSH: ------->/etc/ssh/ssh_config
5. Apache(htpd):---> /etc/httpd/conf/[Link]
SCHEDULE TASK
We use the commands At and CRON TAB to schedule task to run
without manual intervention.
At is used to run a task at a particular time once.
CRON TAB is used to schedule a task regularly;
Using AT and CRON we can execute a commands automatically and
we can also executive script files automatically.
using at:
#date
#at time -----> At what time to schedule a task
at> #cmd -----> what task to perform
eg: at> #reboot
#ctrl +d -----> to exit from the at
Using CRON TAB:
Eg:
55 05 * * * /sbin/reboot
Definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR
sun,mon,wed,thu,.sat.
#| | | | |
#* * * * * user-name command to be executed
SPECIAL PERMISSION
TYPES:
suid --> u+s or 4
guid --> g+s or 2
sticky bit--> +t or 1
permissions for ugo are rwx rwx rwx
rws rws rwt
SUID GUID and sticky bit:
4 2 1 -----------> numerical value.