SlideShare a Scribd company logo
OPEN SOURCE SOFTWARE
(LINUX ADMINISTRATION)
Course Code -CSE0002
UNIT 1
Open Source and Linux
Open Source Definition, The distribution terms of open source software, open source technology importance,
Free and Open Source Softwares (FOSS), Introduction to Linux Operating system. LAMP (Linux, Apache,
MySQL, PHP, Python, and Perl). Benefits, Perspectives of Open Source software Linux and Open Source.
Course Outcomes:
At the end of this course, the students will be able to
• Understand the principles of Linux OS Administration.
• Create user accounts and assign different roles to the account created as per given requirements.
• Connect and work with PHP and MySQL as part of Linux Administration.
• Write and execute shell scripts for the given requirements.
Operating System Definition and Function
• In the Computer System (comprises of Hardware and software), Hardware can only understand
machine code (in the form of 0 and 1) which doesn't make any sense to a naive user.
• We need a system which can act as an intermediary and manage all the processes and resources
present in the system.
Operating System Definition and Function
• An Operating System can be defined as an interface between user
and hardware.
• It is responsible for the execution of all the processes, Resource
Allocation, CPU management, File Management and many other
tasks.
• The purpose of an operating system is to provide an environment in
which a user can execute programs in convenient and efficient manner.
Structure of a Computer System
• Users (people who are using the
computer)
• Application Programs (Compilers,
Databases, Games, Video player,
Browsers, etc.)
• System Programs (Shells, Editors,
Compilers, etc.)
• Operating System ( A special program
which acts as an interface between
user and hardware )
• Hardware ( CPU, Disks, Memory, etc)
What does an Operating system do?
1.Process Management
2.Process Synchronization
3.Memory Management
4.CPU Scheduling
5.File Management
6.Security
Types of Operating Systems (OS)
What is an Open-Source Operating System?
• The term "open source" refers to computer software or applications where the
owners or copyright holders enable the users or third parties to use, see, and edit
the product's source code.
• The source code of an open-source OS is publicly visible and editable. The usually
operating systems such as Apple's iOS, Microsoft's Windows, and Apple's Mac OS
are closed operating systems.
• Open-Source Software is licensed in such a way that it is permissible to produce
as many copies as you want and to use them wherever you like.
• It generally uses fewer resources than its commercial counterpart because it lacks
any code for licensing, promoting other products, authentication, attaching
advertisements, etc.
Open-source operating system
• The open-source operating system allows the use of code that is freely
distributed and available to anyone and for commercial purposes.
• Being an open-source application or program, the program source
code of an open-source OS is available.
• The user may modify or change those codes and develop new
applications according to the user requirement.
• Some basic examples of the open-source operating systems are Linux,
Open Solaris, Free RTOS, Open BDS, Free BSD, Minix, etc.
Free Software
• “Free software” means software that respects users’ freedom and
community.
• Roughly, it means that the users have the freedom to run, copy,
distribute, study, change and improve the software.
• The term “free software” is sometimes misunderstood—it has nothing
to do with price.
• It is about freedom.
Advantages
• Cost: Free software is typically free to use, modify and distribute.
• Freedom: Free software is often accompanied by a set of ethical principles that
promote users’ freedom to use, study, modify, and share the software.
• Collaboration: Free software often encourages collaboration among developers
and users, leading to faster development and better quality software.
• Transparency: Free software is often developed in a transparent way, with the
source code and development process available for public scrutiny.
• Flexibility: Free software can be used on a wide range of platforms and devices.
Disadvantages
• Support: While free software does have a community of developers and users, it
may not always have the same level of professional support as commercial
software.
• Compatibility: Free software may not always be compatible with other software
applications and hardware devices.
• Security: Because free software is available for everyone to use and modify, it
may be easier for malicious actors to identify and exploit vulnerabilities.
• Complexity: Free software can be more complex and difficult to use than
commercial software, especially for non-technical users.
• Documentation: Free software may not always have the same level of
documentation and user guides as commercial software.
Open Source Software:
• Open Source Software is something that you can modify as per your needs, and
share with others without any licensing violation burden.
• When we say Open Source, the source code of the software is available publicly
with Open Source licenses like GNU (GPL) which allows you to edit the source
code and distribute it.
1.Coined by the development environments around software produced by open
collaboration of software developers on the internet.
2.Later specified by the Open Source Initiative (OSI).
3.It does not explicitly state ethical values, besides those directly associated with
software development.
Advantages
• Cost: Open source software is typically free to use, modify and distribute.
• Customization: The source code of open source software is available to everyone,
allowing users to modify and customize it to suit their needs.
• Community support: Open source software often has a large community of
developers and users who contribute to its development and provide support.
• Transparency: The source code of open source software is open for everyone to
see, making it easier to identify and fix bugs and vulnerabilities.
• Flexibility: Open source software can be used on a wide range of platforms and
devices.
Disadvantages
• Support: While open source software does have a large community of developers
and users, it may not always have the same level of professional support as
commercial software.
• Compatibility: Open source software may not always be compatible with other
software applications and hardware devices.
• Security: Because the source code of open source software is available to
everyone, it may be easier for malicious actors to identify and exploit
vulnerabilities.
• Complexity: Open source software can be more complex and difficult to use than
commercial software, especially for non-technical users.
• Documentation: Open source software may not always have the same level of
documentation and user guides as commercial software.
Similarities
• Both free software and open source software have access to the source
code, allowing users to modify and improve the software.
• Both types of software often rely on a community of users and
developers to provide support and contribute to the development of the
software.
• Both free software and open source software are often distributed
under open licenses, allowing users to use, modify, and distribute the
software without restrictions.
S.No. Free Software (FS) Philosophy Open Source Software (OSS) Philosophy
1. It was coined by the Free Software Foundation in the 1980s.
In response to the restrictions of free software, the phrase “open source” was
coined in the late 1990s.
2. Software is an important part of people’s lives. Software is just software. There are no ethics associated directly with it.
3. Software freedom translates to social freedom. Ethics are to be associated with the people not with the software.
4.
Freedom is a value that is more important than any economical
advantage.
Freedom is not an absolute concept. Freedom should be allowed, not imposed.
5. Every free software is open source. Every open-source software is not free software.
6. There is no such issue that exists in free software.
There are many different open-source software licenses, and some of them are
quite restricted, resulting in open-source software that is not free.
7. No restrictions are imposed on free software. Open-source software occasionally imposes some constraints on users.
8.
Examples: The Free Software Directory maintains a large
database of free software packages. Some of the best-known
examples include the Linux kernel, the BSD and Linux
operating systems, the GNU Compiler Collection and C library;
the MySQL relational database; the Apache web server; and the
Send mail mail transport agent.
Examples: Prime examples of open-source products are the Apache HTTP Server,
the e-commerce platform Open Source Commerce, internet browsers Mozilla
Firefox, and Chromium (the project where the vast majority of development of the
freeware Google Chrome is done), and the full office suite LibreOffice.
Criteria Windows Linux
Developer Microsoft Corporation Linus Torvalds
Written In Assembly, C++ Assembly, C
OS Family Graphical operating system Unix-like
License Proprietary commercial software GPL and others
Default User Interface Windows shell Unix shell
Kernel Type Micro kernel Monolithic kernel
Source Model Cloud-based Open source
Initial Release November 20, 1985 September 17, 1991
Marketing Target Personal computing
Cloud computing, servers, embedded
systems, supercomputers, mobile
phones, mainframe
Available In 138 languages Multi-lingual
Platforms
ARM, IA-32, Itanium, x86-64, DEC
Alpha, MIPS, PowerPC
Alpha, H8/300, Hexagon, Itanium,
m68k, Microblaze, MIPS, PA-RISC,
PowerPC, RISC-V, s390, SuperH,
NDS32, Nios II, OpenRISC, SPARC,
ARC Unicore32, x86, Xtensa, ARM,
C6x
Linux Windows
Case Sensitivity The file system in Linux is very case-
sensitive.
The file system in Windows is not case-
sensitive.
Cost Incurred Linux is free to use for everyone. Windows do not come free for any
user.
Open Source It is open source. It is not open source.
Type of Kernel Used Linux utilizes the monolithic kernel. Windows uses the micro-kernel.
Path Separator The path separator that Linux uses is
Slash.
The path separator that Windows uses
is backward slash.
Efficiency In the case of operations, Linux is way
more efficient than Windows.
For operations, Windows are
comparatively way less efficient than
Linux.
Security It is more secure than Windows OS. It provides much less security to its
users than Linux.
Uses in Hacking People generally use Linux for the
systems that are hacking-based.
Windows is not a very efficient OS for
hacking purposes as compared to
Linux.
Windows Linux
Windows uses different data drives like C: D: E to
stored files and folders.
Unix/Linux uses a tree like a hierarchical file
system.
Windows has different drives like C: D: E There are no drives in Linux
Hard drives, CD-ROMs, printers are considered as
devices
Peripherals like hard drives, CD-ROMs, printers are
also considered files in Linux/Unix
There are 4 types of user account types 1)
Administrator, 2) Standard, 3) Child, 4) Guest
There are 3 types of user account types 1) Regular,
2) Root and 3) Service Account
Administrator user has all administrative privileges
of computers.
Root user is the super user and has all administrative
privileges.
In Windows, you cannot have 2 files with the same
name in the same folder
Linux file naming convention is case sensitive.
Thus, sample and SAMPLE are 2 different files in
Linux/Unix operating system.
In windows, My Documents is default home
directory.
For every user /home/username directory is created
which is called his home directory.
Operating System - Linux
• Linux is one of popular version of UNIX operating System.
• It is open source as its source code is freely available.
• It is free to use.
• Linux was designed considering UNIX compatibility.
• Its functionality list is quite similar to that of UNIX.
Components of Linux System
Linux Operating System has primarily three components
• Kernel − Kernel is the core part of Linux. It is responsible for all
major activities of this operating system. It consists of various
modules and it interacts directly with the underlying hardware.
Kernel provides the required abstraction to hide low level
hardware details to system or application programs.
• System Library − System libraries are special functions or
programs using which application programs or system utilities
accesses Kernel's features. These libraries implement most of the
functionalities of the operating system and do not requires kernel
module's code access rights.
• System Utility − System Utility programs are responsible to do
specialized, individual level tasks.
Architecture
•Hardware layer − Hardware consists of all peripheral
devices (RAM/ HDD/ CPU etc).
•Kernel − It is the core component of Operating System,
interacts directly with hardware, provides low level services
to upper layer components.
•Shell − An interface to kernel, hiding complexity of
kernel's functions from users. The shell takes commands
from the user and executes kernel's functions.
•Utilities − Utility programs that provide the user most of
the functionalities of an operating systems.
What is LAMP Stack?
• The LAMP stack is a popular open-source solution stack used primarily in web development.
• LAMP consists of four components necessary to establish a fully functional web development
environment. The first letters of the components' names make up the LAMP acronym:
• Linux is an operating system used to run the rest of the components.
• Apache HTTP Server is a web server software used to serve static web pages.
• MySQL is a relational database management system used for creating and managing web
databases, but also for data warehousing, application logging, e-commerce, etc.
• PHP, Perl, and Python are programming languages are used to create web applications.
• Each component represents an essential layer of the stack. Together, the components are used to
create database-driven, dynamic websites.
Advantages of LAMP Stack
1.LAMP is open-source. The software's source code is shared and
available for people to make changes and improvements, enhancing its
overall performance.
2.It is easily customizable. Users can replace every component with
another open-source solution to suit the particular application's needs.
3.It is easy to find support due to the size of the LAMP community.
4.It is a mature stack that is easy to set up.
Disadvantages
1.It does not support operating systems other than Linux.
2.The relational property of MySQL makes the entire LAMP stack less
efficient and flexible than its competitors who use non-relational
solutions.
3.Apache can run into performance problems under heavy workloads.
4.Switching between coding in Python and PHP on the server-side and
using JavaScript on the client-side can disrupt the development
workflow.
LAMP Stack Alternatives
Open-source alternatives are:
• MEAN (MongoDB, Express, Angular, Node.js)
• LEMP (Linux, NGINX, MySQL/MariaDB, PHP/Perl/Python)
• LAPP (Linux, Apache, PostgreSQL, PHP)
• LEAP (Linux, Eucalyptus, AppScale, Python)
• LLMP (Linux, Lighttpd, MySQL/MariaDB, PHP/Perl/Python)
• XAMPP (Cross-platform, Apache, MariaDB, PHP, Perl)
Non-open source alternatives include:
• WAMP (Windows, Apache, MySQL/MariaDB, PHP/Perl/Python)
• WIMP (Windows, Internet Information Services, MySQL/MariaDB, PHP/Perl/Python)
• MAMP (macOS, Apache, MySQL/MariaDB, PHP/Perl/Python)
UNIT 2
Linux Administration
Linux Usage Basics: Logging into the system, changing users and editing text files. Running Commands and
Getting Help, Browsing the File system, Users, Groups and Permissions.
Perform user and group administration, Tar Files, Patch Files, RPM, Administer the Linux printing subsystem,
Automate tasks with cron, Install, update, query and remove software packages with RPM.
What is Linux Administration?
• Linux administration is about setting up disaster recovery, managing
new system builds, creating a backup to restore data, Linux hardware
management, managing storage, handling file systems, and managing
the security of Linux systems.
• A big part of Linux administration is ensuring that Linux powered
systems are stable and secure.
What Should a Linux Administrator Should Know?
• Typically Linux system administrators are expected to handle Linux
file systems, manage the root user, have a working knowledge of bash
commands, and an ability to manage users.
What Are The Duties Of System Administrators In Linux?
1.Maintenance of a Linux environment.
2.Troubleshooting and providing support when there’s an issue with
Linux servers.
3.Analysis of log files(mainly error logs).
4.Support of LAN and web applications.
5.Creation of operational and project-specific solutions for the
organization
6.Ability to proactively figure out ways to enforce strong security
practices, and increase scalability of your Linux environment
Linux File Hierarchy Structure
/ (Root):
/bin :
/boot :
/dev :
/etc :
/home :
/lib:
/media:
/mnt :
/opt :
/sbin :
/srv :
/tmp :
/usr :
/proc:
Command Description
cd Used to change the current directory
ls Used to list the directories and files in a directory
vi A good text editor to edit files
touch Used to create new files
nano A good text editor to edit files
cp Used to copy files and directories.
mv Used to move files and directories.
rm Used to remove files and directories.
fdisk Used to partition disks and to work with file systems
mount Used to mount a file system or a device
Command Description
usermod Used to modify users and their respective settings
useradd Used to add a new user
su and sudo Used to change the user and work with root
change
Used to change the user’s aging/expiry
information
groupdel Used to delete a group
gpasswd Used to change password of group
groupmod Used to modify group and its settings
groupadd Used to add a new group
Command Description
top Used to display the running processes.
vmstat
Used to get information about processes, memory,
paging, block IO, disk, and CPU scheduling
lsof Used to check list of open files.
htop Used to determine the cause of load of each process
iostat Used to monitor IO devices loading
nmon
It displays performance about the CPU, MEMORY,
NETWORK, DISKS, FILE SYSTEM, NFS, TOP
PROCESSES, RESOURCES, AND POWER MICRO-
PARTITION
Command Description
dmesg
Used to print the message buffer of
the kernel
tail
Used to print details from the log
files located in the folder /var/log
journalctl Used to read system logs
Properly Remove an RPM
Package files are the base units of software in the Linux packaging
system. Basically, it’s a compressed group of files that may comprise:
• a number of programs
• data files that support the programs
• package metadata
• package pre-installation and post-installation scripts
RPM Package Manager
RPM stands for Red Hat Package Manager. It provides the standard way to package
software for the Red Hat Enterprise Linux (RHEL) distribution and its close
relatives Fedora, CentOS, and OpenSUSE.
• Also, Linux package management systems usually consist of two types of tools:
• low-level tools to perform tasks such as installing and erasing package files
• high-level tools that carry out dependency resolution and metadata searching
• While all Red Hat-style Linux distributions use the same low-level program rpm,
the high-level tools are not the same.
Removing RPM Packages With dnf
• Notably, we can uninstall or remove software using high-level or low-
level tools. Dandified Yum (DNF) is a high-level software package
tool for RPM-based Linux distributions. It’s the new-age version of
the popular Yum package manager.
• We can use the dnf program to remove a single package or a list of
packages. To uninstall a particular software package, let’s run the
following command as a superuser:
• $ sudo dnf remove package_name
• Critically, the RPM package name differs from the RPM package
file name. In fact, the package file names consist of five elements:
• package name
• version
• release
• architecture
• .rpm suffix
Removing RPM Packages With rpm
• Unlike dnf, rpm can remove a package without removing packages that depend on
it. In other words, the rpm program doesn’t handle dependency resolution.
• To erase a program with rpm, we run the rpm command with the -e flag:
• $ sudo rpm -e util-linux
• Copy
• Usually, if other packages need the one we’re uninstalling, rpm -e will fail. Consequently, it
produces an error message. A successful uninstall produces no output.
• Still, programs in Linux are hardly stand-alone. Instead, they often rely on the presence of other
software units. Hence, the system blocks operations that would cause problems from completion
like:
• removing a package that another package depends on
• installing a package when the system needs initial software to run the package
Linux Application
• Accessing and Running Applications: cc compiler, gcc Compiler.
Multimedia in Linux: Listening to Audio, Playing video, Recording
music.
• Publishing: Open office, Working with Graphics, Printing Documents,
Displaying documents with Ghostscript and Acrobat, Using Scanners
driven by SANE.
GCC Linux
• In Linux, the GCC stands for GNU Compiler Collection.
• It is a compiler system for the various programming languages.
• It is mainly used to compile the C and C++ programs.
• It takes the name of the source program as a necessary argument; rest
arguments are optional such as debugging, warning, object file, and
linking libraries.
• GCC is a core component of the GNU toolchain.
• Various open-source projects are compiled using the GCC, such as
Linux kernel and GNU tools.
GCC Linux
• It is distributed under the GPL (General Public License).
• The first version, GCC 1.0, was released in 1987.
• It was only for the C programming language, but in the same year, it
was extended for the C++ programming language.
• Later, it was developed for other programming languages such as
Objective-C, Objective-C++, Fortran, Java, Ada, Go, and more.
• Its latest version has the much-improved implementation of the
programming languages.
Components of GCC
• GCC is a portable tool, and it can run on many operating systems.
• Also, it can be ported to Windows by using some tools such as Cygwin, MinGW, and MinGW-W64.
• As it is a key component of GNU toolchain, it contains the following components for developing applications
and operating systems:
• GNU Compiler Collection (GCC): It is a compiler suite for many languages, such as C/C++ and Objective-
C/C++.
• GNU Make: It is an automation tool that is used to compile and build applications.
• GNU Binutils: It is a suite that contains binary utility tools such as linker and assembler.
• GNU Debugger (GDB). It is used to debug the applications.
• GNU Autotools: It is a build system that contains some utility tools such as Autoconf, Autoheader,
Automake, and Libtool.
• GNU Bison: It is a parser generator as lex and yacc.
GCC Compiler Process
• Start by updating the packages list:
sudo apt update
• Install the build-essential package by typing
sudo apt install build-essential
• To validate that the GCC compiler is successfully installed, use the gcc
--version command which prints the GCC version:
gcc --version
Compiling a Hello World Example
• nano hello.c
#include <stdio.h>
int main()
{
printf ("Hello World!n");
return 0;
}
gcc hello.c -o hello
• Save the file and compile it into an executable using the following command:
gcc hello.c -o hello
Environment Variables in Linux/Unix
• What is a Computing Environment?
• What is a Variable?
• What are Environment variables?
• Accessing Variable values
• Set New Environment Variables
• $ echo $NEWVARIABLE = VALUE12345
• Command not found
• Unsetvariable
Command Description
echo $VARIABLE To display value of a variable
env Displays all environment variables
VARIABLE_NAME= variable_value Create a new variable
unset Remove a variable
export Variable=value To set value of an environment variable
• SSH ,PING TELNET , FTP
• Ping hostname =“ “ or
• Ping 172.16.170.1
• Ping google.com
• FTP.GOOGLE.COM
• HARI@GMAIL.COM
• CD “DIRNAME”
• PUTFILE
• QUIT
• FTP> DIR
• 200 PORT COMMAND SUCCESFUL
• TELNET LOCALHOST
Apache, PHP, and MySQL Server
• Introduction to Web server. Installation Steps of Apache on Linux:
httpd service.
• MySQL: Configuring MySQL Server, MySQL Tables, SQL
Commands – INSERT, SELECT, UPDATE, REPLACE, DELETE.
Date and Time functions in MySQL.
• PHP – MySQL Application Development: Connecting to MySQL with
PHP, Inserting data with PHP, Retrieving data with PHP. Developing
PHP scripts for dynamic web page.
Static web servers vs. Dynamic web servers
S.NO. Static Web Servers Dynamic Web Servers
1 Static web servers refer to the servers, which serve only
the static content i.e., the content is fixed and being
shown as it is.
Dynamic web servers refer to the servers where the content of the
page can be updated and altered.
2 A static web server includes a computer and the HTTP
(Hyper Text Transfer Protocol) software.
A dynamic web server also includes a computer with plenty of
other software, unlike an application server and database model.
3 It is called static; the web pages content won't change
unless the user manually changes it, and the server will
deliver web files as is to the web browser.
It is called dynamic because the application server is used to
update the web pages files at the server-side, and due to which, it
can change on every call requested by the web browser.
4 Static web servers take less time to load the data. The Dynamic web server can only produce the data when it is
requested from the database. Therefore, it is time consuming and
more complicated when compared to static web servers.
Proxy Server
• Proxy server is an intermediary server between the client and the
internet. Proxy servers offer the following basic functionalities:
• Firewall and network data filtering.
• Network connection sharing
• Data caching
Purpose of Proxy Servers
• Monitoring and Filtering
• Improving performance
• Translation
• Accessing services anonymously
• Security
Type of Proxies
• Forward Proxies
• Open Proxies
• Reverse Proxies
Architecture
Search Engines
Search Engine Components
Generally there are three basic components of a search engine as listed
below:
1.Web Crawler
2.Database
3.Search Interfaces
Architecture
Search Engine Processing
• Indexing Process
• Text acquisition
• Text transformation
• Index creation
• Query Process
• User interaction
• Ranking
• Evaluation
Examples
Search
Engine
Description
Google It was originally called BackRub. It is the most popular search engine globally.
Bing It was launched in 2009 by Microsoft. It is the latest web-based search engine that also delivers
Yahoo’s results.
Ask It was launched in 1996 and was originally known as Ask Jeeves. It includes support for match,
dictionary, and conversation question.
AltaVista It was launched by Digital Equipment Corporation in 1995. Since 2003, it is powered by Yahoo
technology.
AOL.Searc
h
It is powered by Google.
LYCOS It is top 5 internet portal and 13th largest online property according to Media Matrix.
Alexa It is subsidiary of Amazon and used for providing website traffic information.
Web Based Chat Services
Website Description
Facebook It was founded by Mark Zuckerberg with his college roommates at Harvard
university. Facebook lets the user to create personal profile, post status & photos,
and receive notifications.
eBuddy It is an instant messaging service. It supports multiprotocol instant messaging
clients.
Convore It offers real time web based chat system.
MeBeam It offers video based chat between the clients to create video conferencing rooms
for up to 16 people.
Yahoo!
Messenger
It offers PC-PC, PC-phone, Phone-to-PC, file transfer, webcam hosting, text
messaging service etc.
WhatsApp It is an instant messaging service application available on smart phones.
Gmail It offers instant chatting, sending and receiving mails, and video calling services.
Instant Messaging (IM)
Application Description
Nimbuzz It is native iPhone app. It supports voice and video chats, file sharing, and
group chats with panache.
eBuddy eBuddy IM helps to have all your buddies from multiple IM accounts in one
single list.
Imo.in It has capability to link all your IM accounts together. You can log on to all of
your IM accounts by just logging into imo.in.
MeBeam It offers video based chat between the clients to create video conferencing
rooms for up to 16 people.
Yahoo! Messenger It offers PC-PC, PC-phone, Phone-to-PC, file transfer, webcam hosting, text
messaging service etc.
GoogleTalk It is an IM by Google and one of the most widely used.
Lync Lync is an IM developed by Microsoft. It is widely used in corporate sector for
internal and external communication as well.
Video Conferencing
• Point-to-Point
• Multi-point
Video Sharing
Mailing List
• Mailing List definition
• Types of Mailing List
• Response List
• It contains the group of people who have responded to an offer in some way. These people are the customers who
have shown interest in a specific product or service.
• Compiled List
• The compiled list is prepared by collecting information from various sources such as surveys, telemarketing etc.
• Announcements
• These lists are created for sending out coupons, new product announcements, and other offers to the customers.
• Discussion List
• This list is created for sharing views on a specific topic such as computer, environment, healt, education etc.
What is Apache?
• Apache is free and open-source software of web server that is used by approx 40% of websites all
over the world.
• Apache HTTP Server is its official name.
• 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."
• One of the most reliable and old versions of the Apache web server was published in 1995.
• If someone wishes to visit any website, they fill-out the name of the domain in their browser
address bar.
• The web server will bring the requested files by performing as the virtual delivery person.
Pros and Cons of Apache
• Pros:
1.Stable and reliable software.
2.Free and open-source, even for economic use.
3.Regular security patches, frequently updated.
4.Beginner-friendly, easy to configure.
5.Flexible because of the module-based structure.
6.Works out of a box with the WordPress sites.
7.Cross-platform (implements on Windows servers and Unix).
8.Easily available support and a huge community in the case of any issue.
Pros and Cons of Apache
• Cons:
1.Various performance issues on extremely heavy-traffic websites.
2.Several options of configuration can cause security susceptibility.
MySQL
MySQL :
• A database is a separate application that stores a collection of data.
• Each database has one or more distinct APIs for creating, accessing, managing,
searching, and replicating the data it holds.
• Other kinds of data stores can also be used, such as files on the file system or large
hash tables in memory but data fetching and writing would not be so fast and easy
with those types of systems.
• Nowadays, use relational database management systems (RDBMS) to store and
manage huge volumes of data.
• This is called a relational database because all the data is stored in different tables
and relations are established using primary keys or other keys known as Foreign
Keys.
Relational DataBase Management System (RDBMS)
• Enables you to implement a database with tables, columns and
indexes.
• Guarantees the Referential Integrity between rows of various tables.
• Updates the indexes automatically.
• Interprets an SQL query and combines information from various
tables.
RDBMS Terminology
• Database
• Table
• Column
• Row
• Redundancy
• Primary Key
• Foreign Key
• Compound Key
• Index
• Referential Integrity
MySQL Database
• MySQL is released under an open-source license. So you have nothing to pay to use it.
• MySQL is a very powerful program in its own right. It handles a large subset of the functionality of the most
expensive and powerful database packages.
• MySQL uses a standard form of the well-known SQL data language.
• MySQL works on many operating systems and with many languages including PHP, PERL, C, C++, JAVA,
etc.
• MySQL works very quickly and works well even with large data sets.
• MySQL is very friendly to PHP, the most appreciated language for web development.
• MySQL supports large databases, up to 50 million rows or more in a table. The default file size limit for a
table is 4GB, but you can increase this (if your operating system can handle it) to a theoretical limit of 8
million terabytes (TB).
• MySQL is customizable. The open-source GPL license allows programmers to modify the MySQL software
to fit their own specific environments.
Administrative MySQL Command
• USE Databasename − This will be used to select a database in the MySQL workarea.
• SHOW DATABASES − Lists out the databases that are accessible by the MySQL DBMS.
• SHOW TABLES − Shows the tables in the database once a database has been selected
with the use command.
• SHOW COLUMNS FROM tablename: Shows the attributes, types of attributes, key
information, whether NULL is permitted, defaults, and other information for a table.
• SHOW INDEX FROM tablename − Presents the details of all indexes on the table,
including the PRIMARY KEY.
• SHOW TABLE STATUS LIKE tablenameG − Reports details of the MySQL DBMS
performance and statistics.
LINUX BASICS
LINUX BASICS
LINUX BASICS
LINUX BASICS
LINUX BASICS
LINUX BASICS
LINUX BASICS
LINUX BASICS
LINUX BASICS
LINUX BASICS
LINUX BASICS
LINUX BASICS
LINUX BASICS
LINUX BASICS

