Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure Alpine linux manually

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to manually configure Alpine linux, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

Alpine linux does not do much common software in order to simplify itself. After installing the system, you need to configure it manually. In the process of configuration, you can also experience the efforts made by common distributions to open SSH login for users.

The default alpine does not have remote login permissions enabled. Ssh cannot log in remotely.

Vi / etc/ssh/sshd_config

Add:

PermitRootLogin yes

Allow root login, of course, this is the test environment, if necessary, you can also create your own ssh account. This is another story.

Install commonly used softwar

Apk updateapk add bash wget curl git make vim docker

APK installation error

ERROR: unsatisfiable constraints:mysql-client (missing): required by: world

If you encounter a similar error above, it is a problem with the current software source. It is recommended to change the source. When I installed docker, go and mysql, I encountered a similar "required by: world" error that could not be installed. I was at a loss for several days until I changed the source of the Chinese University of Science and Technology.

Editing

/ etc/apk/repositories

Then add it at the top of the file (remember to replace 3.3 with the required version)

Http://mirrors.ustc.edu.cn/alpine/v3.3/main/

Install openjdk

Because Alpine linux uses musl, unlike common glibc, Musl is a lightweight C standard library. So jdk and openjdk downloaded from oracle cannot be used directly. Do-it-yourself compilation takes several times the time and effort, so you can find the packaged openjdk compiled for musl to install directly. Azul provides openjdk for Alpine linux, which can be installed directly.

The installation process is no different from a normal jdk installation. Download the tar package and extract it to the installation directory and configure the environment variables.

Wget-mr https://cdn.azul.com/zulu/bin/zulu11.29.3-ca-jdk11.0.2-linux_musl_x64.tar.gztar-xzfv zulu11.29.3-ca-jdk11.0.2-linux_musl_x64.tar.gzcd zulu11.29.3-ca-jdk11.0.2-linux_musl_x64.tar.gzmv zulu / usr/lib/jvm//usr/lib/jvm/zulu-8/bin/java-version

Set time zone

If you don't look carefully before setup-alpine installation, setting the time zone is easy to ignore, and the time check used by many programs is prone to problems. It is necessary to manually modify UTC time to CST time under alpine (test passed)

$apk add tzdata$ ln-sf / usr/share/zoneinfo/Asia/Shanghai / etc/localtime$ echo "Asia/Shanghai" > / etc/timezone

Install glibc

This is the GNU C library that runs as the Alpine Linux package for running the linked binary glibc

Apk-- no-cache add ca-certificates wgetwget-Q-O / etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pubwget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.29-r0/glibc-2.29-r0.apkapk add glibc-2.29-r0.apk

If you use tools, you also need glibc-bin and packages in addition to localdef packages. Glibc-i18nglibc

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report