• No results found

Content created by: ESSI PROJECTS LIMITED

N/A
N/A
Protected

Academic year: 2022

Share "Content created by: ESSI PROJECTS LIMITED"

Copied!
70
0
0

Loading.... (view fulltext now)

Full text

(1)

Remember: This is not the best format to enjoy this content. Visit cisoss.eu to download the sources in ELP format (ExeLearning) or see the IMS deployed in our Moodle platform.

Content created by:

ESSI PROJECTS LIMITED

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(2)

Operating Systems

Operating Systems

Content created by:

ESSI PROJECTS LIMITED

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(3)

Introduction GNU Linux

The GNU Linux is an Operating System where you can perform several actions on it, you can install programs to run in order to execute a text processing, deploying a web server, executing a database to search for information and much more.

The main goals in this Introduction is to:

Knowing what is a GNU/Linux distribution

Knowing the relationship between RHEL, Fedora, CentOS distros and Debian, Ubuntu distros.

Knowing the difference between graphical environment and Terminal Working with Bash Shell

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(4)

What is GNU/Linux?

The GNU/Linux Operating Systems is a type of free software you can download and install on your hardware. It is based on Open Source Software, which are available to everyone under a license, called GPL (General Public License) in which the copyright holder provides the rights to study, change and distribute the software to anyone and for any purpose. This provides to everyone the mechanism to develop and customize the operating system as they want, if you know what to modify and a little bit of programming.

Generally people do not make difference between GNU Systems and Linux, Linux is the kernel of the system, the part of the system which manage the resources of the system, the system calls, read/write disk operations, etc. GNU Systems holds Linux within.

The following image will show exactly the difference and where to locate the concepts

To know more about GNU/Linux Systems https://www.gnu.org/gnu/linux-and-gnu.es.html To know more about GPL License

https://www.gnu.org/licenses/gpl-3.0.en.html This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(5)

GNU/Linux Distributions

A GNU/Linux Distributions, is an Operating System that is based on a collection of software in order to customize their behavior and a Linux kernel based on a GNU/Linux System parent.

GNU/Linux Distributions Timelines. In this graphic we can observe the amount of distros that had been appear during this years, when they start, and sometimes, die.

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(6)

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(7)

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(8)

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(9)

RHEL / CentOS / Fedora

Relationship between RHEL based Distributions

Red Hat is the Parent distribution of Fedora and CentOS (which means that are based on Red Hat distro). The source codes are developed by Fedora Community (fedoraproject.org). The Fedora

Community is a group of people around the world that work together in order to improve the performance of the distro. When the source code are finally developed, they give the code to Red Had, which test the code to ensure that work correctly. Fedora benefits from the sponsorship and feedback from Red Hat, that means that Red Hat can bring leading-edge innovation to the broader community for collaboration, enabling a rapid maturation of the technology. CentOS are holding the Red Hat source codes, because Red Hat is very stable and exhaustively and widely tested, that means that their packages ensures their functionality.

Here is a picture that will clarify this explanation.

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(10)

The reference: https://fedoraproject.org/wiki/Docs_Project?rd=DocsProject

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(11)

Ubuntu / Debian

Relationship between Debian and Ubuntu

Ubuntu builds on the foundations of Debian's architecture and infrastructure, but there are important differences. Ubuntu has its own user interface, a separate developer community (though many developers participate in both projects) and a different release process.

About Debian

Debian can be considered the rock upon which Ubuntu is built. It is a volunteer project that has developed and maintained a GNU/Linux operating system of the same name for well over a decade.

Since its launch, the Debian project has grown to comprise more than 1,000 members with official developer status, alongside many more volunteers and contributors. Today, Debian encompasses over 20,000 packages of free, open source applications and documentation.

About Ubuntu

Ubuntu is an open source project that develops and maintains a cross-platform, open-source operating system based on Debian. Upgrades are released every six months and support is guaranteed by Canonical for up to five years. Canonical also provides commercial support for Ubuntu deployments across the desktop, the server and the cloud.

Reference: https://www.ubuntu.com/about/about-ubuntu/ubuntu-and-debian

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(12)

Graphical Environment or Terminal

When to use Graphical Environment or Terminal

Graphical environment is useful to do some tasks intuitively with the mouse/touchpad. You can install packages, view documents, work between folders of your own, and configure service for your computer.

The terminal is much more powerful in order to administrate the computer. It gives you the chance of manage all the files of the system (with root privileges) change permissions of folders and files, manages services, configuring the services, executing programs with parameters and much more

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(13)

Commands

Basic user / root Commands # man command # id

# su -

# passwd [ user ] # exit

# sudo root_command

Preknowledge

man: Is a software documentation which topic covered include computer programs (libraries and syscalls) formal standards and conventions, and even abstract concepts.

The command that follows the man command is to indicate that we want to read the documentation page of the command: command

id: This command print the real and effective user and group IDs

su -: Allows to run a command with substitute user and group. If we do not indicate which user to allow, it take the root by default. If I had a user that is called john, and wanted to change to user olivia, I could do that by typing su - olivia. The hyphen is to indicate that we want to load the environment variables of olivia. An environment variable, is a type of data that is stored in each user, some of them are common, but we can customize each variables by putting, for example, the path of a database of gods.

password [user]: This command is to change the password of the user that we indicate at the end of the command.

exit: This is to quit the environment, in this case if we entered as root, we quit from being root and get back to our users. If we type exit with our user, we will close the terminal session.

sudo root_command: This command is to execute a root_command as root, but without being the root user. We have to be in the sudoers file to be able to execute

root_commands as root.

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(14)

Laboratory

Laboratory - Bash Shell and LOGIN

[ student@server ] $ su - password

[ root@server ] # id [ root@server ] # passwd

