บทความ

กำลังแสดงโพสต์ที่มีป้ายกำกับ ubuntu

Install Secure Nginx on Ubuntu 16.04 with Let's Encrypt

ทดสอบบน Ubuntu 16.04 1. ติดตั้ง package letsencrypt sudo apt-get install letsencrypt 2. ติดตั้งโดยใช้รูปแบบ webroot plugin การทำงานจะอยู่ใน  /.well-known ของ  document root ให้ทำการ แก้ไขไฟล์ /etc/nginx/sites-available/default  sudo nano /etc/nginx/sites-available/default location ~ /.well-known { allow all; } sudo service nginx restart 3. สมมุติว่า webroot เป็น /var/www/html ติดตั้งแบบ certonly ด้วยคำสั่ง sudo letsencrypt certonly --webroot -w /var/www/html -d example.com 4. Generate Strong Diffie-Hellman Group sudo openssl dhparam -out /etc/letsencrypt/live/example.com/dhparam.pem 2048 5. ตรวจสอบไฟล์ certificates sudo ls -l /etc/letsencrypt/live/example.com lrwxrwxrwx 1 root root 42 Oct 10 12:55 cert.pem -> ../../archive/ example.com /cert1.pem lrwxrwxrwx 1 root root 43 Oct 10 12:55 chain.pem -> ../../archive/ example.com /chain1.pem -rw-r--r-- 1 root root 769 Oct 10 13:43 dhparam....

ติดตั้ง Radius Server แบบใช้ฐานข้อมูล MySql

รูปภาพ
- ทดสอบบน Ubuntu 14.04 LTS -  freeradius 2.x, MySQL-Server, Apache2, PHP5, phpMyAdmin   1.  ติดตั้งด้วยคำสั่ง sudo apt-get install freeradius freeradius-utils freeradius-mysql   2. ทดสอบการทำงานของ radius สามารถทำงานได้หรือไม่ โดยแก้ไขไฟล์ /etc/freeradius/users และเพิ่มท้ายไฟล์ดังนี้     "testradius"     Cleartext-Password := "hello"                             Reply-Message = "Hello, %{User-Name}"   3. สั่งให้ freeradius ทำงานใหม่ด้วยคำสั่ง service freeradius restart       4. ทดสอบการทำงานด้วยคำสั่ง radtest testradius hello 127.0.0.1 0 testing123 จะได้ข้อความประมาณนี้       Sending Access-Request of id 31 to 127.0.0.1 port 1812             User-Name = "testradius"             User-Password = "hello"             NAS-IP-Address = 192.168.0....

ปรับแต่งหลังการติดตั้ง Ubuntu เบื้องต้น

- ทดสอบบน Ubuntu 14.04 LTS 1. การ เทียบเวลาให้ตรงกับสากล       - ด้วยคำสั่ง  sudo ntpdate pool.ntp.org       -  ต้องการให้ตั้งเทียบเวลาอัตโนมัติทุกวัน ให้สร้างแฟ้มชื่อ /etc/cron.daily/update-time        #!/bin/bash        /usr/sbin/ntpdate pool.ntp.org        แก้ไขให้แฟ้มนี้สามารถ execute ด้วยคำสั่ง sudo chmod +x /etc/cron.daily/update-time        แล้วสั่งให้ cron ทำงานใหม่ด้วยคำสั่ง sudo service cron restart        หากไม่ตั้งเทียบเวลาทุกวัน นาฬิกาจะเดินผิดพลาดไปวันละประมาณ 2 วินาที   2.  ทำการ update package ของ Ubuntu ล่าสุด        - ด้วยคำสั่ง sudo apt-get update       - และตามด้วยคำสั่ง sudo apt-get upgrade   3. การปรับแต่งค่าของ Network Interface      - สามารถเข้าไปแก้ไขได้ที่ไฟล์   /etc/network/interfaces ข้อมูลประมาณดังตัวอย่าง      auto lo   ...

Docker : Install docker compose on ubuntu 16.04 LTS

รูปภาพ
ติดตั้ง Docker Compose บน Ubuntu 16.04 LTS 1. ใช้คำสั่ง curl ดึง compose จาก GitHub curl -L "https://github.com/docker/compose/releases/download/1.8.1/docker-compose- $(uname -s) - $(uname -m) " > /usr/ local /bin/docker-compose 2. เปลี่ยน  permissions  chmod + x /usr/ local /bin/docker-compose 3. ทดสอบคำสั่ง docker-compose --version  

Docker : Install docker on ubuntu 16.04 LTS

รูปภาพ
ติดตั้ง Docker บน Ubuntu 16.04 LTS | Install docker on ubuntu 16.04 LTS 1. Update APT Sources sudo apt-get update   sudo apt- get install apt-transport-https ca-certificates  2. Add the new GPG key sudo apt-key adv --keyserver hkp: //p 8 0 .pool.sks-keyservers.net: 80 -- recv - keys 58118 E89F3A912897C070ADBF76221572C52609D 3. Add docker Reposiory echo " deb https://apt.dockerproject.org/repo ubuntu-xenial main " | sudo tee /etc/apt/sources.list.d/docker.list 4. Update APT package  sudo apt-get update 5. Install Docker Engine  sudo apt-get install docker-engine 6. ทดสอบคำสั่ง docker -v Docker version 1.12.1, build 6f9534c   7. หากต้องการปรับแต่งค่าเริ่มต้น network docker0   แก้ไขไฟล์ /lib/systemd/system/docker.service [Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the c...