What is linux unix system administration

Лекции Технотрека. Администрирование Linux

Представляем вашему вниманию очередную порцию лекций Технотрека. В рамках курса будут рассмотрены основы системного администрирования интернет-сервисов, обеспечения их отказоустойчивости, производительности и безопасности, а также особенности устройства ОС Linux, наиболее широко применяемой в подобных проектах. В качестве примера будут использоваться дистрибутивы семейства RHEL 7 (CentOS 7), веб-сервер nginx, СУБД MySQL, системы резервного копирования bacula, системы мониторинга Zabbix, системы виртуализации oVirt, балансировщика нагрузки на базе ipvs+keepalived. Курс ведёт Сергей Клочков, системный администратор в компании Variti.

Лекция 1. Основы

В начале лекции вы узнаете об истории появления и развития Linux. Затем проводится экскурс по экосистеме Linux, рассказывается о некоторых различиях между дистрибутивами. Далее обсуждается иерархия файловой системы, рассматривается основной рабочий инструмент в этой ОС — командная строка. Подробно рассказывается о Bash-скриптах, о двух основных сущностях в системе — пользователях и группах. Затем обсуждаются регулирование прав доступа к файлам и директориям, рассматриваются привилегии пользователей и в завершение лекции затрагивается тема удалённого доступа.

Лекция 2. Пользовательское окружение Linux

Сначала подробно рассказывается об этапах загрузки системы и ОС, обсуждается ядро Linux. Объясняется, что собой представляет «процесс», как он использует оперативную память. Вы узнаете, что такое дескрипторы и для чего они нужны, как процессор потребляет ресурсы. Затем рассматриваются системные вызовы, сигналы, лимиты процессов, переменные окружения. Обсуждается вопрос размножения процессов и подробно анализируется работа процесса. В завершение вы узнаете о подсистеме perf и логах.

Лекция 3. Linux и сеть (основы)

Вы узнаете, что такое сетевой стек и модель OSI. Вспомните, что такое Ethernet и как с ним работает Linux. Дальше будут освежены ваши знания об использовании IPv4, особенностях IPv4-пакетов и сетей. Затем рассматривается ICMP, мультикаст в IPv4. Далее переходим к IPv6, обсуждаются заголовки IPv6-пакетов, UDP, TCP-соединения. Затрагивается тема TCP congestion control. Потом рассказывается о NAT, протоколах уровня приложения, DNS, NTP, HTTP и URL. Разбираются коды HTTP-ответа (успешные ответы и ошибки).

Лекция 4. Управление пользовательским окружением

Вы узнаете о том, что такое менеджер пакетов RPM и как его использовать. Далее рассматривается классический init, системный менеджер systemd. Разбирается пример init-файла. Обсуждаются основные типы Unit’ов, рассказывается про системный логгер и ротацию логов. В заключение вы узнаете об основах конфигурации сетевых интерфейсов.

Лекция 5. Веб-сервисы

Сначала рассматривается типовая архитектура веб-сервиса. Рассказывается о том, что такое фронтенд, что такое сервер приложений. Разбирается вопрос хранения данных веб-приложениями. Подробно разбирается работа и использование протокола HTTP. Обсуждаются виды HTTP-запросов. Затрагивается тема создания шифрованных туннелей с помощью SSL. Затем рассматриваются примеры установки СУБД MySQL с созданием БД и пользователя. Разбирается работа с PHP-FPM, конфигурирование nginx, установка и настройка wiki-движка.

Лекция 6. Хранение данных

Перечисляются основные проблемы хранения данных, рассматриваются достоинства и недостатки разных устройств хранения, их интерфейсы. Затем вы узнаете, как определять состояние жёсткого диска, какова его производительность, что такое RAID, какие бывают RAID-массивы и как их создавать. Сравниваются разные типы RAID, а также программные и аппаратные массивы. Обсуждаются LVM-снепшоты, рассматриваются разные файловые системы. Затрагивается вопрос удалённого хранения данных и использование протокола ISCSI.

Лекция 7. Сервисы инфраструктуры

Рассматривается DNS-сервер bind, NTP-сервер. Обсуждается централизованная аутентификация на основе LDAP. Разбирается DHCP, задача установки ОС по сети с помощью kickstart, а в завершение рассматривается система управления конфигурацией Salt.

Читайте также:  Linux mint не принимает пароль при входе

Лекция 8. Резервное копирование

