部署私有云网盘owncloud

Posted luckwjl

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了部署私有云网盘owncloud相关的知识,希望对你有一定的参考价值。

环境说明:

[[email protected] ~]# cat /etc/redhat-release 
CentOS release 6.9 (Final)
[[email protected] ~]# uname -a
Linux localhost.localdomain 2.6.32-696.16.1.el6.x86_64 #1 SMP Wed Nov 15 16:51:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

安装mysql

[[email protected] ~]# rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
Retrieving http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
Preparing...             ########################################### [100%]
1:mysql-community-release########################################### [100%]
[[email protected] ~]# yum -y install mysql-server mysql-devel

配置my.cnf

[[email protected] ~]# vim /etc/my.cnf

[mysqld]
innodb_file_per_table

启动MySQL

[[email protected] ~]# service mysqld start
[[email protected] ~]# chkconfig mysqld on

配置MySQL

[[email protected] ~]# mysql_secure_installation

创建数据库

mysql> create database 库名;
mysql> show databases;
mysql> GRANT ALL ON 库名.* to ‘数据库用户名‘@‘localhost‘ IDENTIFIED BY ‘数据库密码‘;
mysql> FLUSH PRIVILEGES;
mysql> quit;
Bye

安装apache

[[email protected] ~]# yum -y install httpd
[[email protected] ~]# cp /etc/httpd/conf/httpd.conf{,.bak}
[[email protected] ~]# vim /etc/httpd/conf/httpd.conf
 276 ServerName www.example.com:80    取消注释
[[email protected] ~]# service httpd start
正在启动 httpd: [确定]
[[email protected] ~]# chkconfig httpd on

安装php

[[email protected] ~]# rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
Retrieving http://mirror.webtatic.com/yum/el6/latest.rpm
warning: /var/tmp/rpm-tmp.u4JRQZ: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY
Preparing... ########################################### [100%]
1:webtatic-release ########################################### [100%]
[[email protected] ~]# yum repolist
[[email protected] ~]# yum -y install php55w  php55w-bcmath php55w-cli php55w-common  php55w-devel php55w-fpm    php55w-gd php55w-imap  php55w-ldap php55w-mbstring  php55w-mysql   php55w-odbc   php55w-pdo  php55w-pear  php55w-pecl-igbinary  php55w-xml php55w-xmlrpc php55w-opcache php55w-intl php55w-pecl-memcache
[[email protected] ~]# cat /etc/my.cnf | grep socket
socket=/var/lib/mysql/mysql.sock            #查看sock文件路径
[[email protected] ~]# vim /etc/php.ini
 950 pdo_mysql.default_socket=/var/lib/mysql/mysql.sock
 805 upload_max_filesize = 1024M
 673 post_max_size = 1024M
 406 memory_limit = 1024M
 883 date.timezone = Asia/Shanghai
 385 max_execution_time = 300
 395 max_input_time = 300
启动php-fpm
[[email protected] ~]# /etc/init.d/php-fpm restart
停止 php-fpm:                    [确定]
正在启动 php-fpm:                 [确定]

下载配置owncloud

https://owncloud.org/
[[email protected] ~]# wget https://download.owncloud.org/community/owncloud-9.1.5.zip
[[email protected] ~]# unzip owncloud-9.1.5.zip
[[email protected] ~]# cp -r owncloud /var/www/html/
[[email protected] ~]# cd /var/www/html/owncloud/
[[email protected] owncloud]# mkdir data
[[email protected] owncloud]# cd ..
[[email protected] html]# chown -R apache:apache owncloud/
[[email protected] html]# chmod -R 0770 owncloud/
[[email protected] ~]# iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
[[email protected] ~]# service iptables save &&service iptables restart
[[email protected] ~]# setenforce 0

  

访问http://IP/owncloud

配置之前创建过的数据库信息,并创建一个owncloud管理员用户

技术分享图片

 

 配置完成后你会看到

技术分享图片

 

以上是关于部署私有云网盘owncloud的主要内容,如果未能解决你的问题,请参考以下文章

06_树莓派搭建私有云owncloud

比ownCloud/Nextcloud更好用的免费私有企业网盘

Ceph对象存储RGW对接企业级网盘OwnCloud三步走

Centos 6.9 搭建owncloud 私有云盘

centos6私有云owncloud 部署

自行搭建私有云ownCloud,启用SSL,其他配置