Community Tutorials Alpine Linux كيفية تثبيت Alpine Linux في 5 دقائق
كيفية تثبيت Alpine Linux في 5 دقائق
ALPINE LINUX

كيفية تثبيت Alpine Linux في 5 دقائق

SKYLINE Knowledge Base
Photo by Praveen Thirumurugan on Unsplash

دليل عملي خطوة بخطوة لـ كيفية تثبيت Alpine Linux في 5 دقائق. أوامر مختبرة في الإنتاج، متطلبات مسبقة، تحقق نهائي وروابط لمواضيع ذات صلة.

Alpine Linux مبني على musl libc و BusyBox، يستهلك حوالي 130 MB، وهو الأساس لمعظم صور Docker الإنتاجية. هذا الدليل يثبته على VM في 5 دقائق.

المتطلبات المسبقة

  • VM بـ 256 MiB ذاكرة و 1 GiB قرص.
  • alpine-virt-3.20.x-x86_64.iso.

الخطوة 1: الإقلاع وتسجيل الدخول

سجل دخولًا كـ root بدون كلمة مرور.

الخطوة 2: المثبت

setup-alpine

اعبر القائمة: keymap us، hostname، DNS 1.1.1.1، timezone Asia/Riyadh، SSH openssh، NTP chrony، Disk sys.

reboot

الخطوة 3: أول دخول

سجل دخولًا كـ root.

الخطوة 4: إنشاء مستخدم

apk add sudo
adduser ops
adduser ops wheel
echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel
ssh-copy-id ops@alpine-host

/etc/ssh/sshd_config:

PermitRootLogin no
PasswordAuthentication no
rc-service sshd restart

Alpine يستخدم OpenRCrc-service، rc-update، rc-status بدل systemctl.

الخطوة 5: حزم أساسية

apk update
apk upgrade
apk add bash vim curl htop git bind-tools tzdata ca-certificates iptables-openrc

الخطوة 6: جدار الحماية

apk add awall
modprobe ip_tables
rc-update add iptables boot
rc-update add ip6tables boot
rc-service iptables start

/etc/awall/private/main.json:

{
  "description": "skyline minimal",
  "zone": { "internet": { "iface": "eth0" } },
  "policy": [
    { "in": "internet", "action": "drop" },
    { "in": "_fw", "action": "accept" }
  ],
  "filter": [
    { "in": "internet", "out": "_fw", "service": "ssh",  "action": "accept" },
    { "in": "internet", "out": "_fw", "service": "http", "action": "accept" },
    { "in": "internet", "out": "_fw", "service": "https","action": "accept" }
  ]
}
awall enable main
awall activate

التحقق

cat /etc/alpine-release
uname -a
rc-status
apk info | wc -l

الخاتمة

Alpine يثبت في أقل من 5 دقائق ويعمل بكسر من قرص وذاكرة التوزيعات التقليدية.

الخطوات التالية

SKYLINE Engineering

@skyline

The engineering team at SKYLINE Industrial Solutions. We publish field-tested guides drawn from real KSA and GCC deployments.

See author profile
SKYLINE engineering services

Need this implemented for you?

Reading is free — building it right takes a team. SKYLINE engineers ship Alpine Linux for Aramco vendors, banks, hospitals and government agencies across Saudi Arabia. Talk to us before you start.

Aramco Approved Contractor ISO 9001 · ISO 27001 SAMA CSF aligned NCA ECC ready 247+ KSA clients

Comments

0 total · 0 threads
Be the first to leave a comment.