Начало лекции посвящено продолжению рассказа о системе управления конфигурацией Salt. Рассказывается, как её установить, как осуществляется управление конфигурацией Linux, разбирается её пример. Вы узнаете, что такое «зёрна» и зачем они нужны. Далее переходим к теме резервного копирования: какие данные нужно копировать, каковы основные трудности, какие бывают виды резервных копий. Обсуждается задача резервного копирования ОС. Рассказывается об использовании системы резервного копирования bacula.

Лекция 9. Резервное копирование (часть 2)

В начале лекции рассказывается о резервном копировании БД. Обсуждаются различные стратегии резервного копирования — mysqldump, mylvmbackup. Вы узнаете, для чего нужен мониторинг и как его выполнять, какие есть средства мониторинга. Рассматриваются разные виды проверок. Обсуждаются шаблоны проверок. В заключение рассказывается об элементах данных, о выполнении веб-мониторинга.

Лекция 10. Инфраструктура электронной почты

Вы узнаете, что такое электронная почта, познакомитесь с основными понятиями. Затем рассматривается процесс доставки и выдачи почты. Обсуждается использование протоколов SMTP, POP3 и IMAP. Разбирается применение SMTP-сервера postfix, IMAP-сервера Dovecot. Рассказывается о том, как ходят письма по сети и что такое MX-записи. Наконец, обсуждается защита от спама, разбираются SPF-записи, DKIM и Spamassassin.

Лекция 11. Распределение ресурсов системы

Лекция посвящена продвинутым вопросам администрирования Linux. Сначала вы узнаете, как управлять параметрами ядра ОС. Затем рассматриваются модули ядра, как ими управлять. Обсуждается выделение ресурсов приложения. Далее рассказывается о планировщике задач, об алгоритмах шедулинга, о приоритетах процессов. Разбирается шедулер CFS, политики шедулинга. Вы узнаете, что такое NUMA и как с ней работать. Познакомитесь с планировщиками ввода/вывода. Далее рассказывается о контрольных группах, об управляемых ресурсах, об управлении контрольными группами и лимитами ввода/вывода.

Плейлист всех лекций находится по ссылке. Напомним, что актуальные лекции и мастер-классы о программировании от наших IT-специалистов в проектах Технопарк, Техносфера и Технотрек по-прежнему публикуются на канале Технострим.

Другие курсы Технотрека на Хабре:

Информацию обо всех наших образовательных проектах вы можете найти в недавней статье.

Источник

What is Linux System Administration?

Linux is an operating system or a kernel created by Linus Torvalds with other contributors. It was first released on September 17, 1991. The main advantage of Linux is that it is distributed under an open-source license means programmers can use the Linux Kernel to design their own custom operating systems. Most of Linux code is written in C Programming Language.

Some of the most popular operating systems that use Linux as kernel are Debian, Knoppix, Ubuntu, and Fedora. Nevertheless, the list does not end here as there are thousands of operating systems based on Linux which offer a variety of functions to the users.

Introduction to Linux System Administration: Linux is a major strength in computing technology. Most of the webserver, mobile phones, personal computers, supercomputers, and cloud-servers are powered by Linux. The job of a Linux systems administrator is to manage the operations of a computer system like maintain, enhance, create user account/report, taking backups using Linux tools and command-line interface tools. Most computing devices are powered by Linux because of its high stability, high security, and open-source environment. There are some of the things that a Linux system administrator should know and understand:

  • Linux File Systems
  • File System Hierarchy
  • Managing Root/super User
  • Basic Bash Command
  • Handling File, Directories and Users

Duties of a Linux Administrator: System Administration has become a solid criterion for an organization and institute that requires a solid IT foundation. Hence, the need for efficient Linux administrators is the requirement of the time. The job profile might change from each organization as there may be added responsibilities and duties to the role. Below are some duties of a Linux Administrator:

  • Maintain all internet requests inclusive to DNS, RADIUS, Apache, MySQL, PHP.
  • Taking regular back up of data, create new stored procedures and listing back-up is one of the duties.
  • Analyzing all error logs and fixing along with providing excellent customer support for Webhosting, ISP and LAN Customers on troubleshooting increased support troubles.
  • Communicating with the staff, vendors, and customers in a cultivated, professional manner at all times has to be one of his characteristics.
  • Enhance, maintain and creating the tools for the Linux environment and its users.
  • Detecting and solving the service problems ranging from disaster recovery to login problems.
  • Installing the necessary systems and security tools. Working with the Data Network Engineer and other personnel/departments to analyze hardware requirements and makes acquiring recommendations.
  • Troubleshoot, when the problem occurs in the server.
Читайте также:  Астра линукс отформатировать флешку

Steps to Start the Career as Linux System Admin:

  • Install and learn to use Linux environment
  • Get Certified in Linux administration
  • Learn to do Documentation
  • Joining up with a local Linux Users Group or Community for Support and Help

