Install OwnCloud

Post Reply
brid.surapol
Posts: 156
Joined: 11 Apr 2013, 11:43

Install OwnCloud

Post by brid.surapol »

Install และ config Apache2

Code: Select all

sudo apt install apache2

sudo a2dismod autoindex
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
sudo a2enmod mime

sudo systemctl restart apache2
Install และ config MariaDB Server

Code: Select all

sudo apt-get install mariadb-server mariadb-client
sudo mysql_secure_installation
สร้าง owncloud database

Code: Select all

sudo mysql -u root -p

CREATE DATABASE owncloud;
CREATE USER 'oc_user'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL ON owncloud.* TO 'oc_user'@'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
หากต้องการ delete database เพื่อเริ่ม owncloud ใหม่

Code: Select all

sudo mysql -u root -p

SHOW DATABASES;
DROP DATABASE owncloud;
EXIT;
Install และ config PHP7.4

Code: Select all

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.4

sudo apt-get install php7.4-cli php7.4-common php7.4-mbstring php7.4-gd php7.4-intl php7.4-xml php7.4-mysql php7.4-zip php7.4-curl php7.4-xmlrpc

sudo vim /etc/php/7.4/apache2/php.ini

#ค้นหาและแก้ไข parameters ตามนี้
file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_file_size = 4096M


sudo systemctl restart apache2
download และ install owncloud

Code: Select all

wget https://download.owncloud.org/community/owncloud-10.7.0.zip

unzip owncloud-10.7.0.zip
sudo mv owncloud /var/www/html/owncloud/
sudo chown -R www-data:www-data /var/www/html/owncloud/
sudo chmod -R 755 /var/www/html/owncloud/
config owncloud โดยเข้า url

Code: Select all

http://server/owncloud
Attachments
ezgif-6-d1efe57f9481.jpg
ezgif-6-d1efe57f9481.jpg (112.16 KiB) Viewed 1921 times
Post Reply

Return to “การใช้งาน Linux”