NextCloud คือโปรเจค Next Generation Open Source ในระดับ Enterprise ซึ่งเป็น Software File Sync และ Share รองรับทั่้ง Mobile และ Desktop Client พร้อมทั้งมี Application Store ใช้งานด้วยครับ โดยถูกออกแบบมาจากผู้ก่อตั้ง ownCloud ‘Frank Karlitschek‘ และทีมงาน คล้ายกับ Google Drive, Dropbox, Microsoft OneDrive, Box, ฯลฯ ที่เราคุ้นเคย แต่ NextCloud และ ownCloud เราสามารถนำ Software มาติดตั้งบน Server ของเราเองได้ครับ แน่นอนว่าประโยชน์คือ เราสามารถจัดการระบบได้ทั้งหมดครับ
ดู Feature เพิ่มเติมตามนี้ครับ https://nextcloud.com/features/
สำหรับ All Apps Store ก็ตามนี้ครับ https://apps.nextcloud.com/
ก่อนการติดตั้ง NextCloud สิ่งที่ต้องเตรียมมีดังนี้ครับ
– RAM ไม่น้อยว่า 512MB
– ติดตั้ง Linux CentOS 7 ให้พร้อมครับ How To Install Linux CentOS7 64bits
– ทำการติดตั้ง Web Server เป็น apache (httpd) และ Database Server เป็น MariaDB ถ้ายังไม่ติดตั้งกลับไปดูบทความ How To Install Apache PHP MySQL phpMyAdmin On CentOS 7 (LAMP) เพิ่มเติมได้ครับ
– ทำการติดตั้ง PHP 7.0+ ดังนี้ How To Install PHP 7.x on CentOS 6 and 7
จากนั้นก็มีเริ่มกันเลยครับ
1. ทำการติดตั้ง PHP Package เพิ่มเติมดังนี้ครับ
1 |
[root@thaiops ~]# yum -y install php php-mysql php-pecl-zip php-xml php-mbstring php-gd |
2. ทำการสร้าง Database และ User สำหรับ NextCloud บน MariaDB โดยใช้คำสั่งนี้ครับ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
[root@thaiops ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is xxx Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE nxclouddb; MariaDB [(none)]> GRANT ALL PRIVILEGES ON nxclouddb.* TO 'nxclouduser'@'localhost' IDENTIFIED BY 'nx@thaiops'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | nxclouddb | | performance_schema | +--------------------+ 4 rows in set (0.00 sec) MariaDB [(none)]> quit; [root@thaiops ~]# |
3. ทำการแก้ไขค่า Default limit ในการ upload ไฟล์เป็น 100MB ดังนี้ครับ
1 2 3 4 5 6 |
[root@thaiops ~]# vi /etc/php.ini post_max_size = 100M upload_max_filesize = 100M [root@thaiops ~]# |
และทำการ Restart web server
1 |
[root@thaiops ~]# systemctl restart httpd |
4. ทำการ Download ไฟล์ NextCloud version ล่าสุด https://nextcloud.com/install/#instructions-server ตามนี้จากนั้นก็ทำการแตกไฟล์ zip และย้ายไปยัง web server directory ดังนี้ครับ
1 2 3 4 |
[root@thaiops ~]# yum install wget unzip -y [root@thaiops ~]# wget https://download.nextcloud.com/server/releases/nextcloud-12.0.3.zip [root@thaiops ~]# unzip nextcloud-* -d /var/www/html/ [root@thaiops ~]# chown -R apache:apache /var/www/html/nextcloud/ |
5. จากนั้นทำการเปิด Web Browser เรียกไปที่ http://IP-Address/nextcloud เพื่อทำการตั้งค่าการติดตั้งต่างๆ ดังนี้ครับ
– Create an admin account คือ เป็นการกำหนด username และ password สำหรับ Admin account
– Data Folder คือ การกำหนด path ที่จะเก็บ data ของผู้ใช้งานครับ
– Configure the database คือ กรณีนี้เราจำเก็บการตั้งค่าต่างๆ ของระบบใน Database เป็น MariaDB นะครับ
ให้ใส่ข้อมูล username และรหัสผ่านของการใช้งาน database name ดังรูปครับ (ถ้าจำไม่ได้กลับไปดูขั้นตอนข้อ 2 ครับ) จากนั้นก็กดปุ่ม Finish Setup
เมื่อเสร็จแล้ว ระบบจะทำการ Login เข้ายัง NextCloud ให้ดังรูป
การติดตั้ง Nextcloud Client ไม่ว่าจะเป็น Desktop หรือ Mobile ตามนี้เลยครับ
https://nextcloud.com/install/#install-clients
แค่นี้ก็เสร็จเรียบร้อยสำหรับการติดตั้งสำหรับเรื่อง Configure และ Review เพิ่มสำหรับ App Store ต่างๆ เดี๋ยวบทความต่อไปครับ
ขอบคุณที่ติดตามครับ