Linux Server Basics for Beginners. How do I create a local server on LINUX?

To create a terminal, file (FTP) or mail server on Linux, you must be able to work in this operating system. Otherwise, it will be difficult to figure it out. No OS needed powerful computer... Because it doesn't waste extra resources on graphic design. Linux distributions can be deployed even on an old PC. Therefore, Linux or Ubuntu Server is often used to create various servers.

A lot of different literature has been written about this. Some Linux books are thousands of pages long. You will have to work through the terminal and enter all commands manually. But you can still make a small Linux server with your own hands, which will include file storage, Web services, and mail protocol.

Ubuntu Server is based on the Linux operating system. It does not require a modern processor, a good video card or large volume random access memory... With Linux, you can deploy a server even on an old laptop. And it will have all the necessary components: mail, FTP, Web.

You can download a Linux disk image from Ubuntu.ru. Choose any version with Server (not Desktop!). The download will go through a Torrent client. This image must be written to a disc or flash drive (using LiveUSB). You can also use a virtual drive.

Ubuntu has a simplified interface. There are no graphical frills in it. This OS is perfect for making a DIY Linux server. With it, computer resources will be used for the needs of the domain. After all, she needs very little to work.

Its installation goes like this:

  • Select the language and region where you live.
  • Come up with an administrator name. It is used to manage the server.
  • Also enter your username in the "Username for your account" field. Under this account, you will communicate with Ubuntu technical support.


Specifying the username in Ubuntu

  • Enter password. Confirm it.


Enter the account password

  • Enter the domain, if any. All services will be located on it: file (FTP), mail, hosting for sites, and so on.
  • Wait for the system to install.
  • After that, she will suggest additional components.

Here is a list of what you need to get a Linux server running properly:

  • Open SSh. Used for remote administration. Useful if you decide to manage the service from another computer. Then on a Linux PC it will be possible to disable the monitor and video adapter.
  • LAMP. A set of Linux utilities that includes Apache (Web server). MySQL (databases) and PHP (programming language for CMS). These components are needed to create the control interface.
  • Samba file server. Allows you to configure the exchange of files between computers. If you need an FTP server, select this item.
  • Virtual Machine host. Install if you intend to use virtualization capabilities.
  • Print server. Network printers.
  • DNS server. Domain name system. With it, you can recognize the IP address by the computer name and vice versa.
  • Mail server. Mail server.
  • PostgreSQL database. Object-relational databases.

Choose what you want and confirm the installation. At the first start, you will need to enter the administrator login and password. The console will open. It is similar to the Windows command line or the MS DOS operating system interface.


Initially, you will need to check for updates. Enter the command "Sudo apt-get update" or "Sudo apt-get upgrade" without quotes. After the update, you can start configuring all server components: FTP, mail, Web.

There is a pseudo-graphic interface for Ubuntu - Midnight Commander. This is an analogue of the Norton Commander shell, which is designed for MS DOS systems. This interface is easier to work with - everything is clearer than in the console.

Starting Linux Terminal

Modern Linux uses a terminal instead of a console. To enter it:

  1. Open "Applications".
  2. Click "Standard".
  3. The Terminal will be there.


You can enter commands in it just like in Ubuntu Server.

  • To install the LAMP components (if they are not already there), you must enter the commands "sudo apt-get update", "sudo apt-get install tasksel" and "sudo tasksel install lamp-server". After each press Enter.
  • To load Open SSh, enter "sudo apt-get install openssh-server".
  • To install the Samba file server, write "sudo apt-get install samba".

When installing MySQL from the LAMP package, you will need to set an administrator password for SQL.

Local Web Server

To create a Web, the server must have its own dedicated IP. Then after installing LAMP, the Apache test page will be available at this IP address. This is the future Web. In the future, it will be possible to put FTP, databases, postal protocol on it. To configure the web server:

  • Install phpMyAdmin. To do this, in the terminal or in the console, enter one after the other enter "sudo apt-get install phpmyadmin"


  • And then "sudo service apache2 restart".
  • The component will load. Apache will restart. Further steps depend on the version of the operating system.