More Related Content

Similar to LINUX BASICS

Open soucre(cut shrt)
Open soucre(cut shrt)Open soucre(cut shrt)
Open soucre(cut shrt)
Shivani Rai
 
Open source Software: pros and cons
Open source Software: pros and consOpen source Software: pros and cons
Open source Software: pros and cons
ygpriya
 
open source technology
open source technologyopen source technology
open source technology
Lila Ram Yadav
 

Similar to LINUX BASICS (20)

Open soucre(cut shrt)
Open soucre(cut shrt)Open soucre(cut shrt)
Open soucre(cut shrt)
 
Softwares open source shareware commercial Proprietary By Mohsin Iftikhar
Softwares open source shareware commercial Proprietary  By Mohsin Iftikhar Softwares open source shareware commercial Proprietary  By Mohsin Iftikhar
Softwares open source shareware commercial Proprietary By Mohsin Iftikhar
 
Open source Software: pros and cons
Open source Software: pros and consOpen source Software: pros and cons
Open source Software: pros and cons
 
Open source
Open sourceOpen source
Open source
 
OPS Ecosystem and Engineering.pptx
OPS Ecosystem and Engineering.pptxOPS Ecosystem and Engineering.pptx
OPS Ecosystem and Engineering.pptx
 
FOSS
FOSS FOSS
FOSS
 
