ubuntu18.04安装owncloud
最近实验室闲置了一台主机,就将这个主机搭建成一个公有云给大家使用。 系统版本是ubuntu server。
安装Apache
首先安装apache以供owncloud使用: sudo apt install apache2
sudo a2dismod autoindex
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
sudo a2enmod mimesudo systemctl restart apache2
sudo apt-get install mariadb-server mariadb-client |
安装完成后添加密码 sudo mysql_secure_installation
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;sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.1sudo apt-get install php7.1-cli php7.1-common php7.1-mbstring php7.1-gd php7.1-intl php7.1-xml php7.1-mysql php7.1-zip php7.1-curl php7.1-xmlrpc
sudo vi /etc/php/7.1/apache2/php.ini
file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_file_size = 100Msudo systemctl restart apache2
cd /tmp
wget https://download.owncloud.org/community/owncloud-10.0.3.zipunzip owncloud-10.0.3.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/