انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهJNR-048-L07

عرض عملي: تشغيل Shop كخدمة systemd

  • الدرس 7 من 7
  • Junior
في هذا الدرس 3 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

run the Shop JAR as a managed service. Prepares JNR-048-LAB1.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Create a shop system user and copy the JAR to /opt/shop.
  2. Write /etc/systemd/system/shop.service with User=shop, ExecStart=java -jar /opt/shop/shop.jar, Restart=on-failure.
  3. systemctl daemon-reload, enable --now shop, then check status and journalctl -u shop.
  4. Find the port with ss -tlnp and call the health endpoint with curl.
  5. Planned mistake: the JAR is owned by root with mode 600, so the service fails with "permission denied"; fix with chown and chmod 640, not 777.
  6. kill the process and show systemd restarting it.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.