Why do People Prefer Using Open Source Software?
Why do People Prefer Using Open Source Software?Why do People Prefer Using Open Source Software?
Why do People Prefer Using Open Source Software?
 
OS ppt.pdf
OS ppt.pdfOS ppt.pdf
OS ppt.pdf
 
Bioinformatics
BioinformaticsBioinformatics
Bioinformatics
 
Understanding and implementation of open source ecosystems final
Understanding and implementation of open source ecosystems finalUnderstanding and implementation of open source ecosystems final
Understanding and implementation of open source ecosystems final
 
foss_19-9
foss_19-9foss_19-9
foss_19-9
 
open source technology
open source technologyopen source technology
open source technology
 
C4 sandip-oss
C4 sandip-ossC4 sandip-oss
C4 sandip-oss
 
Foss for Health Care
Foss for Health CareFoss for Health Care
Foss for Health Care
 
[Workshop] Building an Integration Agile Digital Enterprise with Open Source ...
[Workshop] Building an Integration Agile Digital Enterprise with Open Source ...[Workshop] Building an Integration Agile Digital Enterprise with Open Source ...
[Workshop] Building an Integration Agile Digital Enterprise with Open Source ...
 
Free and Open Source Software
Free and Open Source SoftwareFree and Open Source Software
Free and Open Source Software
 
