天天看點

centos6搭建私有雲

網盤,又叫“雲存儲”。國内的有百度雲、華為網盤等。雲,分公有雲和私有雲以及混合雲。

實驗環境

centos6.9_x64

實驗軟體

latest.rpm

owncloud-7.0.2.tar.bz2

軟體安裝

rpm -ivh latest.rpm

yum clean all

yum makecache -y

yum -y install httpd mysql mysql-server

yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql

yum -y install php55w  php55w-bcmath php55w-cli php55w-common  php55w-devel php55w-fpm    php55w-gd php55w-imap  php55w-ldap php55w-mbstring php55w-mcrypt php55w-mysql   php55w-odbc   php55w-pdo php55w-pear php55w-pecl-igbinary  php55w-xml php55w-xmlrpc php55w-opcache php55w-intl php55w-pecl-memcache

service mysqld restart

mysqladmin -uroot password 資料庫密碼

mysql -uroot -p資料庫密碼 

Welcome to the MySQLmonitor.  Commands end with ; or \g.

Your MySQL connection idis 3

Server version: 5.1.73Source distribution

Copyright (c) 2000, 2013,Oracle and/or its affiliates. All rights reserved.

Oracle is a registeredtrademark of Oracle Corporation and/or its

affiliates. Other namesmay be trademarks of their respective

owners.

Type 'help;' or '\h' forhelp. Type '\c' to clear the current input statement.

mysql>

vim /etc/httpd/conf/httpd.conf

#ServerNamewww.example.com:80

ServerName                  *:80

#AddTypeapplication/x-tar .tgz

AddType application/x-tar.tgz

AddType application/x-httpd-php .php

<Directory />

    Options FollowSymLinks

    AllowOverride None

</Directory>

    AllowOverride All

touch /var/www/html/test.php

vim /var/www/html/test.php

<?php

phpinfo();

?>

service httpd restart (生産環境建議使用reload)

mysql -uroot -p資料庫密碼

mysql> create database ownclouddb;

Query OK, 1 rowaffected (0.00 sec)

mysql> GRANT ALL ON ownclouddb.* TO ownclouduser@localhost IDENTIFIED BY '123456';  123456為資料庫密碼

Query OK, 0 rowsaffected (0.01 sec)

mysql> flush privileges;

Query OK, 0 rowsaffected (0.00 sec)

mysql -uownclouduser -p資料庫密碼

Your MySQL connection idis 5

http://192.168.1.128/test.php

tar xvf owncloud-7.0.2.tar.bz2

mv owncloud /var/www/html/

chown -R apache:apache /var/www/html/owncloud/

chmod -R 777 /var/www/html/owncloud/

http://伺服器ip/owncloud/

<a href="https://s3.51cto.com/wyfs02/M01/98/25/wKiom1k32fTDVkI8AAFGoPmn6Xc819.jpg-wh_500x0-wm_3-wmp_4-s_1477983170.jpg" target="_blank"></a>

<a href="https://s4.51cto.com/wyfs02/M02/98/26/wKioL1k32fbyOiBgAAEZhGIKbag837.jpg-wh_500x0-wm_3-wmp_4-s_4076646140.jpg" target="_blank"></a>

<a href="https://s2.51cto.com/wyfs02/M00/98/B2/wKiom1k_pIijslT7AABO2XG6mn0432.jpg-wh_500x0-wm_3-wmp_4-s_1424750260.jpg" target="_blank"></a>

<a href="https://s1.51cto.com/wyfs02/M00/98/25/wKiom1k32fbQm5AzAADtogfFlFg465.jpg-wh_500x0-wm_3-wmp_4-s_1553387485.jpg" target="_blank"></a>

vim  /etc/php.ini

; This directive allows you to disable certain classes for security reasons.

; It receives a comma-delimited list of class names. This directive is

; *NOT* affected by whether Safe Mode is turned On or Off.

; http://php.net/disable-classes

disable_classes = 删除此行

<a href="https://s3.51cto.com/wyfs02/M00/98/B2/wKioL1k_oVWCpGoNAACUi4H1JIk073.jpg-wh_500x0-wm_3-wmp_4-s_1884287848.jpg" target="_blank"></a>

<a href="https://s5.51cto.com/wyfs02/M02/98/B2/wKiom1k_oVvADQJ7AABqtdqkayE615.jpg-wh_500x0-wm_3-wmp_4-s_4261213627.jpg" target="_blank"></a>

<a href="https://s5.51cto.com/wyfs02/M02/98/B2/wKioL1k_oV6zvmPcAABWLeWtSLc199.jpg-wh_500x0-wm_3-wmp_4-s_3485551087.jpg" target="_blank"></a>

本文轉自 mailfile 51CTO部落格,原文連結:http://blog.51cto.com/mailfile/1933216,如需轉載請自行聯系原作者