If you have Ubuntu 13.1 or higher, use the commands:

  1. sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
  2. sudo a2enconf phpmyadmin
  3. sudo /etc/init.d/apache2 reload

Drive them sequentially one after another, after each press Enter.

On Ubuntu 16.04, other directions are needed:

  1. sudo apt-get install php-mbstring php-gettext
  2. sudo phpenmod mcrypt
  3. sudo phpenmod mbstring
  4. sudo systemctl restart apache2

After entering them and automatically restarting the service, the web interface will be available at http: /// phpmyadmin.

  • The configuration and data about it are located in the Apache server folder "etc / apache2 /". Apache2.conf - configuration file for the distribution
  • Mods and sites are located in the "mods-available" / "sites-available" and "mods-enabled" / "sites-enabled" directories.
  • Ports.conf lists the listening ports.
  • If you add the word Stop after sudo /etc/init.d/apache2, Apache will suspend. If "Start" - it will start again. If "Restart" - it will reboot.
  • To independently choose the path for saving sites, sequentially enter "sudo a2enmod rewrite" and "sudo a2enmod userdir" into the terminal.

Each time after making any changes, the service must be restarted with the "Restart" command.

Mail server

To create a mail server on Linux, you must already have a registered domain. You also need to have a static IP.

  • Install the Postfix component. To do this, type "sudo apt-get postfix" in the console.
  • When it boots up, write the command "sudo / etc / initd / postfix start". The service will start working.
  • Postfix already contains the parameters that are needed to fully work with the SMTP protocol. Still, a little tweak won't hurt.
  • Open the file /etc/postfix/main.cf.
  • Find the value "mydomain \u003d" in it. After the "\u003d" sign, write the domain name.
  • Then find "myhostname \u003d". And enter the name of the machine.
  • Now the mail server can send letters to other computers that are on the same network with it. To enable him to send correspondence to other domains on the Internet, find the line “inet_interfaces \u003d” in the “main.cf” file. Put the word "all" after it.
  • In the variable "mynetworks \u003d" write the address range of all computers on your subnet (for example, 127.0.0.0/8).

If the service is configured correctly, and all conditions are met (permanent IP address, registered domain), then the Server will be able to receive and send correspondence. If your domain's MX record refers to your host.

To view the logs of a resource, use the "tail -f / var / log / mail / info" command. To receive a message from him, enter "mailq".

File server

A Linux FTP server may be needed to exchange documents and upload files. There are several versions of such resources: vsFTPd, Samba, proFTPd.

