วิธีการติดตั้ง Directus 6.4 CMS บน CentOS 7 LAMP VPS
เรียนรู้วิธีการติดตั้ง Directus 6.4 CMS บน CentOS 7; ระบบการจัดการเนื้อหา Headless ที่มีความยืดหยุ่นสูงและปลอดภัย
Sysctl
ช่วยให้ผู้ใช้ปรับแต่งเคอร์เนลโดยไม่ต้องสร้างเคอร์เนลใหม่ นอกจากนี้ยังจะใช้การเปลี่ยนแปลงทันทีดังนั้นเซิร์ฟเวอร์จึงไม่จำเป็นต้องรีบูตเพื่อให้การเปลี่ยนแปลงมีผล บทช่วยสอนนี้มีการแนะนำสั้น ๆsysctl
และสาธิตวิธีใช้เพื่อปรับแต่งส่วนเฉพาะของเคอร์เนล Linux
หากต้องการเริ่มใช้ sysctl ให้ตรวจสอบพารามิเตอร์และตัวอย่างที่แสดงด้านล่าง
-a : สิ่งนี้จะแสดงค่าทั้งหมดที่มีอยู่ในการกำหนดค่า sysctl
-A : สิ่งนี้จะแสดงค่าทั้งหมดที่มีอยู่ในการกำหนดค่า sysctl ในรูปแบบตาราง
-e : ตัวเลือกนี้จะไม่สนใจข้อผิดพลาดเกี่ยวกับคีย์ที่ไม่รู้จัก
-p : นี่ใช้เพื่อโหลดการกำหนดค่า sysctl เฉพาะโดยค่าเริ่มต้นมันจะใช้/etc/sysctl.conf
-n : ตัวเลือกนี้จะปิดการใช้งานการแสดงชื่อคีย์เมื่อพิมพ์ค่า
-w : ตัวเลือกนี้มีไว้สำหรับการเปลี่ยนค่า (หรือเพิ่ม) เพื่อ sysctl ตามความต้องการ
$ sysctl -a
$ sysctl -n fs.file-max
$ sysctl -w fs.file-max=2097152
$ sysctl -p
ดังนั้นก่อนอื่นเราจะตรวจสอบค่าเริ่มต้น หากคุณ/etc/sysctl.conf
ว่างเปล่ามันจะแสดงปุ่มและค่าเริ่มต้นทั้งหมด ประการที่สองเรากำลังตรวจสอบสิ่งที่มีค่าของมีแล้วการตั้งค่าใหม่เพื่อfs.file-max
2097152
สุดท้ายเรากำลังโหลด/etc/sysctl.conf
ไฟล์กำหนดค่าใหม่
man sysctl
หากคุณกำลังมองสำหรับความช่วยเหลือเพิ่มเติมคุณสามารถใช้
เพื่อทำการเปลี่ยนแปลงอย่างถาวรเราจะต้องเพิ่มค่าเหล่านี้ไปยังไฟล์การกำหนดค่า ใช้แฟ้มการกำหนดค่า CentOS /etc/sysctl.conf
ให้โดยค่าเริ่มต้น
เปิดไฟล์ด้วยโปรแกรมแก้ไขที่คุณชื่นชอบ
โดยค่าเริ่มต้นคุณจะเห็นสิ่งที่คล้ายกับสิ่งนี้
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
มาปรับปรุงการจัดการหน่วยความจำระบบก่อน
เราจะลดจำนวนการแลกเปลี่ยนที่เราต้องทำลดขนาดของการจัดการไฟล์และแคช inode และ จำกัด การทิ้งขยะหลัก
# Minimizing the amount of swapping
vm.swappiness = 20
vm.dirty_ratio = 80
vm.dirty_background_ratio = 5
# Increases the size of file handles and inode cache & restricts core dumps
fs.file-max = 2097152
fs.suid_dumpable = 0
ถัดไปให้ปรับประสิทธิภาพเครือข่ายให้เหมาะสมที่สุด
เรากำลังจะเปลี่ยนปริมาณการเชื่อมต่อขาเข้าและการเชื่อมต่อขาเข้าขาเข้าเพิ่มจำนวนบัฟเฟอร์หน่วยความจำสูงสุดและเพิ่มบัฟเฟอร์การส่ง / รับค่าเริ่มต้นและสูงสุด
# Change the amount of incoming connections and incoming connections backlog
net.core.somaxconn = 65535
net.core.netdev_max_backlog = 262144
# Increase the maximum amount of memory buffers
net.core.optmem_max = 25165824
# Increase the default and maximum send/receive buffers
net.core.rmem_default = 31457280
net.core.rmem_max = 67108864
net.core.wmem_default = 31457280
net.core.wmem_max = 67108864
สุดท้ายเราจะปรับปรุงความปลอดภัยเครือข่ายทั่วไป
เรากำลังจะเปิดใช้งานการป้องกันคุกกี้ TCP SYN, การป้องกันการปลอมแปลง IP, ละเว้นการร้องขอ ICMP, ละเว้นการร้องขอการออกอากาศและการบันทึกลงในแพ็คเก็ตที่ปลอมแปลง, แพ็คเก็ตที่เราต์ต้นทางและแพ็กเก็ตที่เปลี่ยนเส้นทาง นอกจากนั้นเราจะปิดใช้งานการกำหนดเส้นทางแหล่ง IP และการยอมรับการเปลี่ยนเส้นทาง ICMP
# Enable TCP SYN cookie protection
net.ipv4.tcp_syncookies = 1
# Enable IP spoofing protection
net.ipv4.conf.all.rp_filter = 1
# Enable ignoring to ICMP requests and broadcasts request
net.ipv4.icmp_echo_ignore_all = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
# Enable logging of spoofed packets, source routed packets and redirect packets
net.ipv4.conf.all.log_martians = 1
# Disable IP source routing
net.ipv4.conf.all.accept_source_route = 0
# Disable ICMP redirect acceptance
net.ipv4.conf.all.accept_redirects = 0
บันทึกและปิดไฟล์จากนั้นโหลดไฟล์โดยใช้sysctl -p
คำสั่ง
ในท้ายที่สุดไฟล์ของคุณควรมีลักษณะเช่นนี้
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
# Minimizing the amount of swapping
vm.swappiness = 20
vm.dirty_ratio = 80
vm.dirty_background_ratio = 5
# Increases the size of file handles and inode cache & restricts core dumps
fs.file-max = 2097152
fs.suid_dumpable = 0
# Change the amount of incoming connections and incoming connections backlog
net.core.somaxconn = 65535
net.core.netdev_max_backlog = 262144
# Increase the maximum amount of memory buffers
net.core.optmem_max = 25165824
# Increase the default and maximum send/receive buffers
net.core.rmem_default = 31457280
net.core.rmem_max = 67108864
net.core.wmem_default = 31457280
net.core.wmem_max = 67108864
# Enable TCP SYN cookie protection
net.ipv4.tcp_syncookies = 1
# Enable IP spoofing protection
net.ipv4.conf.all.rp_filter = 1
# Enable ignoring to ICMP requests and broadcasts request
net.ipv4.icmp_echo_ignore_all = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
# Enable logging of spoofed packets, source routed packets and redirect packets
net.ipv4.conf.all.log_martians = 1
# Disable IP source routing
net.ipv4.conf.all.accept_source_route = 0
# Disable ICMP redirect acceptance
net.ipv4.conf.all.accept_redirects = 0
เรียนรู้วิธีการติดตั้ง Directus 6.4 CMS บน CentOS 7; ระบบการจัดการเนื้อหา Headless ที่มีความยืดหยุ่นสูงและปลอดภัย
เรียนรู้วิธีการตั้งค่า Nginx บน Ubuntu สำหรับการสตรีมวิดีโอสด HLS ด้วยคำแนะนำที่ชัดเจนและเป็นประโยชน์
เรียนรู้การใช้ Percona XtraBackup สำหรับการสำรองข้อมูลด้วยวิธีที่เป็นระบบและง่ายดายบน WordPress ออนไลน์ของคุณ
ReactOS ซึ่งเป็นโอเพ่นซอร์สและระบบปฏิบัติการฟรีพร้อมเวอร์ชันล่าสุดแล้ว สามารถตอบสนองความต้องการของผู้ใช้ Windows ยุคใหม่และล้ม Microsoft ได้หรือไม่? มาหาข้อมูลเพิ่มเติมเกี่ยวกับรูปแบบเก่านี้ แต่เป็นประสบการณ์ OS ที่ใหม่กว่ากัน
การโจมตีของ Ransomware กำลังเพิ่มขึ้น แต่ AI สามารถช่วยจัดการกับไวรัสคอมพิวเตอร์ตัวล่าสุดได้หรือไม่? AI คือคำตอบ? อ่านที่นี่รู้ว่า AI boone หรือ bane
ในที่สุด Whatsapp ก็เปิดตัวแอพเดสก์ท็อปสำหรับผู้ใช้ Mac และ Windows ตอนนี้คุณสามารถเข้าถึง Whatsapp จาก Windows หรือ Mac ได้อย่างง่ายดาย ใช้ได้กับ Windows 8+ และ Mac OS 10.9+
อ่านข้อมูลนี้เพื่อทราบว่าปัญญาประดิษฐ์กำลังได้รับความนิยมในหมู่บริษัทขนาดเล็กอย่างไร และเพิ่มโอกาสในการทำให้พวกเขาเติบโตและทำให้คู่แข่งได้เปรียบ
เมื่อเร็ว ๆ นี้ Apple เปิดตัว macOS Catalina 10.15.4 การอัปเดตเสริมเพื่อแก้ไขปัญหา แต่ดูเหมือนว่าการอัปเดตทำให้เกิดปัญหามากขึ้นที่นำไปสู่การสร้างเครื่อง Mac อ่านบทความนี้เพื่อเรียนรู้เพิ่มเติม
13 เครื่องมือดึงข้อมูลเชิงพาณิชย์ของ Big Data
คอมพิวเตอร์ของเราจัดเก็บข้อมูลทั้งหมดในลักษณะที่เรียกว่าระบบไฟล์บันทึก เป็นวิธีการที่มีประสิทธิภาพที่ช่วยให้คอมพิวเตอร์สามารถค้นหาและแสดงไฟล์ได้ทันทีที่คุณกดค้นหาhttps://wethegeek.com/?p=94116&preview=true