Open Source Concepts
Open Source ConceptsOpen Source Concepts
Open Source Concepts
 
Open Source
Open SourceOpen Source
Open Source
 
OPEN SOURCE SEMINAR PRESENTATION
OPEN SOURCE SEMINAR PRESENTATIONOPEN SOURCE SEMINAR PRESENTATION
OPEN SOURCE SEMINAR PRESENTATION
 
A kick-start into Open Source
A kick-start into Open SourceA kick-start into Open Source
A kick-start into Open Source
 

More from RamjiChaurasiya (6)

technological entrepreneurship ppt for business
technological entrepreneurship ppt for businesstechnological entrepreneurship ppt for business
technological entrepreneurship ppt for business
 
computer architecture and organisation
computer architecture and organisationcomputer architecture and organisation
computer architecture and organisation
 
4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt
 
Chapter 4 NN based on Competition.pptx
Chapter 4 NN based on Competition.pptxChapter 4 NN based on Competition.pptx
Chapter 4 NN based on Competition.pptx
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
BJT.....pdf
BJT.....pdfBJT.....pdf
BJT.....pdf
 

Recently uploaded

Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
Kamal Acharya
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
Kamal Acharya
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
Kamal Acharya
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Lovely Professional University
 
School management system project report.pdf
School management system project report.pdfSchool management system project report.pdf
School management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

