Menu
Is free
registration
home  /  Multimedia/ How to install debian. Installing Debian Linux

How to place debian. Installing Debian Linux

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

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

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

    • If you choose to use a different program, these instructions can also be applied to 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 complete 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.
      • As downloading the file can take a long time, use the torrent download option. If BitTorrent is installed on your computer, the file download will be much faster.
  • Run the program to create a bootable USB drive. Open the Windows Start Menu and enter UNetBootin in search string... Launch Spotlight on Mac OS X and type the same keyword... Most likely, you will be prompted to run the program with administrator rights. Enter your 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 on the button on the right to open File Explorer. In this window find ISO file and open it.

    Write the installer to a flash drive. Make sure the Type drop-down menu at the bottom of the window reads " USB device”And that the correct drive is selected in the“ Media ”menu. This is very important, as the wrong choice can lead to formatting another flash drive or, even worse, to formatting hard disk. Click on the "OK" button to start creating a bootable USB flash drive.

    • This process may take some time. Save and close all open windows because the installation requires a reboot to start.
  • 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 bottom corner / bottom line of the screen, with which you can enter the boot menu. Press this key on your keyboard.

    • If this option was not present, it is most likely hidden in the BIOS. Enter BIOS and go to the " Boot Menu"(Boot menu).
    • If a key is not listed when you boot your computer with which you can enter the boot menu or BIOS, search for your computer model on the Internet and find out which key to press. Typically, these are the F2, F11, F12, or Del keys.
    • In the boot menu, the flash drive will be labeled with the manufacturer's name (Lexar, SanDisk, etc.) or "Debian + OS name and version number". Select this option to download the installation file.
  • Follow the directions in the installation wizard. Connect your computer to your modem using 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 alongside another operating system with Windows, for example, at the end of the installation you will be given the option to partition the hard drive.

    Recently released a new version Debian 8 Jessie. This is a fairly popular distribution at the present time, I myself often use it for various purposes. I have an opportunity . We're going to do a clean install.

    We will install a 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 a graphical installer. But if for some reason it does not start the graphical installer, it happens, then try to install it in text mode.

    We indicate the location:

    Choosing a keyboard layout. Personally, I prefer when my default english layout... It's more comfortable for me. If you like working with Russian more, choose Russian:

    Next is connecting the disk and loading components for installation, then automatic setting networks over dhcp, if possible. I have a dhcp server on the network, so at this stage network settings I don't need to specify. We have to wait for a while. Then we specify the server name:

    As a domain in local network you can specify anything you like. If debian server will serve services located on the Internet, indicate real internet domain. I have it test server, so I am specifying the local domain:

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

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

    Indicate your time zone:

    Then the process of initializing the disks 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 item. If someone wants to partition the disk manually, then he no longer needs advice, he must understand what and why he is doing.

    We indicate the drive 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 section 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 the disks. For example, if you need to encrypt a section, or use a drbd mirror, then you will need to use separate section.

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

    We confirm the markup and select the "Yes" item. 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 closest mirror from which the packages will be downloaded by default:

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

    Start configuring and updating the apt package manager and then installing the base set software... When finished, you will be prompted to submit anonymous statistics on Debian 8 usage. I usually refuse suggestions like this:

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

    After clicking "Continue", the system will reboot.

    The reboot box can be logged in root user 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 will add, just in case, that by default you will not be able to log in remotely via ssh. You need to use another 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 that you get acquainted with online course "Linux Administrator" in OTUS. The course is not for beginners, for admission you need basic knowledge of networks and Linux installation to the virtual machine. The training lasts 5 months, after which successful graduates of the course will be able to pass interviews with 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.
    • Possession of the basic working tools of the system administrator.
    • Understanding the specifics of deploying, configuring, and maintaining Linux-based networks.
    • The ability to quickly resolve emerging problems and ensure the stable and uninterrupted operation of the system.
    Check yourself on the entrance test and see the details of the program on.

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

    Why Debian anyway? 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 checked, stable versions of packages. At the same time, to our regret, the latest Ubuntu Server releases contain all sorts of bugs, which often appear only under certain conditions. In this situation, the most justified transition to Debian will be, this will allow you to use all the available experience with the system, while at the same time getting a more stable platform at your disposal.

    This material has many things 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, and not to force the reader to study two articles instead of one.

    First of all, we 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 server installation, we only need the first CD, we also recommend using exclusively the architecture for server purposes amd64.

    Booting from installation disk we will see a splash screen that offers us different ways installation. We select the first item, which starts 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, Servers 1C.

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

    Then you should select the keyboard layout:

    And the keyboard shortcut to switch it:

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

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

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

    After that, you will need to specify the computer name and the superuser password root.

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

    Then specify your time zone. Please note that Debian specifies the offset not relative to GMT, but relative to Moscow (for Russia). This setting should be approached responsibly, since an incorrectly set time zone can lead to incorrect work services or lead to the appearance of inaccurate information in applications, for example, in the calendar or task planner, especially if the data is used by users in different time zones.

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

    After setting the time, we move on to the most critical stage - setting up the disk. The system offers several options, including automatic marking. In most cases, we choose this particular item. If we talk about a single disk, then we see no reason to divide it into partitions, with the exception of desktop systems, where it is worth taking out on a separate section / home.

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

    Automatic partitioning in Debian will offer you several options: use the entire disk, put it on a separate partition / home or split the disk into multiple partitions. We'll 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 the 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 choose one of the ready-made sets. You can select the roles you need and get a 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 abandon the suggested options and manually install the required packages. This will help you gain a deeper understanding of the system and the interactions between its components. And when you start to feel like a fish in water in the Linux environment, you decide for yourself whether you need to install the software automatically.

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

    This will be followed by the installation process, which is pretty quick, even on not very fast systems.

    Then you will be prompted to install a bootloader, 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 offer to reboot. This completes the installation itself and you should proceed to the initial setup of the system.

    So, the first entry into the system, we would not write about this 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 find out the length of your password.

    First of all, you need to properly configure the network. 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 a user in Debian cannot elevate his rights, we switch to the root superuser, for this we run the command:

    and enter the superuser password.

    Now let's 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 sets the settings for the loopback interface and is already present in the file. The second section sets the settings for the external network interface eth0 to work with a static address. The options are clear and do not require separate explanations, the addresses, of course, are taken exclusively for 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 the connection at boot, and the second starts the mechanism for tracking hot reconnection and initiates an address acquisition when this event occurs.

    Having finished editing the file, you should exit the editor by Ctrl + X, in the affirmative (Y) by responding to the suggestion to write the file.

    Then restart your computer:

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

    Ping ya.ru

    The command execution should be interrupted by the combination Ctrl + C, remember this combination, it will be useful to you more than once.

    You can view the settings of network interfaces with the command

    Ifconfig

    do not forget to first login as superuser.

    The same command can be used to find out exactly which network cards sees the system and under what names, for this use the parameter HWaddr which represents the MAC address of the network card.

    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 CD-disks, otherwise the system will ask you to insert a disk every time you update or install packages.

    Let's 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 is the time to deal with administrative rights. In our opinion, the system adopted in Ubuntu when the account root disabled, and the administrator can elevate his own account, the most convenient and secure. Therefore, we will install the utility sudo:

    Apt-get install sudo

    Then add your user to the group sudo:

    Usermod -a -G sudo andrey

    where instead of andrey specify your username. Then reboot the system.

    Now let's try to elevate rights to superuser:

    If everything went well, then the account root you can disable:

    Passwd -l root

    The next step is to install the 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 superuser.

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

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

    In the window that opens, use the arrows to go to the option Built-in editor and select it using the key Space... Press to confirm the 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 remote connection, for this we will use the popular utility PuTTY(download). V latest version just specify the IP address, or Domain name server:

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

    At this point, the installation and preliminary configuration of the server can be considered complete and removed to the 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.

    After two years of development, the long-awaited stable release of the Debian 9 distribution took place. This distribution, which contains the most stable versions of packages, is very well tested and therefore is often used on servers where increased stability is required.

    The new version did not bring many changes, the main one is the transition to MariaDB, improved UEFI support, many packages updated and more. For more information on what's new in Debian 9, see a separate article, and today we will look at how to install Debian 9 Stretch on a computer or laptop.

    Preparing for installation

    Before we move on to installing the system, you need to prepare everything, download images, write them to disks or a USB flash drive, and also configure the BIOS.

    Step 1. Uploading the image

    You can download the image on the official website. Open the link labeled stable release, then select the architecture and format you want:


    Then all that remains is to download the images you want... The developers provide three disks, they have all the necessary packages, but only the first one will be enough for installation, all other packages in this case will be downloaded via the Internet.

    Step 2. Burning the image to the media

    You can use k3b to write to disk on Linux, and UltraISO on Windows. We will not dwell on this. Now it is more popular to write an image to a USB flash drive. If you downloaded only one image, then everything is simple here, you will only need to write it using the dd utility:

    dd if = ~ / debian.iso of = / dev / sdc1

    Here / dev / sdc1 is the device name of your flash drive. You can also use Unetbootin or any other utility. But if you downloaded all three images and want to use them during installation, then you need another flash drive, just unpack their contents into separate folders on that flash drive.

    Step 3. BIOS setup

    After everything is ready, all that remains is to configure the BIOS to boot from the media. To do this, restart your computer, and click Del, F8, F2 or Shift + F2 during the BIOS splash screen. Next, go to the tab "Boot" and select there in the section "Boot Device Priority " your device comes first.

    Installing debian 9 from a USB stick is almost the same as installing from a disk, only you need to select the correct device in the BIOS.

    Installing Debian 9

    Now let's take a closer look at how the Debian 9 installation works. It's important to say that the installer has changed slightly in terms of the interface, but the workflow remains the same.

    Step 4. Installation method

    Immediately after the reboot, the installation image will start, at the first step we have to choose the installation method:

    I will be looking at a graphical installation "Graphical".

    Step 5. System language

    In the next step, select the language you want to use Debian in:

    Step 6. Location

    Step 7. Keyboard layout

    Select the second keyboard layout and then the key to change layouts:


    Step 8. Computer name

    Wait for the package manager and network configuration operations to complete, and then specify the name of your computer:


    Step 9. Configuring the superuser

    Enter the password for the superuser twice:

    Step 10. Setting up a regular user

    Enter the full username that will be displayed on the panel and in the login menu:

    Enter username:

    The last step, creating a password:


    Step 11. Partitioning the disk

    If you have a blank disk, you can choose the partitioning automatically and the system will create such partitions as needed for the most correct work. But in this article we will look at manual disk partitioning. Therefore, in the question of the master about the markup, we choose "Manually":

    Step 12. Partition table

    Select the device you want to install Debian 9 on:

    If the disk is clean, the utility will offer to create a new partition table:

    Step 13. Bootloader section

    It's time to create the first partition, we will make a partition for the bootloader. It is recommended to create this section if you have several Linux distributions on your computer, and also if you use LVM, otherwise the section is not needed.

    Please select "Free place" and press "Proceed"... In the menu that opens, select "Create a new section"... Next, specify the file system "Ext2", label "Boot", reservation - 0%. The mount point is / boot. Most important parameter- mount point, everything else is not that important. You also need to set the item "Boot label" into position "On".






    When done, tap "Partition setup finished".

    Step 14. Root section

    Created similarly to the previous section, only you need to use more than 10 GB of disk space and mount point "/" .





    You can use any file system suitable for the root, for example, ext4, btrfs, xfs, but not ntfs or fat.

    Step 15. Swap partition

    Everything is the same, only the file system is "Swap space", and the size must be equal to the number random access memory in case you want to use hibernation mode.





    Step 16. Home section

    Under the home section, you can select all the space that is left from the previous sections. Your files, videos, music will be stored here. The mount point is / home /. File system your choice, but not NFTS or FAT.





    Step 17. Completing the markup

    Once everything is ready, select "Disk setup complete":

    In the next window, click "Yes", to confirm that the changes have been recorded.

    Step 18. System installation

    Wait until the installation of the basic distribution kit is complete, this may take up to ten minutes:


    Step 19. Additional software

    As for several discs that we recorded, at this stage they can be scanned and then inserted, if necessary:

    It can take a long time to install and download packages from the Internet.

    Step 20. Installing the bootloader

    Confirm that you need to install the bootloader:

    Then select a section for it:

    Step 21 Completion

    After a few more seconds, the program will inform you that the Debian installation is complete and you can restart your computer:

    Step 22. Starting the system

    From the Grub menu, select the first item:

    Step 23. Login

    Select the user you created during installation and enter his password:

    Step 24. Finish

    Here is the desktop. Now the system is completely ready for use and you can proceed to personalize and configure it.


    conclusions

    Now you know how to install Debian 9 on your computer via graphical interface... It's simple enough. Installing a system on a server using pseudo-graphics will be a little more difficult, but it uses the same steps, perhaps we will consider it in one of the next articles. Hope this information was helpful to you.