作者:【吴业亮】
博客:http://blog.csdn.net/wylfengyujiancheng

前言
ownCloud 是一个开源免费专业的私有云存储项目,它能帮你快速在个人电脑或服务器上架设一套专属的私有云文件同步网盘,可以像 Dropbox 那样实现文件跨平台同步、共享、版本控制、团队协作等等。ownCloud 能让你将所有的文件掌握在自己的手中,只要你的设备性能和空间充足,那么用其来几乎没有任何限制。
owncloud不仅有windows客户端,还有手机端

手机端:


windows客户端


一、安装http
1、安装软件包

[root@owncloud ~]# yum -y install httpd

2、删除欢迎词

[root@owncloud ~]# rm -f /etc/httpd/conf.d/welcome.conf

3、修改配置文件

[root@owncloud ~]# vi /etc/httpd/conf/httpd.conf
# line 86: change to admin's email address
ServerAdmin root@srv.world
# line 95: change to your server's name
ServerName www.srv.world:80
# line 151: change
AllowOverride All
# line 164: add file name that it can access only with directory's name
DirectoryIndex index.html index.cgi index.php
# 在后面新增
# server's response header
ServerTokens Prod
# keepalive is ON
KeepAlive On

4、启动服务并设置开机启动

[root@owncloud ~]# systemctl start httpd
[root@owncloud ~]# systemctl enable httpd

5、设置防火墙

[root@owncloud ~]# firewall-cmd --add-service=http --permanent
success
[root@owncloud ~]# firewall-cmd --reload
Success

6、写入测试文件
[root@owncloud ~]# vi /var/www/html/index.html

 <html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Test Page
</div>
</body>
</html>

测试

二、安装PHP
1、安装软件包

[root@owncloud ~]# yum -y install php php-mbstring php-pear

修改配置文件

[root@owncloud ~]# vi /etc/php.ini
# line 878: 修改时区
date.timezone = "Asia/Shanghai"

2、重启http服务

[root@owncloud ~]# systemctl restart httpd

3、创建测试文件

[root@owncloud ~]# vi /var/www/html/index.php<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
<?phpprint Date("Y/m/d");
?>
</div>
</body>
</html>

4、测试

三、安装数据库
1、安装软件包

[root@owncloud ~]# yum -y install mariadb-server

2、修改配置文件

[root@owncloud ~]# vi /etc/my.cnf
# add follows within [mysqld] section
[mysqld]
character-set-server=utf8

3、启动服务并设置开机启动

[root@owncloud ~]# systemctl start mariadb
[root@owncloud ~]# systemctl enable mariadb

4、初始化数据库

[root@owncloud ~]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.Enter current password for root (enter for none):
OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.# set root password
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..... Success!By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
# remove anonymous users
Remove anonymous users? [Y/n] y... Success!Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.# disallow root login remotely
Disallow root login remotely? [Y/n] y... Success!By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.# remove test database
Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.# reload privilege tables
Reload privilege tables now? [Y/n] y... Success!Cleaning up...All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.Thanks for using MariaDB!

5、连接数据库

[root@owncloud ~]# mysql -u root -p
Enter password:     # MariaDB root password you set
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.37-MariaDB MariaDB ServerCopyright (c) 2000, 2014, Oracle, Monty Program Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

6、查看用户

MariaDB [(none)]> select user,host,password from mysql.user;
+------+-----------+-------------------------------------------+
| user | host      | password                                  |
+------+-----------+-------------------------------------------+
| root | localhost | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| root | 127.0.0.1 | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| root | ::1       | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
+------+-----------+-------------------------------------------+
3 rows in set (0.00 sec)

7、显示数据库

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)MariaDB [(none)]> exit
Bye

8、配置防火墙

[root@owncloud ~]# firewall-cmd --add-service=mysql --permanent
success
[root@owncloud ~]# firewall-cmd --reload
Success

四、安装owncloud
1、安装软件包

[root@owncloud ~]# yum --enablerepo=epel -y install php-pear-MDB2-Driver-mysqli php-pear-Net-Curl

2、下载网络源

[root@owncloud ~]# wget http://download.owncloud.org/download/repositories/stable/CentOS_7/ce:stable.repo -P /etc/yum.repos.d

3、安装owncloud

[root@owncloud ~]# yum -y install owncloud

4、重启http

[root@owncloud ~]# systemctl restart httpd

5、创建ownclou数据库及用户

