GSP.DEV
  • about
    • ✌️ สวัสดีครับ 😊
  • ⬜introduction
    • 🌐Web Development
      • 🖼️Frontend Developer
      • 🖥️Backend Developer
      • 🎓Full Stack Developer
      • 🚀DevOps Engineer
  • 📖Software
    • 🌐Web Development
      • Language
        • Javascript
        • TypeScript
        • PHP
        • Python
      • Runtime
        • Javascript Runtime
          • Node.js
          • Bun
      • Frontend Framework
        • CSS Framework
          • Tailwind CSS
        • Vite
        • Vue.js
          • Global API
          • Composition API
          • Single-File Component (SFC)
        • Nuxt.js
        • React.js
          • ตัวอย่างการใช้งาน React JS
        • Next.js
      • Backend Framework
        • Express.js
        • NestJS
        • Laravel
    • 🖥️Opeating System
      • Linux
        • Debian
        • Ubuntu
    • 📚Database
      • Relational Databases
        • MySQL
        • Postgres
      • Non-relational Database
        • Document
          • MongoDB
        • Key-value
          • Redis
        • Time Series
          • Prometheus
    • ⚙️Container
      • Docker
        • คำสั่ง Docker พื้นฐาน
      • LXC (Linux Containers)
        • การใช้งาน LXC
        • การใช้งาน Proxmox LXC
      • Container Runtime
        • Docker Container Runtime
        • Containerd
      • Container Orchestration
        • Docker Swarm
        • Kubernetes
    • 🛡️VPN
      • Wireguard
      • Tailscale
    • ☁️Serverless
      • Amazon S3 + Cloudfront
      • Vercel
      • Cloudflare Pages
      • AWS Lambda
    • 📦CDN
      • Cloudfront
    • 🗃️Storage
      • Amazon S3
      • MinIO
    • ✏️Content Management System
      • WordPress
    • 📷Photo Management Software
      • Immich
  • 🏭Infrastructure
    • 🌐Network
      • Firewall
      • Subnet
      • Router
      • Internet
      • Domain
      • DNS
      • Private Network
      • SDN
      • IPAM
      • Protocol
        • IP Address
        • DHCP
        • RTMP
        • TCP
        • UDP
        • HTTP
        • HTTPS
  • ⚙️Technology
    • Cloud Computing คืออะไร
    • VPN คืออะไร
    • Container
  • 🗣️เรื่องเล่า
    • การลดขนาด Image Docker
      • สำหรับ Next.js
    • รีวิว Github Copiot
  • 👨‍💻ลงโค้ด
    • Vue 3
      • การใช้งาน ref
      • การใช้งาน script setup
      • การใช้งาน await ใน script setup
Powered by GitBook
On this page

Was this helpful?

  1. Software
  2. Container
  3. LXC (Linux Containers)

การใช้งาน LXC

การใช้งาน LXC

LXC (Linux Containers) เป็นเทคโนโลยีสำหรับการสร้างและจัดการ container บนระบบ Linux ซึ่งช่วยให้การแยก process และการรัน application ในสภาพแวดล้อมที่แยกจากกันเป็นไปได้ง่ายขึ้น

ขั้นตอนการใช้งาน

  1. ติดตั้ง LXC: รันคำสั่ง sudo apt-get install lxc บนระบบที่ใช้ Ubuntu หรือ sudo yum install lxc สำหรับ CentOS

  2. สร้าง container: ใช้คำสั่ง lxc-create -n <ชื่อ_container> -t <เทมเพลต>

  3. เริ่มต้น container: รันคำสั่ง lxc-start -n <ชื่อ_container>

  4. เข้าถึง shell ของ container: ใช้ lxc-attach -n <ชื่อ_container>

  5. หยุด container: รัน lxc-stop -n <ชื่อ_container>

  6. ลบ container: หากต้องการลบให้ใช้คำสั่ง lxc-destroy -n <ชื่อ_container>

คำสั่งที่มีประโยชน์

  • แสดงรายการ container: lxc-ls --fancy

  • ตรวจสอบสถานะ container: lxc-info -n <ชื่อ_container>

การใช้งาน LXC ทำให้การจัดการ resource และการพัฒนาแอพพลิเคชั่นในสภาพแวดล้อมที่ควบคุมได้ดีขึ้น โดยไม่ต้องใช้ virtual machines.

PreviousLXC (Linux Containers)Nextการใช้งาน Proxmox LXC

Last updated 4 months ago

Was this helpful?

📖
⚙️