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
Code: Select all
sudo apt-get install mariadb-server mariadb-client
sudo mysql_secure_installation
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;
Code: Select all
sudo mysql -u root -p
SHOW DATABASES;
DROP DATABASE owncloud;
EXIT;
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
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/
Code: Select all
http://server/owncloud