Let's take a closer look at vsFTPd. It can be installed and run with one command - "sudo apt-get install vsftpd". Further settings depend on your preferences and on what service you want to make. You may need administrator rights to change settings.

  1. Immediately after loading the program, the system creates a new user and adds a folder to the home directory, which is intended for working with the server storage. Also, the file "ftpusers" appears in the "etc" directory. There you can add users who are denied access to files.
  2. After installation, it is better to change the directory where the files should be located to the “var” folder. To do this, write the command "usermod -d / var / ftp ftp && rmdir / home / ftp" as administrator.
  3. Create new group users. For example, "userftp". Type "addgroup userftp" into the console.
  4. Add to it new account (let's call the user and group the same for simplicity). Use the command "useradd -a / var / ftp -g userftp userftp". It also creates a user. To include an existing nickname in the group, write “usermod” instead of “useradd”.
  5. We need to come up with a password for the new user. Enter "passwd userftp" in the terminal.
  6. Type "chmod 555 / var / ftp && chown root: userftp / var / ftp" to give the account access to the root of the file server.
  7. Now create a public directory. Enter "mkdir / var / ftp / pub" and "chown userftp: userftp / var / ftp / pub" in sequence.

Initially, FTP runs offline. She has a script that plays the role of a daemon. With this functionality, several commands are available. They are entered after the line "sudo service vsftpd".

  • Stop and Start. Disable and enable.
  • Restart and Reload. Restart. Needed to apply new settings. The difference between the commands is that the second reboot occurs without a complete shutdown.
  • Status. Status information.

Further configuration of the server is to rewrite the configuration file located in etc / vsftpd.conf. It has a simple and straightforward structure. It is quite simple to understand it. Although this requires certain knowledge. Before changing this file, it makes sense to make it backup... So that in case of errors, everything can be restored. Enter the command "cp /etc/vsftpd.conf /etc/vsftpd_old.conf" and the information will be saved.

After that, you can start editing.

  • In the "listen \u003d" parameter write "YES". Then the server will work in an independent mode.
  • Local_enable allows local users to log in.
  • "Write_enable" gives them access to home directories.
  • "Anonymous_enable". You can restrict the rights of anonymous users if you put "NO". There is also an option "no_anon_password" - anonymous users enter without a password. It can also be banned.

If you want to make a public server, then after the "listen" line you need to add some additional parameters.

  • "Max_clients". The number of simultaneous connections.
  • "Idle_session_timeout" and "data_connection_timeout". Session timeouts.
  • "Ftpd_banner". Welcome message for visitors. You can write, for example, "Hello!"

Terminal Server

Terminal server on Linux is intended for enterprises and offices, all computers in which are united into one network. It is very convenient when you can access the terminal from any PC (if it has access) of the organization. This opens up great opportunities for remote administration.

LTSP - Linux Terminal Server Project is suitable for this task. The program is included in the standard Ubuntu package. To install it:

  1. Enter the command "ltsp-server-standalone".
  2. Then write "apt-get update && apt-get install ltsp-server-standalone".
  3. Wait for everything to download and update.
  4. Now we need to install the client system. Type "ltsp-build-client".
  5. Then "ltsp-build-client -dist trusty -arch i386 -fat-client-desktop lubuntu-desktop".
  6. Use the "debootstrap" command and the distribution will automatically deploy to the "opt / ltsp / i386" directory.

Linux Server can run even on weak PCs. Therefore, it is very often used to create servers and remote administration. Mail services, FTP-storages, terminals are made on this operating system.

Linux operating systems are extremely common and have a wide range of applications. While certain Linux distributions are geared towards power users, others are much simpler and great for migrating from Windows. Linux distributions often take advantage of the significant resources of their user communities.

Although Linux operating systems offer an excellent working environment for desktop computersLinux can also be an excellent system for server applications... Typically, Linux provides improved access control, giving greater flexibility and stability.

Therefore, Linux distributions are the ideal server landscape. Check out the 12 best Linux server operating systems and who they are for.

What is Linux Server Operating System?

What makes a Linux server operating system different from a regular Linux distribution? To answer, you need to consider the server hardware. Servers are essentially computers with special characteristics. For example, server hardware guarantees long uptime, efficiency and reliability. In addition, servers balance computing power with power consumption. Therefore, Linux server operating systems prioritize reliability and resource consumption.

The Linux server operating system serves content to client devices. Accordingly, server operating systems have the tools to create simple servers. Because servers are mostly automated, the Linux graphical user interface (GUI) for the server is less important.

According to IDC, hardware sales data indicate that 28 percent of servers use Linux... However, this data most likely does not include home servers. Using specialized Linux operating systems, you can deploy your own server. It is important here to use the Long Term Life (LTS) version and install the correct software. The LTS versions are more stable and have a long support period.

When choosing a Linux operating system for a server, consider the purpose of the server. Application a Linux computer as a media server different from using it as game server.

    Probably the most famous of operating systems Linux is Ubuntu. With many options, Ubuntu is a stable distribution. This system and its variants provide excellent user experience. Ubuntu Server comes in two versions - LTS and a rolling release. The LTS version of Ubuntu Server is said to have a five-year support period. Although this period is not five years, non-LTS versions only have nine months of security and maintenance updates.

    While Ubuntu and Ubuntu Server are very similar to each other, the Server version offers different tools. For example, Ubuntu Server provides add-ons such as OpenStack Mitaka, Nginx, and LXD. They facilitate system administration. Using Ubuntu Server, you can deploy web servers, provide containers, and more. What's more, these tools are ready to use right out of the box.

    Although not a server distribution, Ubuntu LTS comes with a five-year support period. I am currently using Ubuntu 16.04 LTS running a Plex server as my Linux game server. LTS distributions can function just fine as Linux operating systems for servers. You just need to install the server software on them.

    If you are new to Linux, or new to server operating systems, Ubuntu is a great choice. This system remains one of the most popular Linux distributions in part due to its user-friendliness. Accordingly, Ubuntu Server is a Linux server operating system fantastically suitable for novice users. It excels as a media server, game server, and server email... More complex servers can also be configured on Ubuntu Server, but it is definitely geared towards mainstream servers and newbies.


      SUSE Linux debuted in 1993. In 2015, the open source variant of openSUSE evolved into SUSE Linux Enterprise (SLE). There are two branches of openSUSE: Leap and Tumbleweed. The Leap version has a longer release cycle, while Tumbleweed is a rolling release. Therefore, Tumbleweed is more suitable for power users, providing the latest packages such as Linux Kernel and SAMBA. Leap is more suitable for stable solutions. The operating system is maintained through updates.

      The default toolkit makes openSUSE a fantastic Linux server operating system. It includes openQA for automated testing, Kiwi for delivering Linux images to multiple platforms, YaST for configuring Linux, and the comprehensive Open Build Service package manager. By moving away from the nine-month rolling release cycle, and focusing on stability, as is the case with SLE, openSUSE is becoming a viable Linux environment for servers. Information technology specialists even named openSUSE "... CentOS and Debian from SUSE".

      For which users is it intended: OpenSUSE is more suitable for advanced users such as system administrators. It is suitable for installation webservers, basic home servers, or combinations of web servers and backend servers. System administrators can take advantage of tools such as Kiwi, YaST, OBS, and openQA. OpenSUSE's versatility makes it one of the best Linux operating systems for servers. In addition to its server-side capabilities, openSUSE maintains a pleasant desktop environment. For most basic servers, openSUSE is also quite suitable, although somewhat redundant. Still not sure?


        If you are ambivalent as you read the words "Oracle Linux", then you are not alone. Oracle Linux is a Linux distribution supplied by the tech giant Oracle. This system is available with two different kernels. One variant has a Red Hat Compatible Kernel (RHCK). This is the exact same kernel that is used by Red Hat Enterprise Linux (RHEL). Oracle Linux system certified to work with a variety of equipment from manufacturers such as Lenovo, IBM and HP. Oracle Linux uses Ksplice technology to increase kernel security. The system also includes support for Oracle containers, Openstack, Linux and Docker. Oracle themes, including Oracle Penguin, are used as brand symbols.

        The system is supported by the manufacturer, but it is paid. However, if Oracle Linux is not running in an enterprise environment, there is no support price. If the need arises to deploy a public or private cloud, then the Oracle Linux operating system supports these technologies as well. Alternatively, you can try Oracle Linux if you just want an Oracle-branded Linux system.

        For which users is it intended:Oracle system Linux is better perfect for datacenters or for building clouds with OpenStack. Oracle Linux is best suited for the most experienced home or enterprise server user.

        1. Container Linux (formerly CoreOS)


        The operating system CoreOS in 2016 changed its name to Container Linux. As the new name suggests, Container Linux is a Linux operating system released to provide containers. The system focuses on simplifying the container provisioning process. Container Linux is an excellent operating system for reliable, scalable use. Clustered container deployment is easy, and this distribution includes a service discovery tool. It includes documentation and support for Kubernetes, Docker and rkt technologies.

        The system does not include package management. All applications must run within containers, so containerization is a must. And if you work with containers, then Container Linux is the best operating system for servers in a cluster infrastructure. It provides an etcd daemon that runs on every machine in the cluster. In addition, a certain flexibility is provided in the installation. Besides local installation, Container Linux runs in virtualization environments such as Azure, VMware, and Amazon EC2.

        For which users is it intended:Container Linux is best suited for servers in a clustered infrastructure or with container provisioning. This is most likely not meant for the average home user. But with the official Docker logo for Plex lovers, Container Linux can run in any environment - from a basic home server to complex clusters. Use Container Linux if you are comfortable working with containers. Together with openSUSE, Container Linux is one of the best new and updated Linux operating systems to try.


          The CentOS operating system provides a stable working environment. It is an open source variant of the Red Hat Enterprise Linux (RHEL) operating system. In this regard, CentOS provides an enterprise level server. This operating system from Red Hat uses the same sourcelike RHEL. CentOS comes with an RPM package manager. In 2010, a review of sales data showed that approximately 30 percent of all Linux servers works on CentOS. And for good reason: it is a very robust server environment with support from Red Hat.

          It should be noted that CentOS works well on mainframes as well. For users who prefer a GUI, KDE and GNOME are available on the system. CentOS can be used as a native desktop operating system. With support from Red Hat and a growing user community, CentOS remains bug-free.

          For which users is it intended: CentOS provides the functionality and resilience of Red Hat Enterprise Linux. Therefore, it is perfect as a modern server operating system. If you need a free alternative to RHEL, you can use CentOS. However, it is also quite beginner friendly thanks to its package manager. Overall, CentOS is the best free alternative to Red Hat Enterprise Linux.


            Many servers limit their power consumption. Reducing power consumption is a major benefit, especially for always-on machines. Therefore, Linux operating systems for servers must use little resources. Proper resource allocation is a key factor for server uptime and efficiency. Many Linux distributions use fewer resources than their Windows or macOS counterparts. The Arch operating system is a simple, lightweight distribution that adheres to the KISS principle ("make things easier").

            For this system in Arch Linux Wiki highlighted... There you can find out everything related to configuring Arch Linux as the operating system for the server. While there is no dedicated, pre-built release for servers, this Wiki documentation describes all the steps for creating your own server operating system. You can install popular programs for servers including MySQL, Apache, Samba and PHP for Arch.

            For which users is it intended: Arch Linux is a versatile Linux operating system for servers. It is ideal for turning into an old PC server. But, despite its lightness, the Arch system is quite functional and on a more powerful hardware... In addition, Arch Linux is best for users with a technical background, as they will have to set up Arch as a server system.



              The Mageia system is a Linux operating system with a focus on reliability and stability. This is a branch of Mandriva Linux, introduced in 2010. In 2012, PC World magazine praised Mageia, which has now reached its fifth version. While there are many Linux operating systems, there is also a large list of Linux desktop environments. The Mageia system includes a whole bunch of user interfaces such as KDE, GNOME, Xfce, and LXDE.

              Instead of MySQL in mageia includes MariaDB... Server-centric elements such as 389 Directory Server and Kolab Groupware Server make Mageia the premier Linux operating system for servers.

              For which users is it intended: Mageia is a trusted Linux operating system for servers. It includes tools such as MariaDB and Kolab Groupware Server. In addition, Mageia provides a reliable, secure environment. Users looking for a GUI may also consider using Mageia thanks to its many desktop interfaces.


                ClearOS is designed specifically for servers, gateways and networking systems. Standard system installation provides enhanced security. It includes network firewall, bandwidth controls, mail server, and intrusion detection tools. The ClearOS 7 Community Edition includes 75 apps and tools.

                While there are paid versions of ClearOS, the Community Edition remains free. In addition, ClearOS developer updates are also free, but free updates are not tested.

                For which users is it intended: ClearOS is a dedicated Linux operating system for servers. Its rich set of applications places ClearOS in the position of a Linux specialist focused distribution. Linux hobbyists and specialists just need to request the required applications. But for beginners it is better to choose other distributions of systems for servers.


                  The Slackware operating system has long been used as Linux for servers. The first release of this system appeared in 1993. According to the Slackware Linux site, the goal of this project is "a Linux distribution that is as close to UNIX as possible." By default, Slackware provides an interface command line.

                  Full Slackware installation includes C and C ++, X Windows system, mail server, web server, FTP server and news server. Moreover, Slackware is so lightweight that it can run on the Pentium platform. Continuing releases increase the stability and simplicity of the system.

                  For which users is it intended: Slackware Linux is best for seasoned Linux professionals. It has two package managers, pkgtools and slackpkg. But since Slackware runs the command line interface by default, it is best suited as a Linux operating system for servers. Moreover, there is a certain amount of complexity in its simplicity. To use Slackware, you must understand how you operate in a Linux environment.


                    Gentoo is different from many Linux distributions. Instead of the traditional release model Gentoo uses a modular structure... That is, the user chooses what will be installed. This puts Gentoo at the top of the list of Linux server operating systems.

                    Each installation of this system is unique. Users can build a kernel that provides maximum control. Therefore, the server can control aspects such as memory consumption. Due to its modular structure and flexibility, Gentoo is becoming very popular among Linux professionals. System administrators appreciate Gentoo's approach to building a system according to needs.

                    For which users is it intended: Gentoo is best suited for technical users and system administrators. While Gentoo can be used by newbies, it is less geared towards the inexperienced user than the average Ubuntu. However, the system has excellent documentation and its community is constantly evolving.


                      If you're looking for a fresh Linux operating system for servers, try Fedora. Backed by Red Hat, the Fedora Project receives regular updates. Developers contribute frequently to these updates. Fedora comes in a variety of flavors. The Workstation version is designed for general users and comes with a desktop environment. Fedora Workstation ships with the GNOME interface by default, but other user interfaces are available. Fedora Server, as the name suggests, is for servers.

                      By default, a graphical user interface is not included with Fedora Server installations. However, if you do not plan to use the server in unattended mode, you can install one of the user interfaces. The Server edition has many tools. These include the Cockpit control panel. In addition, databases such as PostgreSQL are included in Fedora Server.

                      For which users is it intended: Experienced Linux developers and system administrators will choose Fedora Server. The lack of a desktop environment and enterprise-class system characteristics mean Fedora is best suited for modern servers.


                        Well, special issue for Debian servers does not. However, Debian is one of the best Linux server operating systems available. Since the Debian system was released in 1993 and its first stable release appeared in 1996, this system is incredibly secure. Many Linux distributions, including Ubuntu, are Debian based. Why is Debian used as the basis for another operating system? Only because of its stability.

                        Also, Debian is often used on servers as it has stood the test of time. The system includes a project manager, APT tools, and various external presentation tools such as GDebi. Therefore, although Debian does not come in a server version, it is an excellent operating system for self-deploying your own server. Debian is characterized by impressive application compatibility, reliability and stability.

                        For which users is it intended: The Debian system provides a fantastic two-pronged server environment. If you need a basic server such as a web server, mail server, game server, or media server, then Debian allows you to install them without much difficulty. On the other hand, more experienced users with specific server needs should also consider using Debian. At the same time, this approach does not require DIY work.

                        Best Linux operating systems for servers

                        While many Linux operating systems can be found suitable for servers, each is the best for a specific user group. Moreover, the non-server LTS editions function perfectly as a Linux operating system for servers. A good example this kind is Debian. Although this system does not have a dedicated server distribution, it does have the basic characteristics of such a distribution. Namely, stability and security.

                        For beginners, or for those looking for a simple server setup, I would recommend any Debian based distribution or Ubuntu variant. I use Ubuntu flavors for all of my media or game servers. They have maximum compatibility with the software I use and allow me to create combinations of PC-based home theater servers and media servers.

                        Oleg

                        Publisher

                        website

                        12 best Linux server operating systems and who they are for

                        Operating unix system (as the progenitor of Linux) was created primarily for server tasks, so most GNU utilities are console-based (that is, they work only in the command line of a Linux terminal), because there is no need for a graphical shell on the server. However, over time, the functionality of server services in Linux has grown so much that constant editing of configuration files from the command line has become difficult, and therefore, for now there are a huge number of graphical administration tools (often implemented as a WEB interface) that greatly simplify the life of system administrators.

                        A huge number of commercial solutions and products are based on Linux server services and utilities. Linux server can fulfill almost any server role. In short, I will try to tell you about the main roles of Linux:

                        Linux file server

                        Linux can act as a file server quite easily for both Windows users and for Linux. The main service for this is the Samba package, which allows you to access network drives and printers using the protocol used in Windows networks... Has client and server parts. It is free software released under the GPL license. Using Samba, it is possible to organize a full-fledged file exchange between users with a clear differentiation of access rights.

                        For more experienced system administrators, I can say that the current version of the Samba server can act as a domain controller and an Active Directory service (centralized management of computers and users running on the Windows operating system), is able to serve all supported by Microsoft windows versions clients, including Windows 10. Previously, this was only possible with an expensive Microsoft Windows Server.


                        Database server

                        Almost all systems of any complexity and purpose cannot do without a database. It is no secret that almost all sites located on the Internet work using a database that runs on the Linux platform (usually MySQL). Accounting systems (for example 1C), CRM, design systems and others all use databases. However, most of the previously written desktop applications (running on user computers) developed under Windows run using databases under this operating system. However, at present in Linux their number is simply enormous, and the functionality is often not inferior to the most powerful competitors from Microsoft or Oracle. Most of the well-known Linux databases have their own versions for Windows. Currently, even the Russian developer 1C is actively developing and supporting versions of its products running under Linux. The most popular are the following databases:

                        MySQL -free relational database management system, is a solution for small and medium-sized applications.

                        PostgreSQL - a free object-relational database management system. Big data processing systems are built using this database, and it is often PostgreSQL that competes with Oracle DB.


                        Email Server

                        Like any other Linux server, it is very suitable for creating your own email server. Most freeware runs on Linux postal services Google, Mail.ru, Yandex and others. Unlike Windows platforms (in which most of the functional servers are paid) Linux has a large number of different packages for running your own corporate or personal email service, and they are provided free of charge. However, the popularity of Linux leads to the fact that most free solutions are modified, supplemented and sold for money. But this has its advantages - official support, constant updates, a convenient administration and control interface (not everyone likes to work in the console).

                        Internet server

                        It is a server that provides access to computers local network to the Internet. These servers are often referred to as (proxies) and they perform the following tasks:

                        • Data caching: if the same external resources are frequently accessed, then you can keep a copy of them on a proxy server and issue them on demand, thereby reducing the load on the channel to the external network and speeding up the received information.
                        • Protecting the local network from external access: for example, you can configure a proxy server so that local computers will access external resources only through it, and external computers will not be able to access local ones at all (they "see" only the proxy server).
                        • Restricting access from the local network to the outside: for example, you can deny access to certain websites, restrict the use of the Internet for some local users, set quotas for traffic or bandwidth, filter ads and viruses.

                        Such servers are also very often deployed on Linux. The most common functional one is the Squid package. It is completely free, and its functionality when used in conjunction with Linux networking services has a huge impact.


                        Telephone exchange (IP PBX - IP-PBX)

                        Communication and communication between employees is an integral part of almost any organization and of course communication is impossible without telephone connection... However, with the growth of technological solutions, the functionality and requirements for telephone communications have grown significantly. But not everyone can afford expensive, functional systems. It was the desire to get such a system that prompted the creators of the world's most popular telephone solution (Asterisk) to develop free analogue such a system in Linux.

                        Asterisk in conjunction with necessary equipment has all the capabilities of a classic PBX, supports many VoIP protocols and provides rich call control functions, among them:
                        Voice mail
                        Conference call
                        IVR (interactive voice menu)
                        Call processing center (queuing and distributing calls to subscribers using various algorithms)
                        Call Detail Record and many other functions.

                        Thanks to the free license, Asterisk is actively developed and supported by thousands of people from all over the planet. Almost all "boxed" IP-PBXs work on Linux and Asterisk. This PBX works great on any low-budget systems, for example BananaPi 🙂



                        Asterisk on Banana Pi

                        Of course this is a very small part of how Linux can be a server, as the possibilities are endless. Linux can be as simple file server and a node of a powerful computing cluster in some scientific center. A Linux server is mostly a constructor for specialists and geeks, but its possibilities are almost endless.

                        Linux is a server

                        You do not know how to create local server on LINUX? Then this article is for you. In it I will tell you how to create and configure a local server on LINUX.

                        Recently, the popularity of free software, and including the operating systems of the LINUX family is growing rapidly. Linux today is not at all what it used to be. In order to start working with it, just basic knowledge of the computer is enough. Out of the box, most of the programs necessary for an inexperienced user are already available. However, if you are a web developer, or are just building a website for yourself, you will most likely need a local server. And looking through some forums, I noticed that users who switched from windows systems on linux, they face some problems when creating a server on their computer.

                        We need our server to support not only static sites, but also most modern CMS, such as WordPress, Joomla, Drupal, etc. For this we will need the following components:

                        • apache (web server);
                        • php (the language in which many CMS are written);
                        • mysql (database server).

                        The Apache + PHP + MySQL combination is quite popular. IN windows environment it is usually called WAMP (I wrote about this in). In linux, as you already guessed incorrectly, there is a similar name - LAMP (Linux + Apache + PHP + MySQL).

                        So, first of all we will install the software package LAMP, for which we enter the following commands in the terminal

                        sudo apt-get update
                        sudo apt-get install tasksel
                        sudo tasksel install lamp-server

                        With the first command we update the information from the repositories, then we install the tasksel command, which is necessary to install the packages, and the last command installs exactly lAMP package.



                        As a result of the installation, we will get everything necessary components for the server, configured to communicate correctly with each other.

                        Apache web server setup

                        Apache has a lot of settings, which, like most settings of various programs on linux, are stored in text files... But to begin with, we will only get by with the study of some of them. This is enough for us to work comfortably.

                        The apache web server configuration data is located in the / etc / apache2 / folder.

                        The mods-available and sites-available folders contain all available modules and sites. And in the mods-enabled and sites-enabled folders, only those that are currently enabled. Apache2.conf is the main apache configuration file. Ports.conf - list of listening ports.

                        The server is controlled through the terminal:

                        sudo /etc/init.d/apache2 start - start the local server

                        sudo /etc/init.d/apache2 stop - stop the server

                        sudo /etc/init.d/apache2 restart - restart apache.

                        Teams

                        sudo a2enmod rewrite
                        sudo a2enmod userdir

                        enable the rewrite and userdir modules to create custom paths for the sites.

                        After any action to enable / disable modules or sites, apache must be restarted to apply the changes.

                        Now let's start creating platforms for local sites. I will create two local sites for example. Most of them are created in the same way.

                        First, we create two files with the names of future sites in the / etc / apache2 / sites-available / directory

                        1
                        sudo gedit / etc / apache2 / sites-available / test1

                        and write the following lines in it


                        ServerAlias \u200b\u200btest1 www.test1
                        DocumentRoot / home / user / sites / test1

                        AllowOverride All

                        2
                        sudo gedit / etc / apache2 / sites-available / test2

                        and correspondingly


                        ServerAlias \u200b\u200btest2 www.test2
                        DocumentRoot / home / user / sites / test2

                        AllowOverride All

                        / home / your user / sites / test1

                        / home / your user / sites / test2.

                        Create one index.html file in them. For the first folder - with the text "Page of the first site", for the second - "Page of the second site".

                        So that in the browser, when typing in the address line of the names of our sites test1 and test2, the transition is carried out to the local server, edit the hosts file

                        sudo gedit / etc / hosts.

                        In the first line we add the names of the sites to be created.

                        You should get the following

                        127.0.0.1 localhost test1 test2
                        127.0.1.1 comp

                        # The following lines are desirable for IPv6 capable hosts
                        :: 1 ip6-localhost ip6-loopback
                        fe00 :: 0 ip6-localnet
                        ff00 :: 0 ip6-mcastprefix
                        ff02 :: 1 ip6-allnodes
                        ff02 :: 2 ip6-allrouters

                        comp is the name of your computer, so it will be different.

                        In the terminal, enter commands to enable sites

                        sudo a2ensite test1
                        sudo a2ensite test2

                        do not forget to restart apache.

                        Everything is ready! You can check by typing in the browser the names of the newly created sites.

                        If something didn't work out for you or something went wrong - ask questions, I will try to answer.

                        Next time I will tell you how to work with databases on local server in LINUX.