[Linux Deploy] Second, install JDK and MYSQL on Linux Deploy

1. Install JDK

        I just said in the abstract that my mobile phone’s cpu architecture is arm, so we need the ARM version to download the JDK. After flipping through the official website of Oracle Jdk, I was pleasantly surprised to find that there is an arm version, the address: http://www.oracle .com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html , and then upload it to the Linux container of the mobile phone, unzip it, install it and configure the environment variables. You can refer to the previous blog post: " Java Development Environment for Linux Development Environment Construction JDK installation configuration "

         Verify after successful installation:

2. Install MySql

        Since mysql does not have an arm version, it cannot be found on the official website, or if you need to manually transplant and compile the arm version yourself, we can directly use install to install it in its source (here takes mariadb as an example, MYSQL is the same)

After entering the above installation steps, mysql is successfully installed, and then start the settings:

First start the mysql service with service mysql start

Then execute usermod -aG aid_inet mysql in the terminal

Then start to set the initial password, etc., execute mysql_secure_installation

To remove anonymous users, select Y

Do not allow ROOT remote connections, select N

to the end

Note: Due to the limitations of Android, this step of usermod -aG aid_inet mysql is particularly important

At this point the installation is complete, but we use the remote tool navicat to connect to the prompt:

2003 - Can't connect to MySQL server on '192.168.100.100' (10038)

This is because MYSQL is bound to the local 127.0.0.1 address by default and cannot be accessed from the external network, so we change the configuration file:

vi /etc/mysql/mariadb.conf.d/50-server.cnf

At this point, we use navicat to connect normally:

3. Problem record

        1. Start MYSQL always prompt:

           ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

           Solution:
           mysql -p #login to mysql

           Enter password:

           mysql> set password for 'root'@'localhost' =password('');

           mysql> flush privileges;

           mysql> exit;

4. Summary

         Installing jdk and mysql in the deploy Linux system is not the same as the usual installation in the Linux system, because the platform architecture is different, there are many pits, such as Android's network policy restrictions, you must usermod -aG aid_inet mysql, etc., don't step on the pits You will never get out of the pit. That's all for today's practice, and I will continue to work on Linux Deploy in the future.

 
 
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=325341752&siteId=291194637