In short, the main role of the Linux Systems Administrator is to manage the operations like install, observe the software and hardware systems and taking backup. And also have a good ability to describe an In-depth understanding of technical knowledge. Even freshman-level Professionals has great possibilities for the position of System Administrator with the yearly median salary is around INR 3 Lacs, salary increase with an increase in job experience. To get the experience you need to check for the latest skills and learning in the Linux community.

Источник

Unix / Linux — User Administration

In this chapter, we will discuss in detail about user administration in Unix.

There are three types of accounts on a Unix system −

Root account

This is also called superuser and would have complete and unfettered control of the system. A superuser can run any commands without any restriction. This user should be assumed as a system administrator.

System accounts

System accounts are those needed for the operation of system-specific components for example mail accounts and the sshd accounts. These accounts are usually needed for some specific function on your system, and any modifications to them could adversely affect the system.

User accounts

User accounts provide interactive access to the system for users and groups of users. General users are typically assigned to these accounts and usually have limited access to critical system files and directories.

Unix supports a concept of Group Account which logically groups a number of accounts. Every account would be a part of another group account. A Unix group plays important role in handling file permissions and process management.

Managing Users and Groups

There are four main user administration files −

/etc/passwd − Keeps the user account and password information. This file holds the majority of information about accounts on the Unix system.

/etc/shadow − Holds the encrypted password of the corresponding account. Not all the systems support this file.

/etc/group − This file contains the group information for each account.

/etc/gshadow − This file contains secure group account information.

Check all the above files using the cat command.

The following table lists out commands that are available on majority of Unix systems to create and manage accounts and groups −

Adds accounts to the system

Modifies account attributes

Deletes accounts from the system

Adds groups to the system

Modifies group attributes

Removes groups from the system

You can use Manpage Help to check complete syntax for each command mentioned here.

Create a Group

We will now understand how to create a group. For this, we need to create groups before creating any account otherwise, we can make use of the existing groups in our system. We have all the groups listed in /etc/groups file.

All the default groups are system account specific groups and it is not recommended to use them for ordinary accounts. So, following is the syntax to create a new group account −

The following table lists out the parameters −

Sr.No. Command & Description
1

The numerical value of the group’s ID

This option permits to add group with non-unique GID

This flag instructs groupadd to add a system account

This option causes to just exit with success status, if the specified group already exists. With -g, if the specified GID already exists, other (unique) GID is chosen

Actual group name to be created

If you do not specify any parameter, then the system makes use of the default values.

Following example creates a developers group with default values, which is very much acceptable for most of the administrators.

Modify a Group

To modify a group, use the groupmod syntax −

To change the developers_2 group name to developer, type −

Here is how you will change the financial GID to 545 −

Delete a Group

We will now understand how to delete a group. To delete an existing group, all you need is the groupdel command and the group name. To delete the financial group, the command is −

This removes only the group, not the files associated with that group. The files are still accessible by their owners.

Create an Account

Let us see how to create a new account on your Unix system. Following is the syntax to create a user’s account −

The following table lists out the parameters −

Sr.No. Option & Description
1

Specifies home directory for the account

Specifies a group account for this account

Creates the home directory if it doesn’t exist

Specifies the default shell for this account

You can specify a user id for this account

Actual account name to be created

If you do not specify any parameter, then the system makes use of the default values. The useradd command modifies the /etc/passwd, /etc/shadow, and /etc/group files and creates a home directory.

Following is the example that creates an account mcmohd, setting its home directory to /home/mcmohd and the group as developers. This user would have Korn Shell assigned to it.

Before issuing the above command, make sure you already have the developers group created using the groupadd command.

Once an account is created you can set its password using the passwd command as follows −

When you type passwd accountname, it gives you an option to change the password, provided you are a superuser. Otherwise, you can change just your password using the same command but without specifying your account name.

Modify an Account

The usermod command enables you to make changes to an existing account from the command line. It uses the same arguments as the useradd command, plus the -l argument, which allows you to change the account name.

For example, to change the account name mcmohd to mcmohd20 and to change home directory accordingly, you will need to issue the following command −

Delete an Account

The userdel command can be used to delete an existing user. This is a very dangerous command if not used with caution.

There is only one argument or option available for the command .r, for removing the account’s home directory and mail file.

For example, to remove account mcmohd20, issue the following command −

If you want to keep the home directory for backup purposes, omit the -r option. You can remove the home directory as needed at a later time.

Источник

Читайте также:  Set service name windows service
Оцените статью
Sr.No. Option & Description
1