Centos7 under Nginx+owncloud+php+mysql to build personal private cloud

Source: Internet
Author: User
Tags fpm owncloud

Centos7.1 1053 minimized installation Lnmp through Yum installation, because the CENTOS7 does not have the Yum source MySQL, so to install the MySQL yum source itself, but installed, in my this Yum installed only dozens of K speed, So simply go to the Yum source download Mysql-server rpm package, and then through the Yum installed RPM package, save a lot of time, LNMP build here no longer say, remember to close SELinux or will prompt file not found.

One, download owncloud and unzip the site Directory

[Email protected] ~]# Axel https://download.owncloud.org/community/owncloud-8.0.3.tar.bz2

Second, add Nginx virtual host

This configuration file with Baidu to find a half-day, and finally Google a bit to find ... Before going to the official website of the document did not find, Google search out of ... There are two kinds of configuration on the official website to open SSL, and how to change to No SSL, here I posted my own use of no SSL configuration file.

upstream php-handler {  server 127.0.0.1:9000;   #server  unix:/var/run/ php5-fpm.sock;  }server {  listen 8080;  server_name  cloud.example.com;  # path to the root of your installation   root /usr/share/nginx/html/owncloud/;  # set max upload size   client_max_body_size 10g;  fastcgi_buffers 64 4k;  # disable  gzip to avoid the removal of the etag header  gzip  off;  # uncomment if your server is build with the  ngx_pagespeed module  # This module is currently not  supported.   #pagespeed  off;  rewrite ^/caldav (. *) $ /remote.php/caldav$1  redirect;  rewrite ^/carddAV (. *) $ /remote.php/carddav$1 redirect;  rewrite ^/webdav (. *) $ /remote.php/ webdav$1 redirect;  index index.php;  error_page 403 /core/templates/ 403.php;  error_page 404 /core/templates/404.php;  location = / robots.txt {    allow all;    log_not_found off;     access_log off;    }location ~ ^/(?: \. htaccess|data|config|db_structure\.xml| README) {    deny all;    }  location / {    # The following 2 rules are only needed with  webfinger   rewrite ^/.well-known/host-meta /public.php?service=host-meta last;    rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;    rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;   rewrite  ^/.well-known/caldav /remote.php/caldav/ redirect;   rewrite ^ (/core/doc/[ ^\/]+/) $ $1/index.html;   try_files  $uri   $uri/ /index.php;    }   location ~ \.php (?: $|/)  {   fastcgi_split_path_info  ^ (. +\.php) (/.+) $;   include fastcgi_params;   fastcgi_param  script_filename  $document _root$fastcgi_script_name;   fastcgi_param path_info $ fastcgi_path_info;   fastcgi_pass php-handler;   }   #  optional: set long expires header on static assets    Location ~* \. (?: jpg|jpeg|gif|bmp|ico|png|css|js|swf) $ {       expires 30d;   &nbSp;    # optional: don ' t log access to assets          access_log off;   }  }

Third, restart Nginx and visit

Access error, the lack of necessary PHP module, execute the following command, remember to restart the PHP-FPM.

650) this.width=650; "Src=" Http://7teagq.com1.z0.glb.clouddn.com/owncloudQQ%E6%88%AA%E5%9B%BE20150504104135.png " Width= "799" height= "565" alt= "Owncloudqq20150504104135.png"/>

[email protected] ~]# Yum install-y php-dom php-xmlwriter php-gd

You can refresh it again.

Iv. Configuration Database

Mysql> Grant All on * * to ' everyoo ' @ ' percent ' identified by ' Everyoo '; Query OK, 0 rows affected (0.03 sec) mysql> flush privileges; Query OK, 0 rows affected (0.02 sec)

Prompt again for error, permission issue, missing Data directory

650) this.width=650; "Src=" Http://7teagq.com1.z0.glb.clouddn.com/owncloudQQ%E6%88%AA%E5%9B%BE20150505103724.png " Width= "401" height= "361" alt= "Owncloudqq20150505103724.png"/>

[Email protected] owncloud]# mkdir data[[email protected] owncloud]# chown-r Apache.apache.

Visit again, do not know why I use localhost and 127.0.0.1 always not.

650) this.width=650; "Src=" Http://7teagq.com1.z0.glb.clouddn.com/owncloudQQ%E6%88%AA%E5%9B%BE20150505103905.png " Width= "401" height= "268" alt= "Owncloudqq20150505103905.png"/>

Had to use the IP address of this machine, but still will error, appeared a prefix database user, not I fill in that.

650) this.width=650; "Src=" Http://7teagq.com1.z0.glb.clouddn.com/owncloudQQ%E6%88%AA%E5%9B%BE20150505103944.png " Width= "363" height= "322" alt= "Owncloudqq20150505103944.png"/>

Just go to modify the configuration file for the one you created.

[Email protected] owncloud]# vim config/config.php


650) this.width=650; "Src=" Http://7teagq.com1.z0.glb.clouddn.com/owncloudQQ%E6%88%AA%E5%9B%BE20150505104021.png " Width= "485" height= "169" alt= "Owncloudqq20150505104021.png"/>

You can configure it again.

650) this.width=650; "Src=" Http://7teagq.com1.z0.glb.clouddn.com/owncloudQQ%E6%88%AA%E5%9B%BE20150505105126.png " Width= "height=" 430 "alt=" Owncloudqq20150505105126.png "/>

This article is from the "Linuxu" blog, make sure to keep this source http://linuxu.blog.51cto.com/9471357/1641990

Centos7 under Nginx+owncloud+php+mysql to build personal private cloud

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.