Installing the Debian operating system. Installing the Debian operating system Installing and configuring linux debian 6 x64

Make a copy of all important files on your computer. Installing Debian will completely clean up the hard drive and format it, erasing all data stored in the previous OS. Therefore, you should save all important information to an external hard drive. Once Debian is installed, all this information can be easily restored.

Take out the USB stick and make a copy of its contents. This flash drive will act as the Debian installer. All contents of the flash drive will be erased, so back up any important files.

  • The storage space must be at least 2 GB.
  • Install the program to create a bootable USB flash drive (Live USB). There are many programs that allow you to create bootable flash drives. UNetBootin is available for Windows, Mac OS X and Linux users. Later in the article we will use this program.

    • If you decide to use a different program, these instructions will also work with most programs that allow you to create bootable flash drives.
  • Download the disk image. Go to the Debian website and open the "Where to get Debian" tab. Here you can download both a small and a full installation image. Choose the one that suits you best.

    • Download a small installation image if your computer is connected to the Internet.
    • Download the full image if your computer is not connected to the Internet. This image contains more packages, making it easier to install on devices without an internet connection.
      • Since the file can take a long time to download, use the download option via a torrent client. If you have BitTorrent installed on your computer, downloading the file will be much faster.
  • Run the program to create a bootable USB flash drive. Open the Windows Start menu and type "UNetBootin" into the search bar. Launch Spotlight on Mac OS X and enter the same keyword. You will most likely be prompted to run the program with administrator rights. Enter the password and press Enter.

    Open the image file. Click on the Disk Image radio button. Make sure ISO Standard is checked in the drop-down menu, then click the button on the right to open File Explorer. In this window, find the ISO file and open it.

    Write the installer to a flash drive. Make sure USB Device is selected in the Type drop-down menu at the bottom of the window and that the correct drive is selected in the Media menu. This is very important because the wrong choice can result in formatting another flash drive, or worse, formatting your hard drive. Click on the "OK" button to start creating a bootable USB flash drive.

    • This process may take some time. Save and close any open windows as the installation requires a restart of the computer.
  • Restart your computer and enter the boot menu. Save your current work and restart your computer. When the manufacturer's splash screen appears on the monitor, a key will be indicated in the lower corner/on the bottom line of the screen, with which you can enter the boot menu. Press this key on your keyboard.

    • If this option was not there, most likely it is hidden in the BIOS. Enter the BIOS and go to the Boot Menu tab.
    • If your computer does not have a key to enter the boot menu or BIOS when you boot up, look up your computer model on the Internet and find out which key to press. As a rule, these are the F2, F11, F12 or Del keys.
    • In the boot menu, the flash drive will be indicated by the manufacturer's name (Lexar, SanDisk, and so on) or "Debian + OS name and version number." Select this option to download the setup file.
  • Follow the instructions in the installation wizard. Connect your computer to your modem via an Ethernet cable so you don't lose your Internet connection during installation. Enter the required information at each step. If you want to install Debian side by side with another operating system, such as Windows, you will be given the option to partition your hard drive at the end of the installation.

    In our cycle we have considered the installation of Ubuntu Server, today we would like to pay attention to the elder relative of Ubuntu - Debian. These systems really have a lot in common, right down to the package base. Also, all our solutions based on Ubuntu Server will work without problems on Debian. The installation and configuration of both systems is also almost the same and at first we wanted to get by with one article, just paying attention to some differences, but then we decided that two separate articles would help better present material for beginners and avoid possible confusion.

    Why still Debian? The main reason is stability. Ubuntu Server LTS represents, in our opinion, the optimal balance between the relevance of software versions and stability. Debian is more conservative in this regard, using only tested, stable versions of packages. At the same time, to our regret, the latest releases of Ubuntu Server contain various kinds of bugs, which often appear only under certain conditions. In this situation, switching to Debian will be the most justified, this will allow you to use all the existing experience with the system, at the same time having a more stable platform at your disposal.

    This material has much in common with our previous article and part of the text will be repeated. This is done deliberately to ensure the integrity of the presentation of the material, and not to force the reader to study two articles instead of one.

    First of all, we will get the distribution kit of the system. It can be downloaded both via HTTP: https://www.debian.org/CD/http-ftp/#stable , and via BitTorrent: https://www.debian.org/CD/torrent-cd . For a server installation, we only need the first CD, we also recommend using only the architecture for server purposes. amd64.

    After booting from the installation disk, we will see a splash screen that offers us various installation methods. We select the first item, which will start the text mode of the installation.

    Then you will be prompted to select a language. Not only the language of the installer and the system depends on your choice, but also the set of generated locales, which affects not only how the symbols of national alphabets will be displayed, but also the operation of some programs and services that are critical to regional settings, for example, the Server 1C.

    The installer language will switch to the selected language and you will be prompted to select a country, the list is specially selected to match the specified language.

    Then choose your keyboard layout:

    And the key combination to switch it:

    We do not recommend choosing keyboard shortcuts other than the generally accepted Alt+Shift, do not make those who will work with the server other than you guess which combination you chose during installation.

    In the next step, the system will try to get the network settings, since most networks have a DHCP server, then at this stage the system will configure the network and get access to the Internet.

    If for some reason it is not possible to automatically obtain network settings, you can specify them manually or skip this step. Unlike Ubuntu, it is highly desirable to have internet access at this stage, otherwise you will end up with a minimal system configuration that will require a lot of manual tweaking. Therefore, if there is no DHCP server on your network, manually configure the network interfaces.

    After that, you will need to provide a computer name and provide a superuser password root.

    Unlike Ubuntu, Debian uses a different model of administrative rights, the superuser has the ability to configure the system, and you will be prompted to create another account to work. Also, by default, it is not possible to elevate user rights using the command sudo. Keep in mind that Linux is a case-sensitive system, and it's good practice to use only lowercase letters in usernames.

    Then specify the time zone. Please note that Debian does not indicate the offset relative to GMT, but relative to Moscow (for Russia). This setting should be approached responsibly, as an incorrectly set time zone can lead to incorrect operation of some services or lead to the appearance of inaccurate information in applications, for example, in the calendar or task scheduler, especially if the data is used by users located in other time zones.

    In Russian realities, it may happen that the distribution kit was released earlier than the time zones were changed, and the current zone is not in the list, which we see in the figure above. In this case, you should choose the belt that was before the clock change and after installing and updating the system, use the recommendations from our article:

    After setting the time, we move on to the most important stage - setting up the disk. The system offers several options, including automatic layout. In most cases, we choose this item. If we talk about a single disk, then we see no reason to partition it, with the exception of desktop systems, where it is worth making a separate partition /home.

    In loaded systems, it makes sense to take out partitions with data, for example, /var/www or /opt/zimbra, on separate disk arrays. If you want to install the system on software RAID, then refer to the article:.

    Debian's auto-partitioning will offer you several options: use the entire disk, put it on a separate partition /home or split the disk into several partitions. We will focus on the first option:

    After partitioning the disk, the base system will be installed.

    At the end of this process, the system will prompt you to insert another disc. We answer with a refusal.

    And we agree with the proposal to use a network mirror of the package archive.

    Then we choose the country and the most suitable mirror, for example, we choose mirrors from Yandex.

    After updating the list of software, you will be prompted to select one of the ready-made sets. You can select the required roles and get the system ready for customization. Is it bad, especially for a novice administrator? Badly! And here's why: with this approach, the system remains a "black box" for the administrator, there is no idea about the purpose of individual packages, their role and impact on the system as a whole. Therefore, we recommend that you refuse the suggested options and install the required packages manually. This will help you better understand the system and the interactions between its components. And when you begin to feel like a fish in water in a Linux environment, you yourself decide whether you need to install software automatically.

    By default, it is proposed to install a graphical shell and a print server, we remove all options (using Space), leaving only Standard system utilities.

    After that, the installation process will follow, which is quite fast, even on slower systems.

    Then the offer to install the bootloader will follow, if you are not going to make a system with a "tricky" boot, then you should agree.

    After installing the bootloader and performing some more operations, the installer will complete its work and prompt you to reboot. On this, the installation itself is completed and you should proceed to the initial configuration of the system.

    So, the first login, we would not write about it if it were not for the reader's response, which showed that at this point many had difficulties. So, in Linux systems, the password entry process is not visually displayed in any way, you just need to type the desired combination of characters and press Enter, although outwardly the system behaves as if nothing is happening. This behavior is inherited from UNIX systems and is for security purposes so that an attacker cannot learn the length of your password.

    First of all, the network must be properly configured. Despite the fact that the network was configured at the installation stage and it is possible to install additional packages, we will not install anything yet and will learn how to edit configuration files using built-in tools.

    Since the user in Debian cannot elevate his rights, we will switch to the root superuser, for this we will execute the command:

    and enter the superuser password.

    Now open the network configuration file with the built-in editor nano:

    Nano /etc/network/interfaces

    and bring it to the following form:

    auto lo
    iface lo inet loopback
    auto eth0
    iface eth0 inet static
    address 192.168.44.61
    netmask 255.255.255.0
    gateway 192.168.44.2
    dns-nameservers 192.168.44.2 8.8.8.8

    First section auto lo specifies settings for the loopback interface and is already present in the file. The second section specifies the settings for the external network interface eth0 to work with a static address. The options are clear and do not require separate explanations, addresses, of course, are taken solely as an example. If your server has several network adapters, then you should register a section for each of them.

    Let's say we want to get the settings of the second network adapter eth1 via DHCP, for this we add a section:

    Auto eth1
    allow-hotplug eth1
    iface eth1 inet dhcp

    Let's dwell a little on the auto and auto-hotplug options. The first specifies to initiate a connection on boot, and the second triggers the hot reconnect tracking mechanism and initiates address acquisition when this event occurs.

    When you have finished editing the file, you should exit the editor by Ctrl + X, affirmatively (Y) when prompted to write the file.

    Then restart your computer:

    If everything is done correctly, the system will gain access to the network and the Internet. You can check this with the command ping:

    Ping ya.ru

    The execution of the command should be interrupted with the combination Ctrl + C, remember this combination, it will come in handy more than once.

    You can view the network interface settings with the command

    ifconfig

    don't forget to log in as superuser first.

    With the same command, you can find out which network cards the system sees and under what names, for this, use the parameter HWaddr, which represents the MAC address of the NIC.

    Before proceeding with further configuration, the system should be updated, but before that it is necessary to correct the list of package sources:

    Nano /etc/apt/sources.list

    In this file, we will comment out the lines related to CDs, otherwise the system will ask you to insert a disk every time you update or install packages.

    Save the changes, after which you can update the list of packages with the command:

    apt-get update

    And then update the system with the command:

    apt-get upgrade

    Now it's time to deal with administrative rights. In our opinion, the system adopted in Ubuntu, when the account root disabled, and the administrator can increase the authority of his own account, the most convenient and secure. Therefore, we install the utility sudo:

    apt-get install sudo

    Then add your user to the group sudo:

    Usermod -a -G sudo andrey

    where replace andrey with your username. Then reboot the system.

    Now let's try to elevate the rights to superuser:

    If everything went well, then the account root can be disabled:

    Passwd -l root

    The next step is to install utilities to facilitate administration: package ssh for remote access to the server and file manager mc, which greatly simplifies the work with the system.

    apt-get install ssh mc

    For start mc use a simple command:

    if you want to run it as root.

    Working with it is quite simple, those who worked in DOS with the Norton Commander or Volkov Commander managers should not experience any difficulties at all.

    Navigation is carried out with arrows, the transition between panels is carried out with the key Tab, and key selection Insert. The main actions are listed below, the numbers next to them indicate the number of the function key responsible for this action, for example, F4 - Edit, F8 - Delete, F10 - Exit. You can always collapse and then expand, mc keyboard shortcut Ctrl+O and access the console.

    In the window that opens, use the arrows to navigate to the option Built-in editor and select it with the key Space. Press to confirm settings and exit. Further.

    This will allow you to immediately use for editing configuration files more convenient than nano built-in editor.

    In conclusion, let's check the possibility of a remote connection, for this we will use the popular utility PuTTY(download). In the latest version, you just need to specify the IP address or domain name of the server:

    However, just in case, check in Window - Translation connection encoding, it must be specified there UTF-8.

    At this point, the installation and preliminary configuration of the server can be considered complete and put away in a server cabinet, after which you can start setting up the necessary server roles according to one of our instructions, or continue experiments in order to further study the system.

    Debian is one of the oldest and most stable Linux distributions. It is developed by a huge community of developers and contains only the most stable and proven packages. Debian development began in 1993. Its founder is Jan Murdoch. Now the operating system supports more than ten architectures and contains more than thirty-seven thousand packages. Debian is used for both servers and home computers. The current version of Debian is 8.5 Jessie. The transition to the 8.0 branch took place on April 25, 2015. The last corrective release of 8.5 took place quite recently - on July 4, 2016.

    This article will cover the installation of Debian 8.5 Jessie on a PC or laptop. We will take a very detailed, step-by-step look at how to install the latest version of this wonderful operating system on your computer.

    Installing Debian 8.5

    Let's start with the preparation and smoothly move on to the process of installing the system itself.

    Step 1: Download the image

    You can download the Debian 8.5 installation image from the official website.

    There are two image options here. small installation image - a small image, most packages will be downloaded from the internet during installation and a complete installation image - a DVD image containing all the necessary software. You can download the image directly or use torrents.

    On the download page, simply select the desired file, for a complete installation set, DVD1 contains the main installation package, and DVD2 and DVD3 contain additional software.

    Step 2. Write the image to media

    You can write debian 8.5 to a flash drive using any program. For example, unetbootin or the console utility dd:

    On Windows, it's convenient to use rufus for the same task:

    Installing Debian 8 from a flash drive is the same as installing from a disk. To burn debian to disk, you can use utilities such as k3b and Brasero on Linux and UltraISO on Windows.

    Step 3Setting up the BIOS

    After the image capture is complete, restart your computer and enter the BIOS setup by pressing F8, Del, F2, or Shift+F2 before the operating system starts loading.

    In the menu that opens, go to the Boot tab and in the item Boot Device Priority or 1st boot device choose your carrier:

    Step 4. Starting the installation

    After exiting the BIOS menu, the installation disk will boot. Select the second item to launch the graphical installer graphic install:

    Step 5. Selecting a language

    Select installer language:

    Step 6 Location

    Choose your location:

    Step 7 Keyboard Layout

    Select keyboard layout:

    Step 8. Initialization

    Wait for the installation media to initialize:

    Step 9Computer name

    Enter computer name:

    Step 10. Domain Name

    Used to connect computers to a network. If installing at home, you can write local:

    Step 11Superuser Password

    Enter the superuser password:

    Step 12. Username

    Enter your full name, will be displayed in the system settings:

    Step 13 Login

    Enter the username that will be used to log in to the system:

    Step 14User Password

    Enter the password for your user:

    Step 15 Disk Partitioning Method

    In this tutorial, we will be looking at manual markup, so select manually. But if you have a blank hard drive, you can choose the automatic option:

    Step 16. Selecting a Drive

    Select the hard drive where you want to install debian 8 Jessie:

    Step 17Partition Table

    If the disk is clean, we agree with the creation of a new partition table:

    Step 18Create LVM

    In this tutorial, we will look at how to install debian 8 on LVM. But if you don't want to use LVM, you can create normal partitions, then do everything the same as for LVM. Select configuring the LVM logical volume manager:

    Step 19Verifying LVM

    We agree with the creation of LVM:

    Step 20 Create a Volume Group

    In this step of the wizard, select create volume group:

    Then enter the name of the group:

    And select the physical disks on which it will be located:

    Step 21 Bootloader Section

    Create a new logical volume:

    First select the LVM group in which this volume will be located:

    Enter the size of the volume, 200 MB is enough for the boot partition:

    Choose a title, the title is used to make it easier for you to understand what this section is:

    Step 22 Root Section

    Select the LVM group and enter the size of the partition, it is recommended to take 30-50 GB for the root:

    Enter a title for the section.

    Step 23 Home Section

    Repeat the same steps for the home section. Size - all remaining space:

    When done select finish:

    Step 24Partition the Disk

    It should turn out like this:

    Step 25 Assign boot

    Select the boot partition, then click Use as:

    Select file system, for boot - ext2:

    Click mount point:

    Select /boot:

    Click partition setup is complete.

    Step 26 Assign root

    Do the same for the root partition:

    File system - ext4, mount point /.

    Step 27 Assign home

    Same steps for home, mount point /home, ext4 file system.

    Step 28 Finishing the Markup

    It should turn out like this:

    Select Finish partitioning and commit changes to disk.

    Step 29 Markup Confirmation

    If everything is correct, click Yes:

    Step 30 Starting the installation

    Wait for the main components to install

    Step 31 Connecting additional media

    Mount and scan for additional media, if loaded:

    Step 32 Internet Mirrors

    If necessary, you can connect a network mirror

    Step 33 Submit reports

    Choose whether to send activity reports to the distribution developers:

    Step 34 Software

    Select the software to be installed:

    Step 35 Installing the Software

    Step 36Installing the Bootloader

    Wait for initialization to complete:

    Click Yes to install the bootloader on disk:

    Select device:

    Step 37: Finishing the installation

    Wait for the installation to complete:

    Step 38 Installation Complete

    Click done to restart your computer:

    Step 39 Loading

    Select the first item to boot the system normally:

    Step 40 Login

    Enter the username and password you provided when you installed debian 8.5 Jessie:

    Step 41 Done

    That's all, now the installation of Debian 8 is complete and you can fully use your system.

    findings

    That's all, now you know how to install debian 8 on your computer. As you can see, Debian has the most customizable installer among all Linux distributions. You can choose any aspect of the system installation and that's not all. Here I used a debian installation in graphical mode, but you can use console mode and get even more control over the installation process. If you have any questions, ask in the comments!

    Debian 8.5 installation video:

    Recently, a new version of Debian 8 Jessie has been released. This is a fairly popular distribution at the moment, I myself often use it for various purposes. I have an opportunity . We'll do a clean install.

    We will install the 64-bit version of Debian 8 Jessie from a minimal image called debian-8.0.0-amd64-netinst. You can get it from the debian.org site. For a successful installation, the server will need Internet access during the installation process. We insert the disk into the system and boot from it. We are greeted by a boot menu with various options:

    • Install
    • Graphical install
    • advanced options
    • Install with speech synthesis

    The first option is installation using a text installer, the second is a graphical one. We will install using the graphical installer. But if for some reason the graphical installer does not start for you, it happens, then try installing in text mode.

    Specify the location:

    Choose a keyboard layout. Personally, I prefer when I have the default English layout. It's more comfortable for me. If you prefer to work with Russian, choose Russian:

    Next comes connecting the disk and downloading the components for installation, then automatically configuring the network via dhcp, if possible. I have a dhcp server on the network, so at this stage I do not need to specify network settings. You have to wait some time. Then specify the server name:

    As a domain in the local network, you can specify anything at your discretion. If the debian server will serve services located on the Internet, specify the real Internet domain. This is a test server for me, so I specify the local domain:

    At the next stage of the installation, specify the root superuser password:

    Add a regular user to the installed system and specify a password for it:

    Specify your time zone:

    Next, the disk initialization process begins. We wait a few seconds and see the disk partitioning menu. I choose the first option. If you do not understand what is at stake, then also choose the first one. If you know what LVM is and you really need it, choose the second option. If someone wants to partition a disk manually, then he no longer needs advice, he himself must understand what and why he is doing.

    Specify the disk on which we will install Debian. If you have only one, then there is nothing to choose from, and we indicate it:

    Now you need to specify the partitioning of the disk. In general, the first option with one section will do. I myself have not bothered lately and use one partition for the system. Depending on the number of disks and the functionality that the server will serve, the breakdown may be different. If you do not understand how and why you need to partition a disk, then do not bother. When you need it, then you will think about how to partition disks. For example, if you need to encrypt a section, or use a drbd mirror, then you will need to use a separate section for these purposes.

    Check the settings and click "Finish markup and write changes to disk":

    Confirm the markup and select "Yes". After that, all data on the disk will be destroyed and it will be re-partitioned under our new system:

    After completing the basic installation, you need to select the nearest mirror from which packages will be downloaded by default:

    Then comes the proxy setup. If you do not have it, then just skip the paragraph, as I did.

    It starts configuring and updating the apt package manager, and then installing the basic set of software. At the end, you will be asked to send anonymous statistics about the use of Debian 8. I usually refuse such offers:

    Base system installation box, you can specify additional packages to install. I need an ssh server for remote administration. I specify it and the standard system utilities:

    After clicking Continue, the system will reboot.

    In the reboot field, you can log into the system as root and check if everything is in order. Let's do it. Log in locally as root and check the version:

    # uname -a Linux debian-8 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~ deb8u1(2015-04-24) x86_64 GNU/Linux

    I’ll add, just in case, that by default you won’t be able to log in remotely via ssh as a root. You need to use a different account that you specified during installation. And already from under it, using the su commands, log in as root.

    This completes the installation, you can proceed to.

    Linux online course

    If you have a desire to learn how to build and maintain highly available and reliable systems, I recommend getting acquainted with online course "Linux Administrator" in OTUS. The course is not for beginners, for admission you need basic knowledge of networks and installing Linux on a virtual machine. The training lasts 5 months, after which successful graduates of the course will be able to be interviewed by partners. What this course will give you:
    • Knowledge of Linux architecture.
    • Mastering modern methods and tools for data analysis and processing.
    • Ability to select a configuration for the necessary tasks, manage processes and ensure system security.
    • Proficiency in the basic working tools of a system administrator.
    • Understanding the deployment, configuration, and maintenance of Linux-based networks.
    • The ability to quickly resolve emerging problems and ensure stable and uninterrupted operation of the system.
    Test yourself on the entrance test and see the program for more details.