2016年10月5日 星期三

Setup ownCloud 2016-09-15

Setup ownCloud  2016-09-15

OS : Windows 10 pro , 64bit x64
(LAMP 是 Linux + Apache + MySQL + PHP)
VMware : VMware® Workstation 12 Pro, 12.1.0 build-3272444
CentOS (min): CentOS Linux release 7.2.1511 (Core)  (cat /etc/centos-release)
CentOS root password : P#P
MariaDB : mariadb-server-5.5.50-1.el7_2.x86_64  ;    mariadb-5.5.50-1.el7_2.x86_64
                  (yum -y install mariadb-server mariadb)
MariaDB root password : P#P
MariaDB database name : ownclouddb
MariaDB login user : ownclouduser
MariaDB login user password : centos
yum install wget
yum install bzip2
ownCloud : owncloud-9.1.0 (https://download.owncloud.org/community/owncloud-9.1.0.tar.bz2
ownCloud admin login : rcwmadmin
ownCloud admin password : P#P
List all installed package
yum list installed
CentOS 7 Upgrade to PHP 5.5
To upgrade to PHP 5.5, use the Red Hat Software Collections (SCL) repository.
Follow these steps to install PHP 5.5 from SCL. First install the SCL repository:
yum install centos-release-scl
Then install PHP 5.5 and these modules:
yum install php55 php55-php php55-php-gd php55-php-mbstring
You must also install the updated database module for your database.
This installs the new PHP 5.5 module for MySQL/MariaDB:
yum install php55-php-mysqlnd
Disable loading the old PHP Apache modules by changing their names:
mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php54.off
mv /etc/httpd/conf.modules.d/10-php.conf /etc/httpd/conf.modules.d/10-php54.off
Copy the PHP 5.5 Apache modules into place:
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/
Then restart Apache:
service httpd restart
Verify with phpinfo that your Apache server is using PHP 5.5 and loading the correct modules; see PHP Version and Information to learn how to use phpinfo.
禁用SELinux
1) 永久方法 – 需要重启服务器
修改 /etc/selinux/config 文件中设置 SELINUX=disabled ,然后重启服务器。
2) 临时方法 – 设置系统参数
使用命令 setenforce 0
Add "rcwm.asuscomm.com:XXXX" XXXX" as trusted domain
config/config.php
'rcwm.asuscomm.com:XXXX'
ownCloud Default data path : '/var/www/owncloud/data'
mount cdrom
mkdir /mnt/cdrom
(***** start vmware tool install)
mount /dev/sr0 /mnt/cdrom
yum install perl gcc make kernel-headers kernel-devel -y
LAMP :
Install PHP : # yum install php-mysql php-json php-xml php-mbstring php-zip php-gd curl php-curl php-pdo
为ownCloud设置数据库
让我们来创建一个名为'ownclouddb'和数据库用户'ownclouduser'以及密码是'centos'的数据库。
# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 66
Server version: 5.5.34-MariaDB MariaDB Server
Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE ownclouddb;
Query OK, 1 row affected (0.04 sec)
MariaDB [(none)]> GRANT ALL ON ownclouddb.* TO ownclouduser@localhost IDENTIFIED BY 'centos';
Query OK, 0 rows affected (0.01 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.01 sec)
MariaDB [(none)]> exit
Bye
download and pre-set ownCloud
# wget https://download.owncloud.org/community/owncloud-9.1.0.tar.bz2
用命令解压tar压缩包:
# tar xvf owncloud-9.1.0.tar.bz2
移动解压后的目录到你的apache root目录 (例如 /var/www/html/)
# mv owncloud/ /var/www/html/
设置一下目录的所有权和权限:
# chown -R apache:apache /var/www/html/owncloud/
# chmod 777 /var/www/html/owncloud/config/
启用apache重写模式。
编辑文件 “/etc/httpd/conf/httpd.conf”,
# vi /etc/httpd/conf/httpd.conf
查找并修改 AllowOverride None 为 Allowoverride All.
[...]
     AllowOverride All
[...]
最后,重启apachehttpd和mysql服务。
# service mysql restart
# service httpd restart
Setup ownCloud
通过你的网页浏览器导航到 http://ip-address/owncloud 或 http://domain-name/owncloud 。
注意:如果遇到任何权限错误,禁用SELinux并再试一次。
自己的云的主页将出现。你将被要求创建一个新的管理员账户。输入管理员账户信息。
然后点击 Advanced 下拉按钮,选择mysql并输入mysql数据库名,数据库用户和密码。最后点击 Finish setup 来完成安装。




这是我的ownCloud界面的样子:














沒有留言:

張貼留言