HardLink/Softlink
Hard link is a mirror copy of a original file. The difference of Hardlink and softlink is that removing original file will not affect a hardlink
Softlink also called as symbolic link, thats A SPECIAL SOR OF FILE POINT TO DIFFERENT location.
- Linux Booting process:
When we first turn on your computer, the BIOS first performs some integrity checks of the HDD or SSD.
Then, the BIOS searches for, loads, and executes the boot loader program, which can be found in the Master Boot Record (MBR). The MBR is sometimes on a USB stick or CD-ROM such as with a live installation of Linux.
Once the boot loader program is detected, it's then loaded into memory and the BIOS gives control of the system to it.
MBR stands for Master Boot Record, and is responsible for loading and executing the GRUB boot loader.
The MBR is located in the 1st sector of the bootable disk, which is typically /dev/hda, or /dev/sda, depending on your hardware. The MBR also contains information about GRUB, or LILO in very old systems.
If we have multiple kernal installed, the Grup window list it for and we ca choose the kernal from there. Otherwise, it load the default kernal
In thins stage, Kerla first load the root file system that specified in the grub.conf, then it execute /etc/init program.
The kernel then establishes a temporary root file system using Initial RAM Disk (initrd) until the real file system is mounted. It also contains necessary drivers compiled inside, which helps it to access the hard drive partitions, and other hardware.
Init identifies the default initlevel from /etc/inittab and uses that to load all appropriate program.
* What is inode number
An inode is a data structure on a traditional Unix-style file system such as UFS or ext3. An
inode stores basic information about a regular file, directory, or other file system object
iNode number also called as index number, it consists following attributes:
File type, Permissions, Owner, Group, File Size
find out the inode number using ‘ls -il’ command then run below command
* How can we increase disk read performance in single command
blockdev –getra /dev/sdb
blockdev –setra 1024 /dev/sdb - Fr set
* How many default number of Shells available and what are their names?
SH, BASH, CSH, TCSH, NOLOGIN, KSH
* Command to check PCI devices vendor or version
Ans : lspci
* Port Numbers
ftp 20/21,
Teslnet - 23
SMTP/SMPTS 25/465
POP3/POP3S 110/995
IMAP/IMAPS 143/993
MySQL - 3306
*. Disable ping to avoid network/ICMP flood
Set following in /etc/sysctl.conf : net.ipv4.icmp_echo_ignore_all = 1
sysctl -p
* SYN Flood : A SYN flood occurs when a host sends a flood of TCP/SYN packets, often with a fake/forged sender address. Each of these packets is handled like a connection request, causing the
Apache Ports:
---------------
200 – content found and served OK
301- moved permanently
400 - bad request, server is confused with the request. generally bad syntax in the request or handler issue
403 – tried to access restricted file/folder
404 - not found
500 - Internal Server error
502 - Bad gateway erro
503 – the server is too busy to serve the request and in another word – service unavailable.
10 Important commands
-------------------------
chown
chmod
tar
ls, cd , cat
touch, vi,
rsync, scp
cut,
MySQL installation and troubleshooting
----------------------------------------
dnf install mysql-server
systemctl start mysqld.service
systemctl enable mysqld
mysql_secure_installation
Dump a particular table:
mysqldump u hhh -p dbname mytable > mytable.sql
mysql -u root -p database < mytable.sql
Little on Networking side
--------------------------
TCP/UDP
Ecommerce troubleshooting
-----------------------------
Magento:app/etc/local.xml
OpenCart
*How to improve the performance of magento
Disable any unused modules
Magento Caching
Optimize your Server
Use a Content Delivery Network (CDN)
Put Stylesheets at the Top
Put Scripts at the Bottom
Avoid CSS Expressions
Disabling Magento Log
improve the image
Wordpress optimize
--------------------
Page caching.
Database caching.
HTML/CSS/JavaScript minification.
Image compression.
Page compression with Gzip.
Gzip compression is enabled automatically. For more information about what Gzip compression and the mod_deflate module do, please see this article.
CAPTCHAs on comment forms and login pages.
Randomized login page URLs.
Amazon CloudFront
DNS
------
Why would like to choose Webscale
---------------------------------
I'm working in current organization for quite a long 4 years, while Im greatful for all the oportunities that I got there. I felt that its time for a change to expand my skill sets, so I applied here in webscale since the jobdescription is better matching with my current profile. Also, by viewing your website and its products Im very impressed since you are providing cloud ecommerse hosting, I hope I will get a new plat form to improve my technical skills./'
rsources pre and felt this is the time to switch as I need to gain more knowledge and experience that
Sripting
------------
What command can be used to test if $a greater than 12?
The following command is used: [ $a -gt 12 ]
43) What Is The Difference Between $* And $@?]
$* - It treats the whole set of positional parameters as Single String
$@ - This considers every quoted argument as independent or separate arguments.
Cloud
------------
Aws codepipeline
Jenkin
Travis ci
Aws code commit
Magento
Drupal
Docker
Is there anything else?
Yes. Actually Ashok has given a brief introduction about the complany and the mode of working. If you dont mind could you please detail foabout the nature of work and infrastructure?
Shall I get a chance to travel abroad if I get placed in this company?
Im currently pursuing a DevOps course at Saidem. Its a 2 months course and only 10+ classes are completed for me. It covers:
Aws, GIT, DOcker, Jenkins, Ansible, Maven, Terraform etc. I believe that it will be help me to perform well in my Jobs here in WebSCale Networks.
-------------
Git
-----
We are using git to store scripts that we creating
Git pull - command to pull new updates to Git
Jenkins is an open source automation server. It helps developers or admins to Build, Test, and deployment.
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.
Maven is a build automation tool
Symbolic links, ssh, telnet,patching, aws
----------------------------------------
Cloud
----------
Cloud computing is the on-demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. Large clouds often have functions distributed over multiple locations, each location being a data center.
> SnowBall is a small application that enables you to transfer terabytes of data inside and outside of the AWS environment.
> CloudWatch helps you to monitor AWS environments like EC2, RDS Instances, and CPU utilization. It also triggers alarms depending on various metrics.
> route53 - DNS
------------------------
NFS
yum install nfs-utils
systemctl start nfs-server.service
rpcbind
# firewall-cmd --list-all
vi /etc/exports
/nfsshare 192.168.122.0/24(rw,sync)
Client:
yum install nfs-utils
showmount -e 192.168.122.239
mount -t nfs -o sync 192.168.122.239:/nfsserver
autofs: Autofs is a program that automatically mounts specified directories on an on-demand basis
yum install autofs
vi /etc/auto.master.d/share.autofs
vi /etc/auto.nfs
* -rw,sync,fstype=nfs4 10.255.36.152:/nfsshare/&
vi /etc/auto.master.d/share.autofs
In this file add following content
/mnt/nfsshare /etc/auto.nfs
/mnt/nfsshare Mount Point
/etc/auto.nfs Mapping file
Now edit /etc/auto.nfs file and add following content and save this file
#vi /etc/auto.nfs
* -rw,sync,fstype=nfs4 10.255.36.152:/nfsshare/&
Tomcat
------------
Tomcat is basically a webserver and Servlet system,
Apache Tomcat offers HTTP protocol, which means the user can connect with the server from anywhere by the URL provided and can access the Java application.
# Why do we require Apache Tomcat?
It is required to run Java Web Applications on the host and server-based systems. It also helps to run JSP and Servlets.
# What is the default port for Apache Tomcat?
8080
# What is the name of inbuilt Web Container in Tomcat?
Catalina which is present in the bin directory
# What are the types of batch file with the help of which we can Start and Stop Apache Tomcat Server?
Tuo types of batch files
Startup.bat
Shutdown.bat
#How to start and Stop Tomcat?
Services httpd start
Services httpd stop
# Which is the vital configuration file that is used in Apache Tomcat?
The vital configuration file that is used in Apache Tomcat is httpd.conf
# Explain the types of connectors used by Apache Tomcat.
HTTP connectors
AJP Connectors
# Mention the configuration files of Catalina.
The configurations files of Catalina include:
XML
Properties
Policy
Tomcat-users.xml
# What is the deployment process of web application using the WAR file?
There is a Web apps directory in Tomcat under which all the web components JSP, Servlets, HTML are placed. Hereby putting all the files into a single folder we can compress the files into a single unit which has .WAR extension.
Now, we can easily deploy the web application by putting the WAR file in the Web apps directory. And, when the server starts it extracts all the web components.
#Disaster Recovery:
--------------------
Backups
mirrored backups:
# LVM
-------
fdisk /dev/sdb
pvcreate /dev/sdb1
pvcreate /dev/sdc2
vgcreate vgname /dev/sdb1 /dev/sdc2
lvcreate -L size -n lvname vgname
pvcreate /dev/sdb2
vgextend vgname /dev/sdb2
lvextend -L3T /dev/vg00/sales-lv
resize2fs /dev/mapper/vg_cloud-LogVol00
lvreduce -L -2T vg00/sales-lv
Raid
========
0 - STriping, divide data into blocks, or stripes, and spread them across multiple physical disks
1 - maintains a complete copy of the data on a second, separate physical drive
2 - 2 spreads both data and parity information across multiple physical disks
3 -
10 - Rai1 and 0