[ root@server ] # exit

[ student@server ] $ id [ student@server ] $ passwd

[ student@server ] $ sudo passwd root [ student@server ] $ su -

Entering as root user. At this point the system will ask us the password of the user root.

We execute the id command to look for our user and group IDs.

We change the password root.

We leave from root user and environment.

We execute the id command to look for our user and group IDs.

We change the password of user student.

We change the password root by enabling the execution through sudo command.

We enter as root user, loading the environment variables.

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(15)

Software Installation

Achievements

Knowing the differences betwseen RPM and DEB package files Knowing the differences betwseen RPM and DEB package files Knowing how to install and update software

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(16)

Differences between DEB and RPM Main Difference

From user’s point of view, there isn’t much difference in these tools. The RPM and DEB formats are both just archive files, with some metadata attached to them. They are both equally arcane, have hardcoded install paths and only differ in subtle details. DEB files are installation files for Debian based distributions.

RPM files are installation files for Red Hat based distributions. Ubuntu is based on Debian’s package manage based on APT and DPKG. Red Hat, CentOS and Fedora are based on the old Red Hat Linux package management system, RPM.

RPM

It is a package management system. The name RPM variously refers to the .rpm file format, files in this format, software packaged in such files, and the package manager itself. RPM was intended primarily for Linux distributions; the file format is the baseline package format of the Linux Standard Base. RPM was developed by Community & Red Hat.

Specifications:

All packages located in ~/rpmbuild

Underneath, exist the folder SPEC, SOURCES, RPMS and SPRMS

What defines how everything in the package will be installed goes into spec-file

Reference: https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/

DEB

DEB is the extension of the Debian software package format and the most often used name for such binary packages. DEB was developed by Debian

Specifications:

Development files are contained in a directory per package

A bit more accepted to carry patches in a package that are not upstream.

A vast amount of scripts that are able to automate a huge portion of creating a package.

Reference: https://wiki.debian.org/deb

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(17)

YUM

Yum is the primary tool for getting, installing, deleting, querying, and managing Red Hat Enterprise Linux RPMs software packages from official Red Hat software repositories, as well as other third-party

repositories (Fedora and CentOS). yum is used in Red Hat Enterprise Linux versions 5 and later, Fedora and CentOS distributions.

# yum

repolist Display the configured software repositories search Search package details for the given string info Display details about a package

install Install a package or packages on your system erase Remove a package or packages from your system provides Find what package provides the given value history Display, or use, the transaction history help Display a helpful usage message

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(18)

APT-GET / CACHE

APT-CACHE

The apt-cache command can display much of the information stored in APT's internal database. This information is a sort of cache since it is gathered from the different sources listed in the source.list file.

This happens during the apt update operation.

The apt-cache command can do keyword-based package searches with apt-cache keyword. It can also display the headers of the package's available versions with apt-cache show package. This command provides the package's description, its dependencies, the name of its maintainer, etc. Note that apt search, apt show, aptitude show work in the same way.

man page

# apt-cache

pkgnames List all available packages

search Find out package names and description show Show information about the package

showpkg Check dependencies for a particular software

APT-GET

The apt-get command is a powerful command-line tool, which works with Ubuntu's Advanced Packaging Tool (APT) performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system.

Being a simple command-line tool, apt-get has numerous advantages over other package management tools available in Ubuntu for server administrators. Some of these advantages include ease of use over simple terminal connections (SSH), and the ability to be used in system administration scripts, which can in turn be automated by the cron scheduling utility.

man page

# apt-get

update Update system packages upgrade Upgrade software packages install Install a specific software purge Delete one package

remove Delete software from system without removing config files autoremove Removes package and dependecies

clean Free up disk space by cleaning downloaded files and packages from the local reposit

DEBIAN - DPKG

dpkg is a tool to install, build, remove and manage Debian packages. The primary and more user-friendly front-end for dpkg is aptitude. dpkg itself is controlled entirely via command line parameters, which consist of exactly one action and zero or more options. The action- parameter tells dpkg what to do and options control the behavior of the action in some way.

man page

# dpkg

-i #pkg_name Installing a donwnloaded package -l List all installed packages

-l #pkg_name View a specific package installed -r #pkg_name Remove the #pkg_name package

-p #pkg_name Remove the #pkg_name package and config files This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

(19)

-c #pkg_name View content of a package -L #pkg_name List location of files to be installed

--unpack #pkg_name Will unpack the hole package without install or configure it.

--configure #pkg_name Will reconfigure a already unpacked package

This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/).

References

Related documents

All of the participants were faculty members, currently working in a higher education setting, teaching adapted physical activity / education courses and, finally, were

An analysis of the economic contribution of the software industry examined the effect of software activity on the Lebanese economy by measuring it in terms of output and value

Alternative exit routes may be relatively attractive for generations born in 1949 and later as they are not eligible to the (rather generous) transitional early retirement

SH3BP2 decreases inflammatory bone loss via impaired osteoclastogenesis in the hTNF-Tg arthritis model and that SH3BP2 deficiency suppresses induction of arthritis via

Kathryn Southworth (Chair) Jenny Newlyn (Officer) Paul Buszard William Mott Gill Sower Oliver Pritchard Sharon Hasluck Seth Crofts Martin Cartwright.. In attendance from WBS

Lebedev Physical Institute, Moscow, Russia 41: Also at Budker Institute of Nuclear Physics, Novosibirsk, Russia 42: Also at Faculty of Physics, University of Belgrade, Belgrade,

Como resultado del presente estudio se pudo observar que se han dado cambios en el paisaje costero desde 1988 hasta la actualidad, en la parte noroeste de

However, instead of using “certify”, USACE will state “has met all the requirements established by USACE for determining that the levee system can be reasonably expected to exclude