[Linux Deploy] 1. Linux Deploy installation and configuration tutorial

The typography is slightly distorted when viewing the typography on the phone written on the computer (capital embarrassment)

I. Introduction

        The verification of this technology is carried out on the Android system, so everyone must first have an Android phone or Android tablet. The principle of this technology is to set aside a chroot container on the Android machine to run the Linux system, so why not other systems, because the installed system kernel is also Linux. I have tried debian, Ubuntu, and CentOS successively with Xiaomi Mi 4 (Android 6.0), all of which are successful. This article will take CentOS as an example to verify.

2. Preparations

        1. An Android device (mobile phone over tablet)

           Device hardware requirements: It is recommended that the RAM be 1G and above, and the free ROM capacity of the mobile phone is about 4G.

           Device software requirements: Android version 4.0 or above is recommended, and the system must have ROOT system permissions

        2. Busy Box Android software

           Software introduction: BusyBox is a software that integrates more than 300 most commonly used Linux commands and tools. BusyBox contains some simple

                              Single tools such as ls, cat, echo, etc., also include some larger and more complex tools such as grep, find,

                               mount and telnet. Some people call BusyBox the Swiss Army Knife of Linux tools. Simply put BusyBox

                               It is like a big toolbox, it integrates and compresses many tools and commands of Linux, and also includes the Android system.

                               Built-in shell. (From: Baidu Encyclopedia)

                               In this experiment, Busy Box is the main dependent software of Linux Deploy

           Software address: https://github.com/meefik/busybox/releases (this article uses the latest version)

        3.Linux Deploy Android software

           Software introduction: Android platform virtual machine (chroot running linux container)

           Software address: https://github.com/meefik/linuxdeploy/releases (this article uses the latest version)

3. Installation work

        Note: If the Android device does not have the ROOT system permission, you must first ROOT the device (by Baidu)

        1. Install Busy Box

           Install the downloaded Busy Box software on the Android device, then open the device, click the three dots in the upper right corner and click Setting to set

          

           Here you can set the skin color, font size, the number of scrolling lines on the screen, etc.

           Note: Do not change the installation path, it will be used later! (It’s okay to change it, but remember, it will be embarrassing if you can’t find it later)

          

           The rest of the settings are just like this. The log file can be opened or closed. It is recommended to close it, and the debug mode is also closed.

           After the setting is complete, return to the main interface, then click the install button, wait for the installation to complete , output ## END in the interface , and then click the upper right corner

           Three dots and then click the information button to see the output system information:

          

       2. Install Linux Deploy

          After the installation is complete, open Linux Deploy and you can see the main interface as follows:

                   

          Then we click the three horizontal bars in the upper left corner and click Settings:

         

          Here are some display-related settings. In the first three, you must tick the lock wifi, keep the CPU awake, and the screen is always on.

          Shut down to avoid power consumption

         

         The following are based on your own needs and settings. It is recommended to open the startup to prevent some problems in the phone. After restarting, it is easy not to open such services.

          disconnected

         

         The most important thing here is the PATH variable, that is, don't change it as mentioned above, just fill it in (if you change it, fill in the changed path)

         The setting part is here first. The following is the most important part, which is to set up the system installation:

         <1> Click on the three horizontal bars in the upper left corner of the main interface, then click on the configuration file, and then the name of the new file, which can be freely defined.

               The text is named after installing the CentOS system.

        

        <2> Click the settings icon in the lower right corner of the phone to set system-related information

       

        The container here chooses chroot (proroot is very unstable). The distribution version chooses CentOS. You can choose other distributions to install.

        The architecture must be selected right here, otherwise the installation will go wrong, or it will not work normally after the installation is complete, you must know your mobile phone cpu here

        The architecture of my Xiaomi Mi 4 is the Xiaolong 801 processor. In theory, x86 can be used, but I always make mistakes when installing it, so I choose to integrate downwards.

        Compatible armhfp, this architecture is supported by most mobile phones; the source address is default or can be switched to domestic source, the speed of domestic source installation

        It is relatively fast. Ali's source address is http://mirrors.aliyun.com/centos/, and there are many domestic ones such as NetEase and others.

        degree; the installation type selects mirror installation, the installation address can be defaulted, here is changed, /linux refers to the linux in the root directory of the mobile phone sdcard

        the address under the folder;

       

        Set the image size to 2000mb or higher. It is recommended to choose ext4 for the file system. You can fill in other custom information by yourself, user name and password.

        It is needed to enter the system later; DNS is automatic, or it can be changed to 114.114.114.114 or 8.8.8.8 or 1.1.1.1, etc.;

       

       The settings here are also very important. Be sure to enable SSH, otherwise you will not be able to log in to the system later, and the mount point is also checked and set. The settings in this article will be

       The entire sdcard is mounted to /mnt/sdcard of the Linux system, as shown below:

      

      The following are some desktop settings. This article does not install the desktop, so some items are not checked. If you need the desktop version, you can check it yourself.

      

      <3> Start installing the system

       After the setting is completed, return to the main interface and click the installation option in the three dots in the upper right corner to start the installation operation of the system, and then wait for the installation. The following is the system

       Screenshot of the system installation:

      

      

      

      

      

       The installation is complete when you see the following output <<<deploy

      

      <4> Start the linux system

       Click the stop button once before starting the system:

      

       When you see the above stop message, click the OK system button:

       

       If you see the above startup information, it means that the system has been successfully started.

Fourth, the installation configuration verification

        After the above installation and startup work is completed, let's verify whether the installation is successful, open the system terminal with a computer, and start the connection test:

       

       We use the root user to log in normally, which is the same as the normal Linux system, but because it is running under chroot, some commands are

       Not supported, please refer to Baidu chroot for details

       Note: This article uses a Linux system. You can use the SSH command to test the connection directly in the terminal. If you have a window, you can use it.

                    Software connection test such as xshell or putty, if there is no computer, you can use the mobile phone to install the programmer tool software or

                    ConnectBox connection verification

V. Summary

        After the previous experiments, the Linux-CentOS distribution has been successfully installed on the Android device, and it is used in a normal connection.

        We are experimenting to set up services such as tomcat on the modified system , and use the peanut shell or peanut stick hardware mapping service to the public network as a personal cloud host

        machine use.

 
 
G
M
T
 
 
Detect languageAfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu
 
AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu
 
 
 
 
 
 
 
 
 
Text-to-speech function is limited to 200 characters
 
 
Options : History : Feedback : Donate Close

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324380447&siteId=291194637