CentOS 7 怎样安装 OwnCloud 7 私有云
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS 7 怎样安装 OwnCloud 7 私有云相关的知识,希望对你有一定的参考价值。
参考技术A 安装方法如下:一、更新安装服务器。1、安装CentOS 7默认最小配置然后安装目前所有的更新:yum -y update2、接下来,需要安装php,Apache Web服务器和mysql服务器和PHP扩展:yum install httpd php php-mysql mariadb-server mariadb sqlite php-dom php-mbstring php-gd php-pdo wget vim3、设置SELinux允许owncloud写数据:setsebool -P httpd_unified 14、防火墙设置:firewall-cmd --permanent --zone=public --add-service=httpfirewall-cmd --permanent --zone=public --add-service=httpsfirewall-cmd --reload5、使用下面的命令启动Apache:systemctl start httpd/community/owncloud-7.0.0.tar.bz2解压文件:tar -jxvf owncloud-7.0.0.tar.bz2 -C /var/www/html/9、接下来需要为Web服务器上文件目录设置读写权限:chown -R apache.apache /var/www/html/owncloud/二、数据库配置1、配置MariaDB实例:mysql_secure_installation;在设置过程这都输入 Y 并回车。2、创建 owncloud 数据库和用户。登录到MySQL服务器,使用以下命令:mysql -u root -p3、接下来,需要创建owncloud用户和权限:mysql> create database owncloud;mysql> create user ‘owncloud’@’localhost’ identified by’somedatabasepassword';mysql> grant all on owncloud.* to ‘owncloud’@’localhost';mysql> flush privileges;mysql> quit;4、Apache服务器配置打开编辑器编辑owncloud外部配置文件,使用vim:vim /etc/httpd/conf.d/owncloud.conf在配置文件中添加以下行:Alias /owncloud /var/www/html/owncloudOptions Indexes FollowSymLinksAllowOverride AllOrder allow,denyallow from all5、启动Apache和MariaDB服务:systemctl start httpd.servicesystemctl start mariadb.service三、owncloud配置打开浏览器访问ip地址/owncloud,将显示初始owncloud设置页。必须要配置。install OwnCloud9 on CentOS7
WonCloud9下载地址:
https://download.owncloud.org/community/owncloud-9.1.1.zip
//安装配置数据库
#yum install mariadb-server mariadb
# systemctl start mariadb
# systemctl enable mariadb
# mysql_secure_installation
//安装配置apache服务器、php
# yum install httpd
# systemctl start httpd
# systemctl enable
# yum install centos-release-scl -y
# yum install php55 php55-php php55-php-gd php55-php-mbstring php55-php-mysqlnd -y
# cp /opt/rh/httpd24/root/etc/httpd/conf.d/php55-php.conf /etc/httpd/conf.d/
# cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/10-php55-php.conf /etc/httpd/conf.modules.d/
# cp /opt/rh/httpd24/root/etc/httpd/modules/libphp55-php5.so /etc/httpd/modules/
# systemctl restart httpd
# unzip owncloud-9.1.1.zip
# ls
info.php owncloud owncloud-9.1.1.zip
//新建数据库
# mysql -u root -h 127.0.0.1 -p
MariaDB [(none)]> show databases;
MariaDB [(none)]> create database ocld;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> show databases;
MariaDB [(none)]> quit;
//修改目录权限
参考【https://doc.owncloud.org/server/9.1/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions】
#chown -R apache:apache /var/www/html/owncloud
#chmod 0770 owncloud
You can find your HTTP user in your HTTP server configuration files. Or you can use PHP Version and Information(Look for the User/Group line).
- The HTTP user and group in Debian/Ubuntu is
www-data
.- The HTTP user and group in Fedora/CentOS is
apache
.- The HTTP user and group in Arch Linux is
http
.- The HTTP user in openSUSE is
wwwrun
, and the HTTP group iswww
.
以上是关于CentOS 7 怎样安装 OwnCloud 7 私有云的主要内容,如果未能解决你的问题,请参考以下文章