Ubuntu: ตั้งค่า Nextcloud - มันทำงานอย่างไร
คุณยังสามารถตั้งค่า Nextcloud ของคุณเองบนเซิร์ฟเวอร์ Ubuntu ของคุณ เราแสดงให้คุณเห็นว่ามันทำงานอย่างไรในเคล็ดลับที่เป็นประโยชน์นี้
ตั้งค่า Nextcloud บน Ubuntu - ไปเลย
- ไปที่หน้านี้และคัดลอกลิงค์ของเวอร์ชั่นล่าสุด ตรวจสอบให้แน่ใจว่าเป็นไฟล์เก็บถาวร ".tar.bz2"
- เชื่อมต่อกับเซิร์ฟเวอร์ของคุณผ่าน SSH และเปลี่ยนเป็นไดเรกทอรีชั่วคราวด้วย "cd / tmp"
- ดาวน์โหลดเวอร์ชันล่าสุดโดยใช้ "curl -LO //download.nextcloud.com/server/releases/nextcloud-11.0.3.tar.bz2"
- แตกไฟล์ที่เก็บถาวรด้วย "sudo tar -C / var / www -xvjf /tmp/nextcloud-11.0.3.tar.bz2 เพื่อเริ่มการติดตั้ง
- ใช้ "nano /tmp/nextcloud.sh" เพื่อสร้างเชลล์สคริปต์และเพิ่มรายการต่อไปนี้: "#! / Bin / bash ocpath =" / var / www / nextcloud "htuser =" www-data "htgroup = "www-data" rootuser = "root" printf "การสร้างไดเรกทอรีที่ขาดหายไป \ n" mkdir -p $ ocpath / data mkdir -p $ ocpath / สินทรัพย์ mkdir -p $ ocpath / updater printf "chmod ไฟล์และไดเรกทอรี \ n" หา $ {ocpath} / -type f -print0 | xargs -0 chmod 0640 find $ {ocpath} / -type d -print0 | xargs -0 chmod 0750 chmod 755 $ {ocpath} printf "chown Directories \ n" chown -R $ {rootuser}: $ {htgroup} $ {ocpath} / chown -R $ {htuser}: $ {htgroup} $ {ocpath} / apps / chown -R $ {htgroup} $ {ocpath} / asset / chown -R $ {htuser}: $ {htgroup} $ {ocpath} / config / chown -R $ {htuser}: $ {htgroup} $ {ocpath} / ข้อมูล / chown -R $ {htuser}: $ { htgroup} $ {ocpath} / themes / chown -R $ {htuser}: $ {htgroup} $ {ocpath} / updater / chmod + x $ {ocpath} / occ printf "chmod / chown .htaccess \ n" ถ้า [- f $ {ocpath} /. htaccess] แล้ว chmod 0644 $ {ocpath} /. htaccess chown $ {rootuser}: $ {htgroup} $ {ocpath} / .htaccess fi ถ้า [-f $ {ocpath} /data/.htaccess] จากนั้น chmod 0644 $ {ocpath} /data/.htaccess chown $ {rootuser}: $ {htgroup} $ {ocpath} /data/.htaccess fi ",
- จากนั้นเรียกใช้สคริปต์ด้วย "sudo bash /tmp/nextcloud.sh" สิ่งนี้จะสร้างไดเรกทอรีที่จำเป็นทั้งหมดและให้สิทธิ์ที่เหมาะสมแก่พวกเขา
- เพื่อให้แน่ใจว่าเซิร์ฟเวอร์ทำงานบนเซิร์ฟเวอร์ Linux ของคุณด้วยให้สร้างไฟล์ปรับแต่งอื่นด้วย "sudo nano /etc/apache2/sites-available/nextcloud.conf" และเพิ่มรายการต่อไปนี้: "Alias / nextcloud" / var / www / nextcloud / "ตัวเลือก + FollowSymlinks AllowOverride Dav ทั้งหมดปิด SetEnv HOME / var / www / nextcloud SetEnv HTTP_HOME / var / www / nextcloud" ด้วยความช่วยเหลือของ "sudo a2ensite nextcloud" สคริปต์นี้จะถูกนำไปใช้
- ตอนนี้สร้างโมดูลที่ต้องการด้วย "sudo a2enmod rewrite" และอัปเดตเซิร์ฟเวอร์ด้วย "sudo apt-get update" ดาวน์โหลดโมดูล PHP ด้วย "sudo apt-get install php-bz2 php-curl php-gd php-imagick php-intl php-mbstring php-mbstring php-xml php-zip" แล้วเริ่มเซิร์ฟเวอร์ด้วย "sudo systemctl โหลด apache2 "ใหม่
ตั้งค่า Nextcloud บน Ubuntu - การกำหนดค่าเพิ่มเติม
- ในขั้นตอนต่อไปให้คุณล็อกอินเข้าสู่การบริหาร MySQL ด้วย "mysql -u root -p"
- จากนั้นใช้ "สร้างฐานข้อมูล nextcloud" ฐานข้อมูลสำหรับ Nextcloud
- เพื่อความปลอดภัยเฉพาะผู้ใช้ "nextcloud" เท่านั้นที่จะสามารถเข้าถึงการจัดการ MySQL กำหนดสิ่งนี้ด้วย "GRANT ALL ON nextcloud * ถึง 'nextcloud' @ 'localhost' ที่ระบุโดย 'DATENBANK_PASSWORT';" และเปลี่ยน "DATENBANK_PASSWORT" ด้วยรหัสผ่านที่คุณเลือก
- โหลดการตั้งค่า MySQL ด้วย "FLUSH PRIVILEGES;" ใหม่และออกจาก "ทางออก" การบริหาร MySQL
- เปิดเบราว์เซอร์ของคุณและป้อน IP หรือที่อยู่เว็บของคุณและเพิ่ม "/ nextcloud" ในตอนท้าย
- ตอนนี้คุณต้องกำหนดค่าคลาวด์ ก่อนอื่นให้ป้อนชื่อผู้ใช้และรหัสผ่านสำหรับบัญชีผู้ดูแลระบบของคุณ
- จากนั้นคลิกที่ "การจัดเก็บและข้อมูล" และป้อนข้อมูล MySQL ที่คุณระบุไว้ก่อนหน้า
- ด้วยการคลิกที่ "เสร็จสิ้นการตั้งค่า" การตั้งค่าเสร็จสมบูรณ์
หากคุณมีเซิร์ฟเวอร์ของคุณอยู่คุณควรอัปเดต Nextcloud เป็นประจำ เราจะแสดงให้คุณเห็นในเคล็ดลับการปฏิบัติต่อไปของเรา