[root@owncloud ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.47-MariaDB MariaDB ServerCopyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> create database owncloud;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on owncloud.* to owncloud@'localhost' identified by 'Changeme_123';  #创建用户
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye

6、配selinux

[root@owncloud ~]# semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/owncloud/apps
[root@owncloud ~]# semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/owncloud/config
[root@owncloud ~]# restorecon /var/www/html/owncloud/apps
[root@owncloud ~]# restorecon /var/www/html/owncloud/config

9、登录界面

http://IP/owncloud

创建admin用户,配置数据文件夹及数据库信息

登录

参考:
https://owncloud.org/

建立自己的私有云储存服务【ownCloud】相关推荐

  1. KodExplorer可道私有云——建立自己的私有云储存服务

    KodExplorer可道云(以下简称KOD)是一款用来创建属于自己的私有云存储的工具,可以完全掌控数据,支持在纯局域网内部署使用.支持链接分享.文件预览.用户权限设置等,还可以通过插件/轻应用的方式 ...

  2. 如何云储存服务实现视频存储

    如何云储存服务实现视频存储 为了方便直播/监控用户使用云存储产品来存储音视频数据,阿里云的云存储(简称OSS)产品近期推出了RTMP收流功能.用户可以直接用RTMP协议将音视频数据上传到云存储OSS. ...

  3. VMware+CentOS7搭建私有云桌面服务

    VMware+CentOS7搭建私有云桌面服务 1. 安装VMware虚拟机工作台 官网下载安装包 版本:14.1.3 Pro 地址:https://my.vmware.com/en/web/vmwa ...

  4. 容器赋能AI-人工智能在360私有云容器服务上的实践

    女主宣言 360私有云容器服务团队和人工智能研究院团队一起配合,在云端提升机器学习的效能方面进行了深入的研究和实践,为业务提供了"人脸检测"."花屏检测".&q ...

  5. 微信聊天记录云储存服务怎么开通使用?

    什么是微信聊天记录云储存服务? 现在的微信聊天记录是本地储存,不仅占用本地手机储存空间,还会随着时间越来长造成手机运行缓慢.而微信上线聊天记录云储存后,可以关闭本地消息记录存储功能,所有消息记录.文件 ...

  6. 梅林固件路由器搭建私有云盘服务

    梅林固件路由器搭建私有云盘服务 1.开放路由器ssh登录 2.ssh登录路由器 3.安装服务 安装entware vi entware-ngu-setup.sh # 复制文末脚本内容 chmod +x ...

  7. 使用docker快速部署owncloud私有云存储服务

    点击在我的博客 xuxusheng.com 中查看,有更好的排版哦~ owncloud 是个好东西,不管是作为私有云来存储文件,或者是分享文件给其他人.多人协作.本地文件夹映射都是非常好用的功能,在各 ...

  8. 【华为云技术分享】云小课 | 如何通过虚拟私有云保障服务安全

    当您在云上部署了自己的服务后,接下来就要考虑如何保障服务的安全性了. 比如说,绑定了EIP的ECS仅允许访问公网,但不允许被公网用户访问. 再比如说,要防止某个病毒的攻击,需要隔离具有漏洞的应用端口. ...

  9. 如何通过虚拟私有云保障服务安全【华为云分享】

    在第十六课的时候,我们一起学习了如何规划网络,部署云上业务.当您在云上部署了自己的服务后,接下来就要考虑如何保障服务的安全性了. 比如说,绑定了EIP的ECS仅允许访问公网,但不允许被公网用户访问. ...

最新文章

  1. 学校测试-2015-03-01
  2. ora-01950 对表空间无权限
  3. php mysql 大量读取_PHP使用PDO从mysql读取大量数据处理详解
  4. Python自动化之语法基础
  5. 如何击败腾讯_击败股市
  6. linux系统是微内核结构,科普:微内核操作系统现状
  7. vs2017python配置opencv_关于VS2017配置OpenCV出现无法打开文件“opencv_ml249d.lib”的解决方案...
  8. NBU备份数据库时的ORA-27211错误分析解决
  9. 【扫描线】【POJ-1177】Picture【周长并】
  10. JDK 8 foreach的用法
  11. 数据智能,慧眼识“真”——个推大数据风控产品亮相
  12. 关于阿里巴巴编程规范
  13. notes系统服务器地址,在Notes客户端和Domino服务器上,服务器地址的缓存(Cache)存放在哪里...
  14. C++11中的原子操作(atomic operation)和自旋锁
  15. CentOS7下宽带连接
  16. vue 会议室日历预约组件
  17. 为什么团建这么招人恨
  18. TensorRT INT8量化原理与实现(非常详细)
  19. 2021年高处安装、维护、拆除考试试卷及高处安装、维护、拆除证考试
  20. 数据处理-500行Python代码处理ave/chunk命令下1d和2d分块数据

热门文章

  1. MyBatis逆向工程 Generator
  2. CWnd SetCapture ReleaseCapture GetCapture
  3. ​【HZNUOJ】【C系列2.10】失恋 ​
  4. Uni-app时间戳
  5. css 压缩后出现了问题,yuicompressor 压缩css问题怎么解决?—详细步骤
  6. 【iCore、iBoard 电子学堂教程】《QuartusII12.0安装与使用指南.REV0》
  7. 三星关闭shell提示_shell关闭指定进程
  8. python最新官网图片_python爬取福利网站图片完整代码
  9. JavaScript高手之路:原型和原型链
  10. 那个号称能让中国断网的“网络中立法案”是什么鬼?