Construction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxConstruction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptx
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
 
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
 
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdfONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2
 
İTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering WorkshopİTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering Workshop
 
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Kraków
 
internship exam ppt.pptx on embedded system and IOT
internship exam ppt.pptx on embedded system and IOTinternship exam ppt.pptx on embedded system and IOT
internship exam ppt.pptx on embedded system and IOT
 
Electrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineElectrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission line
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdf
 
retail automation billing system ppt.pptx
retail automation billing system ppt.pptxretail automation billing system ppt.pptx
retail automation billing system ppt.pptx
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
 
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and VisualizationKIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
 
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
 
School management system project report.pdf
School management system project report.pdfSchool management system project report.pdf
School management system project report.pdf
 

LINUX BASICS

  • 1. OPEN SOURCE SOFTWARE (LINUX ADMINISTRATION) Course Code -CSE0002
  • 2. UNIT 1 Open Source and Linux Open Source Definition, The distribution terms of open source software, open source technology importance, Free and Open Source Softwares (FOSS), Introduction to Linux Operating system. LAMP (Linux, Apache, MySQL, PHP, Python, and Perl). Benefits, Perspectives of Open Source software Linux and Open Source.
  • 3. Course Outcomes: At the end of this course, the students will be able to • Understand the principles of Linux OS Administration. • Create user accounts and assign different roles to the account created as per given requirements. • Connect and work with PHP and MySQL as part of Linux Administration. • Write and execute shell scripts for the given requirements.
  • 4. Operating System Definition and Function • In the Computer System (comprises of Hardware and software), Hardware can only understand machine code (in the form of 0 and 1) which doesn't make any sense to a naive user. • We need a system which can act as an intermediary and manage all the processes and resources present in the system.
  • 5. Operating System Definition and Function • An Operating System can be defined as an interface between user and hardware. • It is responsible for the execution of all the processes, Resource Allocation, CPU management, File Management and many other tasks. • The purpose of an operating system is to provide an environment in which a user can execute programs in convenient and efficient manner.
  • 6. Structure of a Computer System • Users (people who are using the computer) • Application Programs (Compilers, Databases, Games, Video player, Browsers, etc.) • System Programs (Shells, Editors, Compilers, etc.) • Operating System ( A special program which acts as an interface between user and hardware ) • Hardware ( CPU, Disks, Memory, etc)
  • 7. What does an Operating system do? 1.Process Management 2.Process Synchronization 3.Memory Management 4.CPU Scheduling 5.File Management 6.Security
  • 8. Types of Operating Systems (OS)
  • 9. What is an Open-Source Operating System? • The term "open source" refers to computer software or applications where the owners or copyright holders enable the users or third parties to use, see, and edit the product's source code. • The source code of an open-source OS is publicly visible and editable. The usually operating systems such as Apple's iOS, Microsoft's Windows, and Apple's Mac OS are closed operating systems. • Open-Source Software is licensed in such a way that it is permissible to produce as many copies as you want and to use them wherever you like. • It generally uses fewer resources than its commercial counterpart because it lacks any code for licensing, promoting other products, authentication, attaching advertisements, etc.
  • 10. Open-source operating system • The open-source operating system allows the use of code that is freely distributed and available to anyone and for commercial purposes. • Being an open-source application or program, the program source code of an open-source OS is available. • The user may modify or change those codes and develop new applications according to the user requirement. • Some basic examples of the open-source operating systems are Linux, Open Solaris, Free RTOS, Open BDS, Free BSD, Minix, etc.
  • 11. Free Software • “Free software” means software that respects users’ freedom and community. • Roughly, it means that the users have the freedom to run, copy, distribute, study, change and improve the software. • The term “free software” is sometimes misunderstood—it has nothing to do with price. • It is about freedom.
  • 12. Advantages • Cost: Free software is typically free to use, modify and distribute. • Freedom: Free software is often accompanied by a set of ethical principles that promote users’ freedom to use, study, modify, and share the software. • Collaboration: Free software often encourages collaboration among developers and users, leading to faster development and better quality software. • Transparency: Free software is often developed in a transparent way, with the source code and development process available for public scrutiny. • Flexibility: Free software can be used on a wide range of platforms and devices.
  • 13. Disadvantages • Support: While free software does have a community of developers and users, it may not always have the same level of professional support as commercial software. • Compatibility: Free software may not always be compatible with other software applications and hardware devices. • Security: Because free software is available for everyone to use and modify, it may be easier for malicious actors to identify and exploit vulnerabilities. • Complexity: Free software can be more complex and difficult to use than commercial software, especially for non-technical users. • Documentation: Free software may not always have the same level of documentation and user guides as commercial software.
  • 14. Open Source Software: • Open Source Software is something that you can modify as per your needs, and share with others without any licensing violation burden. • When we say Open Source, the source code of the software is available publicly with Open Source licenses like GNU (GPL) which allows you to edit the source code and distribute it. 1.Coined by the development environments around software produced by open collaboration of software developers on the internet. 2.Later specified by the Open Source Initiative (OSI). 3.It does not explicitly state ethical values, besides those directly associated with software development.
  • 15. Advantages • Cost: Open source software is typically free to use, modify and distribute. • Customization: The source code of open source software is available to everyone, allowing users to modify and customize it to suit their needs. • Community support: Open source software often has a large community of developers and users who contribute to its development and provide support. • Transparency: The source code of open source software is open for everyone to see, making it easier to identify and fix bugs and vulnerabilities. • Flexibility: Open source software can be used on a wide range of platforms and devices.
  • 16. Disadvantages • Support: While open source software does have a large community of developers and users, it may not always have the same level of professional support as commercial software. • Compatibility: Open source software may not always be compatible with other software applications and hardware devices. • Security: Because the source code of open source software is available to everyone, it may be easier for malicious actors to identify and exploit vulnerabilities. • Complexity: Open source software can be more complex and difficult to use than commercial software, especially for non-technical users. • Documentation: Open source software may not always have the same level of documentation and user guides as commercial software.
  • 17. Similarities • Both free software and open source software have access to the source code, allowing users to modify and improve the software. • Both types of software often rely on a community of users and developers to provide support and contribute to the development of the software. • Both free software and open source software are often distributed under open licenses, allowing users to use, modify, and distribute the software without restrictions.
  • 18. S.No. Free Software (FS) Philosophy Open Source Software (OSS) Philosophy 1. It was coined by the Free Software Foundation in the 1980s. In response to the restrictions of free software, the phrase “open source” was coined in the late 1990s. 2. Software is an important part of people’s lives. Software is just software. There are no ethics associated directly with it. 3. Software freedom translates to social freedom. Ethics are to be associated with the people not with the software. 4. Freedom is a value that is more important than any economical advantage. Freedom is not an absolute concept. Freedom should be allowed, not imposed. 5. Every free software is open source. Every open-source software is not free software. 6. There is no such issue that exists in free software. There are many different open-source software licenses, and some of them are quite restricted, resulting in open-source software that is not free. 7. No restrictions are imposed on free software. Open-source software occasionally imposes some constraints on users. 8. Examples: The Free Software Directory maintains a large database of free software packages. Some of the best-known examples include the Linux kernel, the BSD and Linux operating systems, the GNU Compiler Collection and C library; the MySQL relational database; the Apache web server; and the Send mail mail transport agent. Examples: Prime examples of open-source products are the Apache HTTP Server, the e-commerce platform Open Source Commerce, internet browsers Mozilla Firefox, and Chromium (the project where the vast majority of development of the freeware Google Chrome is done), and the full office suite LibreOffice.
  • 19. Criteria Windows Linux Developer Microsoft Corporation Linus Torvalds Written In Assembly, C++ Assembly, C OS Family Graphical operating system Unix-like License Proprietary commercial software GPL and others Default User Interface Windows shell Unix shell Kernel Type Micro kernel Monolithic kernel Source Model Cloud-based Open source Initial Release November 20, 1985 September 17, 1991 Marketing Target Personal computing Cloud computing, servers, embedded systems, supercomputers, mobile phones, mainframe Available In 138 languages Multi-lingual Platforms ARM, IA-32, Itanium, x86-64, DEC Alpha, MIPS, PowerPC Alpha, H8/300, Hexagon, Itanium, m68k, Microblaze, MIPS, PA-RISC, PowerPC, RISC-V, s390, SuperH, NDS32, Nios II, OpenRISC, SPARC, ARC Unicore32, x86, Xtensa, ARM, C6x
  • 20. Linux Windows Case Sensitivity The file system in Linux is very case- sensitive. The file system in Windows is not case- sensitive. Cost Incurred Linux is free to use for everyone. Windows do not come free for any user. Open Source It is open source. It is not open source. Type of Kernel Used Linux utilizes the monolithic kernel. Windows uses the micro-kernel. Path Separator The path separator that Linux uses is Slash. The path separator that Windows uses is backward slash. Efficiency In the case of operations, Linux is way more efficient than Windows. For operations, Windows are comparatively way less efficient than Linux. Security It is more secure than Windows OS. It provides much less security to its users than Linux. Uses in Hacking People generally use Linux for the systems that are hacking-based. Windows is not a very efficient OS for hacking purposes as compared to Linux.
  • 21. Windows Linux Windows uses different data drives like C: D: E to stored files and folders. Unix/Linux uses a tree like a hierarchical file system. Windows has different drives like C: D: E There are no drives in Linux Hard drives, CD-ROMs, printers are considered as devices Peripherals like hard drives, CD-ROMs, printers are also considered files in Linux/Unix There are 4 types of user account types 1) Administrator, 2) Standard, 3) Child, 4) Guest There are 3 types of user account types 1) Regular, 2) Root and 3) Service Account Administrator user has all administrative privileges of computers. Root user is the super user and has all administrative privileges. In Windows, you cannot have 2 files with the same name in the same folder Linux file naming convention is case sensitive. Thus, sample and SAMPLE are 2 different files in Linux/Unix operating system. In windows, My Documents is default home directory. For every user /home/username directory is created which is called his home directory.
  • 22.
  • 23.
  • 24.
  • 25. Operating System - Linux • Linux is one of popular version of UNIX operating System. • It is open source as its source code is freely available. • It is free to use. • Linux was designed considering UNIX compatibility. • Its functionality list is quite similar to that of UNIX.
  • 26. Components of Linux System Linux Operating System has primarily three components • Kernel − Kernel is the core part of Linux. It is responsible for all major activities of this operating system. It consists of various modules and it interacts directly with the underlying hardware. Kernel provides the required abstraction to hide low level hardware details to system or application programs. • System Library − System libraries are special functions or programs using which application programs or system utilities accesses Kernel's features. These libraries implement most of the functionalities of the operating system and do not requires kernel module's code access rights. • System Utility − System Utility programs are responsible to do specialized, individual level tasks.
  • 27. Architecture •Hardware layer − Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc). •Kernel − It is the core component of Operating System, interacts directly with hardware, provides low level services to upper layer components. •Shell − An interface to kernel, hiding complexity of kernel's functions from users. The shell takes commands from the user and executes kernel's functions. •Utilities − Utility programs that provide the user most of the functionalities of an operating systems.
  • 28.
  • 29. What is LAMP Stack? • The LAMP stack is a popular open-source solution stack used primarily in web development. • LAMP consists of four components necessary to establish a fully functional web development environment. The first letters of the components' names make up the LAMP acronym: • Linux is an operating system used to run the rest of the components. • Apache HTTP Server is a web server software used to serve static web pages. • MySQL is a relational database management system used for creating and managing web databases, but also for data warehousing, application logging, e-commerce, etc. • PHP, Perl, and Python are programming languages are used to create web applications. • Each component represents an essential layer of the stack. Together, the components are used to create database-driven, dynamic websites.
  • 30.
  • 31. Advantages of LAMP Stack 1.LAMP is open-source. The software's source code is shared and available for people to make changes and improvements, enhancing its overall performance. 2.It is easily customizable. Users can replace every component with another open-source solution to suit the particular application's needs. 3.It is easy to find support due to the size of the LAMP community. 4.It is a mature stack that is easy to set up.
  • 32. Disadvantages 1.It does not support operating systems other than Linux. 2.The relational property of MySQL makes the entire LAMP stack less efficient and flexible than its competitors who use non-relational solutions. 3.Apache can run into performance problems under heavy workloads. 4.Switching between coding in Python and PHP on the server-side and using JavaScript on the client-side can disrupt the development workflow.
  • 33. LAMP Stack Alternatives Open-source alternatives are: • MEAN (MongoDB, Express, Angular, Node.js) • LEMP (Linux, NGINX, MySQL/MariaDB, PHP/Perl/Python) • LAPP (Linux, Apache, PostgreSQL, PHP) • LEAP (Linux, Eucalyptus, AppScale, Python) • LLMP (Linux, Lighttpd, MySQL/MariaDB, PHP/Perl/Python) • XAMPP (Cross-platform, Apache, MariaDB, PHP, Perl) Non-open source alternatives include: • WAMP (Windows, Apache, MySQL/MariaDB, PHP/Perl/Python) • WIMP (Windows, Internet Information Services, MySQL/MariaDB, PHP/Perl/Python) • MAMP (macOS, Apache, MySQL/MariaDB, PHP/Perl/Python)
  • 34. UNIT 2 Linux Administration Linux Usage Basics: Logging into the system, changing users and editing text files. Running Commands and Getting Help, Browsing the File system, Users, Groups and Permissions. Perform user and group administration, Tar Files, Patch Files, RPM, Administer the Linux printing subsystem, Automate tasks with cron, Install, update, query and remove software packages with RPM.
  • 35. What is Linux Administration? • Linux administration is about setting up disaster recovery, managing new system builds, creating a backup to restore data, Linux hardware management, managing storage, handling file systems, and managing the security of Linux systems. • A big part of Linux administration is ensuring that Linux powered systems are stable and secure.
  • 36. What Should a Linux Administrator Should Know? • Typically Linux system administrators are expected to handle Linux file systems, manage the root user, have a working knowledge of bash commands, and an ability to manage users.
  • 37. What Are The Duties Of System Administrators In Linux? 1.Maintenance of a Linux environment. 2.Troubleshooting and providing support when there’s an issue with Linux servers. 3.Analysis of log files(mainly error logs). 4.Support of LAN and web applications. 5.Creation of operational and project-specific solutions for the organization 6.Ability to proactively figure out ways to enforce strong security practices, and increase scalability of your Linux environment
  • 38. Linux File Hierarchy Structure
  • 45. /lib:
  • 53.
  • 55.
  • 56. Command Description cd Used to change the current directory ls Used to list the directories and files in a directory vi A good text editor to edit files touch Used to create new files nano A good text editor to edit files cp Used to copy files and directories. mv Used to move files and directories. rm Used to remove files and directories. fdisk Used to partition disks and to work with file systems mount Used to mount a file system or a device
  • 57. Command Description usermod Used to modify users and their respective settings useradd Used to add a new user su and sudo Used to change the user and work with root change Used to change the user’s aging/expiry information groupdel Used to delete a group gpasswd Used to change password of group groupmod Used to modify group and its settings groupadd Used to add a new group
  • 58. Command Description top Used to display the running processes. vmstat Used to get information about processes, memory, paging, block IO, disk, and CPU scheduling lsof Used to check list of open files. htop Used to determine the cause of load of each process iostat Used to monitor IO devices loading nmon It displays performance about the CPU, MEMORY, NETWORK, DISKS, FILE SYSTEM, NFS, TOP PROCESSES, RESOURCES, AND POWER MICRO- PARTITION
  • 59. Command Description dmesg Used to print the message buffer of the kernel tail Used to print details from the log files located in the folder /var/log journalctl Used to read system logs
  • 60. Properly Remove an RPM Package files are the base units of software in the Linux packaging system. Basically, it’s a compressed group of files that may comprise: • a number of programs • data files that support the programs • package metadata • package pre-installation and post-installation scripts
  • 61. RPM Package Manager RPM stands for Red Hat Package Manager. It provides the standard way to package software for the Red Hat Enterprise Linux (RHEL) distribution and its close relatives Fedora, CentOS, and OpenSUSE. • Also, Linux package management systems usually consist of two types of tools: • low-level tools to perform tasks such as installing and erasing package files • high-level tools that carry out dependency resolution and metadata searching • While all Red Hat-style Linux distributions use the same low-level program rpm, the high-level tools are not the same.
  • 62. Removing RPM Packages With dnf • Notably, we can uninstall or remove software using high-level or low- level tools. Dandified Yum (DNF) is a high-level software package tool for RPM-based Linux distributions. It’s the new-age version of the popular Yum package manager. • We can use the dnf program to remove a single package or a list of packages. To uninstall a particular software package, let’s run the following command as a superuser: • $ sudo dnf remove package_name
  • 63. • Critically, the RPM package name differs from the RPM package file name. In fact, the package file names consist of five elements: • package name • version • release • architecture • .rpm suffix
  • 64.
  • 65. Removing RPM Packages With rpm • Unlike dnf, rpm can remove a package without removing packages that depend on it. In other words, the rpm program doesn’t handle dependency resolution. • To erase a program with rpm, we run the rpm command with the -e flag: • $ sudo rpm -e util-linux • Copy • Usually, if other packages need the one we’re uninstalling, rpm -e will fail. Consequently, it produces an error message. A successful uninstall produces no output. • Still, programs in Linux are hardly stand-alone. Instead, they often rely on the presence of other software units. Hence, the system blocks operations that would cause problems from completion like: • removing a package that another package depends on • installing a package when the system needs initial software to run the package
  • 66. Linux Application • Accessing and Running Applications: cc compiler, gcc Compiler. Multimedia in Linux: Listening to Audio, Playing video, Recording music. • Publishing: Open office, Working with Graphics, Printing Documents, Displaying documents with Ghostscript and Acrobat, Using Scanners driven by SANE.
  • 67. GCC Linux • In Linux, the GCC stands for GNU Compiler Collection. • It is a compiler system for the various programming languages. • It is mainly used to compile the C and C++ programs. • It takes the name of the source program as a necessary argument; rest arguments are optional such as debugging, warning, object file, and linking libraries. • GCC is a core component of the GNU toolchain. • Various open-source projects are compiled using the GCC, such as Linux kernel and GNU tools.
  • 68. GCC Linux • It is distributed under the GPL (General Public License). • The first version, GCC 1.0, was released in 1987. • It was only for the C programming language, but in the same year, it was extended for the C++ programming language. • Later, it was developed for other programming languages such as Objective-C, Objective-C++, Fortran, Java, Ada, Go, and more. • Its latest version has the much-improved implementation of the programming languages.
  • 69. Components of GCC • GCC is a portable tool, and it can run on many operating systems. • Also, it can be ported to Windows by using some tools such as Cygwin, MinGW, and MinGW-W64. • As it is a key component of GNU toolchain, it contains the following components for developing applications and operating systems: • GNU Compiler Collection (GCC): It is a compiler suite for many languages, such as C/C++ and Objective- C/C++. • GNU Make: It is an automation tool that is used to compile and build applications. • GNU Binutils: It is a suite that contains binary utility tools such as linker and assembler. • GNU Debugger (GDB). It is used to debug the applications. • GNU Autotools: It is a build system that contains some utility tools such as Autoconf, Autoheader, Automake, and Libtool. • GNU Bison: It is a parser generator as lex and yacc.
  • 71. • Start by updating the packages list: sudo apt update • Install the build-essential package by typing sudo apt install build-essential • To validate that the GCC compiler is successfully installed, use the gcc --version command which prints the GCC version: gcc --version
  • 72. Compiling a Hello World Example • nano hello.c #include <stdio.h> int main() { printf ("Hello World!n"); return 0; } gcc hello.c -o hello
  • 73. • Save the file and compile it into an executable using the following command: gcc hello.c -o hello
  • 74. Environment Variables in Linux/Unix • What is a Computing Environment? • What is a Variable? • What are Environment variables? • Accessing Variable values • Set New Environment Variables • $ echo $NEWVARIABLE = VALUE12345 • Command not found • Unsetvariable
  • 75. Command Description echo $VARIABLE To display value of a variable env Displays all environment variables VARIABLE_NAME= variable_value Create a new variable unset Remove a variable export Variable=value To set value of an environment variable
  • 76. • SSH ,PING TELNET , FTP • Ping hostname =“ “ or • Ping 172.16.170.1 • Ping google.com • FTP.GOOGLE.COM • HARI@GMAIL.COM
  • 77. • CD “DIRNAME” • PUTFILE • QUIT • FTP> DIR • 200 PORT COMMAND SUCCESFUL • TELNET LOCALHOST
  • 78. Apache, PHP, and MySQL Server • Introduction to Web server. Installation Steps of Apache on Linux: httpd service. • MySQL: Configuring MySQL Server, MySQL Tables, SQL Commands – INSERT, SELECT, UPDATE, REPLACE, DELETE. Date and Time functions in MySQL. • PHP – MySQL Application Development: Connecting to MySQL with PHP, Inserting data with PHP, Retrieving data with PHP. Developing PHP scripts for dynamic web page.
  • 79.
  • 80.
  • 81. Static web servers vs. Dynamic web servers S.NO. Static Web Servers Dynamic Web Servers 1 Static web servers refer to the servers, which serve only the static content i.e., the content is fixed and being shown as it is. Dynamic web servers refer to the servers where the content of the page can be updated and altered. 2 A static web server includes a computer and the HTTP (Hyper Text Transfer Protocol) software. A dynamic web server also includes a computer with plenty of other software, unlike an application server and database model. 3 It is called static; the web pages content won't change unless the user manually changes it, and the server will deliver web files as is to the web browser. It is called dynamic because the application server is used to update the web pages files at the server-side, and due to which, it can change on every call requested by the web browser. 4 Static web servers take less time to load the data. The Dynamic web server can only produce the data when it is requested from the database. Therefore, it is time consuming and more complicated when compared to static web servers.
  • 82. Proxy Server • Proxy server is an intermediary server between the client and the internet. Proxy servers offer the following basic functionalities: • Firewall and network data filtering. • Network connection sharing • Data caching
  • 83. Purpose of Proxy Servers • Monitoring and Filtering • Improving performance • Translation • Accessing services anonymously • Security
  • 84. Type of Proxies • Forward Proxies • Open Proxies • Reverse Proxies
  • 87. Search Engine Components Generally there are three basic components of a search engine as listed below: 1.Web Crawler 2.Database 3.Search Interfaces
  • 89. Search Engine Processing • Indexing Process • Text acquisition • Text transformation • Index creation • Query Process • User interaction • Ranking • Evaluation
  • 90. Examples Search Engine Description Google It was originally called BackRub. It is the most popular search engine globally. Bing It was launched in 2009 by Microsoft. It is the latest web-based search engine that also delivers Yahoo’s results. Ask It was launched in 1996 and was originally known as Ask Jeeves. It includes support for match, dictionary, and conversation question. AltaVista It was launched by Digital Equipment Corporation in 1995. Since 2003, it is powered by Yahoo technology. AOL.Searc h It is powered by Google. LYCOS It is top 5 internet portal and 13th largest online property according to Media Matrix. Alexa It is subsidiary of Amazon and used for providing website traffic information.
  • 91. Web Based Chat Services Website Description Facebook It was founded by Mark Zuckerberg with his college roommates at Harvard university. Facebook lets the user to create personal profile, post status & photos, and receive notifications. eBuddy It is an instant messaging service. It supports multiprotocol instant messaging clients. Convore It offers real time web based chat system. MeBeam It offers video based chat between the clients to create video conferencing rooms for up to 16 people. Yahoo! Messenger It offers PC-PC, PC-phone, Phone-to-PC, file transfer, webcam hosting, text messaging service etc. WhatsApp It is an instant messaging service application available on smart phones. Gmail It offers instant chatting, sending and receiving mails, and video calling services.
  • 92. Instant Messaging (IM) Application Description Nimbuzz It is native iPhone app. It supports voice and video chats, file sharing, and group chats with panache. eBuddy eBuddy IM helps to have all your buddies from multiple IM accounts in one single list. Imo.in It has capability to link all your IM accounts together. You can log on to all of your IM accounts by just logging into imo.in. MeBeam It offers video based chat between the clients to create video conferencing rooms for up to 16 people. Yahoo! Messenger It offers PC-PC, PC-phone, Phone-to-PC, file transfer, webcam hosting, text messaging service etc. GoogleTalk It is an IM by Google and one of the most widely used. Lync Lync is an IM developed by Microsoft. It is widely used in corporate sector for internal and external communication as well.
  • 95. Mailing List • Mailing List definition • Types of Mailing List • Response List • It contains the group of people who have responded to an offer in some way. These people are the customers who have shown interest in a specific product or service. • Compiled List • The compiled list is prepared by collecting information from various sources such as surveys, telemarketing etc. • Announcements • These lists are created for sending out coupons, new product announcements, and other offers to the customers. • Discussion List • This list is created for sharing views on a specific topic such as computer, environment, healt, education etc.
  • 96. What is Apache? • Apache is free and open-source software of web server that is used by approx 40% of websites all over the world. • Apache HTTP Server is its official name. • 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." • One of the most reliable and old versions of the Apache web server was published in 1995. • If someone wishes to visit any website, they fill-out the name of the domain in their browser address bar. • The web server will bring the requested files by performing as the virtual delivery person.
  • 97. Pros and Cons of Apache • Pros: 1.Stable and reliable software. 2.Free and open-source, even for economic use. 3.Regular security patches, frequently updated. 4.Beginner-friendly, easy to configure. 5.Flexible because of the module-based structure. 6.Works out of a box with the WordPress sites. 7.Cross-platform (implements on Windows servers and Unix). 8.Easily available support and a huge community in the case of any issue.
  • 98. Pros and Cons of Apache • Cons: 1.Various performance issues on extremely heavy-traffic websites. 2.Several options of configuration can cause security susceptibility.
  • 99. MySQL
  • 100. MySQL : • A database is a separate application that stores a collection of data. • Each database has one or more distinct APIs for creating, accessing, managing, searching, and replicating the data it holds. • Other kinds of data stores can also be used, such as files on the file system or large hash tables in memory but data fetching and writing would not be so fast and easy with those types of systems. • Nowadays, use relational database management systems (RDBMS) to store and manage huge volumes of data. • This is called a relational database because all the data is stored in different tables and relations are established using primary keys or other keys known as Foreign Keys.
  • 101. Relational DataBase Management System (RDBMS) • Enables you to implement a database with tables, columns and indexes. • Guarantees the Referential Integrity between rows of various tables. • Updates the indexes automatically. • Interprets an SQL query and combines information from various tables.
  • 102. RDBMS Terminology • Database • Table • Column • Row • Redundancy • Primary Key • Foreign Key • Compound Key • Index • Referential Integrity
  • 103. MySQL Database • MySQL is released under an open-source license. So you have nothing to pay to use it. • MySQL is a very powerful program in its own right. It handles a large subset of the functionality of the most expensive and powerful database packages. • MySQL uses a standard form of the well-known SQL data language. • MySQL works on many operating systems and with many languages including PHP, PERL, C, C++, JAVA, etc. • MySQL works very quickly and works well even with large data sets. • MySQL is very friendly to PHP, the most appreciated language for web development. • MySQL supports large databases, up to 50 million rows or more in a table. The default file size limit for a table is 4GB, but you can increase this (if your operating system can handle it) to a theoretical limit of 8 million terabytes (TB). • MySQL is customizable. The open-source GPL license allows programmers to modify the MySQL software to fit their own specific environments.
  • 104. Administrative MySQL Command • USE Databasename − This will be used to select a database in the MySQL workarea. • SHOW DATABASES − Lists out the databases that are accessible by the MySQL DBMS. • SHOW TABLES − Shows the tables in the database once a database has been selected with the use command. • SHOW COLUMNS FROM tablename: Shows the attributes, types of attributes, key information, whether NULL is permitted, defaults, and other information for a table. • SHOW INDEX FROM tablename − Presents the details of all indexes on the table, including the PRIMARY KEY. • SHOW TABLE STATUS LIKE tablenameG − Reports details of the MySQL DBMS performance and statistics.