在GoDaddy虚拟主机上安装ownCloud私有云

By | 2017年1月13日

The Web Installer is the easiest method for newbies to install ownCloud on their web host like Godaddy or Hostgator. I will go through the installation and also troubleshoot some possible errors that might come up during the installation.

To Install ownCloud on GoDaddy you need:

0. Make sure to select a Linux server as a hosting server. If your site is not being hosted on a linux server or you’re unsure contact GoDaddy, let them know that you need a Linux server as your hosting server.

1. A domain name and hosting account. to be used for ownCloud only unless you know enough to troubleshoot errors without effecting an already running website on that hosting.

2. You need access to your hosting via FTP. Any hosting company will walk you through the FTP set up for free.

3. Go to ownCloud.org, click on Host ownCloud yourself button.

 

Installation:

1. In the Install OwnCloud Server window click on </>Web Installer button, this will open  Install ownCloud using the Web Installer window providing basic instruction on how to upload the file via FTP.

2. The first step has a link that says Right-click here, click on it to download the setup-owncloud.php.

3. Connect to your hosting via FTP and upload setup-owncloud.php to the root directory of your web host.

4. In the web browser enter http://www. yourdomain.com/setup-owncloud.php

5. Follow the instructions to install and configure ownCloud.

If you get “Magic Quotes is enabled. ownCloud requires that it is disabled to work properly.”

1. Access to your hosting via FTP. BACK UP the .htaccess and php.ini

2. Copy or drag out the php.ini to your desktop, right click, open with notepad.

3. In php.ini add these lines:

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off
; Use Sybase-style magic quotes (escape ‘ with ” instead of \’).
magic_quotes_sybase = Off

4. Save it and rename the php.ini to php5.ini

5. Upload php5.ini to the root directory of your web host.

kill web system processes on Linux shared hosting accounts:

    1. Log in to your Godaddy, Account Manager.
    2. From the Products section, click Web Hosting.
    3. Next to the hosting account you want to use, click Launch.
    4. In the Stats & Monitors section of the hosting Control Panel, click the System Processes icon.
    5. Click End Web and follow any prompts.
    6. Reload the phpinfo.php page to see if the desired changes have taken effect.
    7. Done!!!

if you get No input file specified error after disabling Magic Quotes:

Once OwnCloud is installed, Although GoDaddy supports PHP 5, the default PHP.ini file needs a little help. Open the php5.ini file to edit and add the following entry.

cgi.fix_pathinfo = 1

in case cgi.fix_pathinfo = 1 by it self didn’t work then also Configure the .htaccess file to deal with the proper security permissions needed for the application. Just replace the .htaccess file in the ownCloud root directory with this one. remember to back up before applying any changes. If it doesn’t work revert the owncloud .htaccess to original and replace the .htaccess file in the root directory with the following information.

ErrorDocument 403 /core/templates/403.php
ErrorDocument 404 /core/templates/404.php
< IfModule mod_php5.c>
php_value upload_max_filesize 513M
php_value post_max_size 513M
php_value memory_limit 512M
< IfModule env_module>
SetEnv htaccessWorking true
< /IfModule>
< /IfModule>
< IfModule mod_rewrite.c>
Options -Multiviews
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|css|gfx|js|swf|robots\.txt|favicon\.ico)
#RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteRule .* – [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^.well-known/carddav /remote.php/carddav/ [R]
RewriteRule ^.well-known/caldav /remote.php/caldav/ [R]
RewriteRule ^apps/calendar/caldav.php remote.php/caldav/ [QSA,L]
RewriteRule ^apps/contacts/carddav.php remote.php/carddav/ [QSA,L]
RewriteRule ^apps/([^/]*)/(.*\.(css|php))$ index.php?app=$1&getfile=$2 [QSA,L]
RewriteRule ^remote/(.*) remote.php [QSA,L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
< /IfModule>
< IfModule mod_mime.c>
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
< /IfModule>
Options -Indexes