owncloud私有云盘的部署(ubuntu 16.04)

准备工作

wget apt-get install -y apache2 mariadb-server libapache2-mod-php7.0 \
    openssl php-imagick php7.0-common php7.0-curl php7.0-gd \
    php7.0-imap php7.0-intl php7.0-json php7.0-ldap php7.0-mbstring \
    php7.0-mcrypt php7.0-mysql php7.0-pgsql php-smbclient php-ssh2 \
    php7.0-sqlite3 php7.0-xml php7.0-zip

下载安装包

# wget https://download.owncloud.org/community/owncloud-10.0.8.tar.bz2
# sudo tar xjf owncloud-10.0.4.tar.bz2
# sudo cp -r -v owncloud/ /var/www/

设置目录权限

  • 需要进入到/var/www/owncloud下创建data文件夹
sudo mkdir data  
sudo chown -R www-data:www-data data  
sudo chown -R www-data:www-data config  
sudo chown -R www-data:www-data apps

apache2 配置,端口配置8081

vi /etc/apache2/sites-available/owncloud.conf
Listen 8081

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/owncloud/
    Alias /owncloud "/var/www/owncloud/"    
    
        Options +FollowSymlinks
        AllowOverride All    
        
            Dav off
            
        SetEnv HOME /var/www/owncloud
        SetEnv HTTP_HOME /var/www/owncloud    
    
ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/sites-enabled/owncloud.conf

数据库配置

# mysql
# create database owncloud
# create user 'owncloud'@'localhost' identified by 'password';
# grant all privileges on owncloud.* to owncloud@localhost identified by 'password';

现在可以访问您的owncloud网站了

https://server_ip:8081

你可能感兴趣的:(owncloud,云存储)