码迷,mamicode.com
首页 > 其他好文 > 详细

部署私有云网盘owncloud

时间:2018-08-03 18:02:07      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:rpm -ivh   ring   cat   star   x86_64   chown   files   mod   文件   

环境说明:

[root@localhost ~]# cat /etc/redhat-release 
CentOS release 6.9 (Final)
[root@localhost ~]# 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

[root@localhost ~]# 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%]
[root@localhost ~]# yum -y install mysql-server mysql-devel

配置my.cnf

[root@localhost ~]# vim /etc/my.cnf

[mysqld]
innodb_file_per_table

启动MySQL

[root@localhost ~]# service mysqld start
[root@localhost ~]# chkconfig mysqld on

配置MySQL

[root@localhost ~]# mysql_secure_installation

创建数据库

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

安装apache

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

安装PHP

[root@localhost ~]# 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%]
[root@localhost ~]# yum repolist
[root@localhost ~]# 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
[root@localhost ~]# cat /etc/my.cnf | grep socket
socket=/var/lib/mysql/mysql.sock            #查看sock文件路径
[root@localhost ~]# 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
[root@localhost ~]# /etc/init.d/php-fpm restart
停止 php-fpm:                    [确定]
正在启动 php-fpm:                 [确定]

下载配置owncloud

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

  

访问http://IP/owncloud

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

技术分享图片

 

 配置完成后你会看到

技术分享图片

 

部署私有云网盘owncloud

标签:rpm -ivh   ring   cat   star   x86_64   chown   files   mod   文件   

原文地址:https://www.cnblogs.com/LuckWJL/p/9415324.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!