13 กันยายน 2567

ติดตั้ง Owncloud

 


Owncloud 10.15

pre

1.install Centos 7.9

2.Disable SELinux

4.firewall-cmd --add-service http --permanent

firewall-cmd --add-service https --permanent

firewall-cmd --reload

5.yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

yum-config-manager --disable remi-php54

yum-config-manager --enable remi-php74

6.yum install php php-mbstring php-gd php-mcrypt php-pear php-pspell php-pdo php-xml php-mysqlnd php-process php-pecl-zip php-xml php-intl php-zip php-zlib

6.yum install httpd php php-mysql mariadb-server mariadb sqlite php-dom php-mbstring php-gd php-pdo wget vim mod_ssl bzip2

systemctl enable httpd

setsebool -P httpd_unified 1

7.yum --enablerepo=remi install mariadb-server

mysql> create database owncloud;
mysql> create user 'owncloud'@'localhost' identified by'somedatabasepassword'; 
mysql> grant all on owncloud.* to 'owncloud'@'localhost';
mysql> flush privileges;
mysql> quit;

systemctl enable mariadb

mysql_secure_installation

setup owncloud

8.wget https://download.owncloud.org/community/owncloud-7.0.0.tar.bz2

9.tar -jxvf owncloud-7.0.0.tar.bz2 -C /var/www/html/

10.chown -R apache.apache /var/www/html/owncloud/

11.vim /etc/httpd/conf.d/owncloud.conf

<IfModule mod_alias.c>
Alias /owncloud /var/www/html/owncloud
</IfModule>
<Directory “/var/www/html/owncloud”>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

-------

for SSL

----------

<VirtualHost *:443>

ServerAdmin webmaster@fosslinuxowncloud.com

DocumentRoot "/var/www/html/owncloud/"

ServerName fosslinuxowncloud.com

ServerAlias www.fosslinuxowncloud.com


ErrorLog "/var/log/httpd/fosslinuxowncloud.com-ssl-error_log"

CustomLog "/var/log/httpd/fosslinuxowncloud.com-ssl-access_log" combined


<Directory "/var/www/html/owncloud/">

DirectoryIndex index.html index.php

Options FollowSymLinks

AllowOverride All

Require all granted

</Directory>


SSLEngine On


SSLCertificateFile /etc/ssl/certs/fosslinuxowncloud.cer

SSLCertificateKeyFile /etc/ssl/certs/fosslinuxowncloud.key

SSLCertificateChainFile /etc/ssl/certs/fosslinuxowncloud.ca

SSLCertificateFile /etc/ssl/certs/certifiate-name.cer

SSLCertificateKeyFile /etc/ssl/certs/key-name.key

SSLCertificateChainFile /etc/ssl/certs/chain-cert.ca

12. systemctl restart mariadb , httpd


After setup then

xx.xx.xx.xx/owncloud

แล้วคลิกขยายหน้าจอลงมา ตั้งค่าให้เรียบร้อย เลือกติดตั้ง

-------------------------------------

สามารถติดตั้ง Client เหมือน Onedrive บน Desktop ไว้ Sync ข้อมูลกันได้

1.cd /etc/yum.repos.d/

2.wget https://download.opensuse.org/repositories/isv:ownCloud:desktop/CentOS_7/isv:ownCloud:desktop.repo

3.yum install owncloud-client

Then start the client

-------------------------------------

https://www.fosslinux.com/9255/how-to-install-and-configure-owncloud-on-centos-7.htm

https://www.unixmen.com/install-owncloud-7-centos-7/

https://netway.co.th/kb/cloud-file-sharing/how-to/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B9%81%E0%B8%A5%E0%B8%B0%E0%B8%84%E0%B8%AD%E0%B8%99%E0%B8%9F%E0%B8%B4%E0%B8%81-owncloud-%E0%B8%9A%E0%B8%99-centos-7

https://netway.co.th/kb/cloud-file-sharing/how-to/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87-self-signed-certificated-%E0%B8%9A%E0%B8%99-apache-centos-7

https://www.cloudhosting.lv/eng/faq/How-to-Setup-ownCloud-on-CentOS-7

GDCC

หลังจาก ลง Centos

1. แก้ไข  CentosBase.repo

ลบ # จาก baseurl

แก้ mirrorlist , mirror  เป็น vault

2.ปิด Selinux

3.แก้ sshd

ลบ # จาก port

ลบ # จาก PermitRootLogin

เพิ่ม PasswordAuthentication yes


4.yum install bzip2