このチュートリアルに従うと、UbuntuVPSにNginxとPHP-FPMを使用してOwnCloud7をインストールするのは簡単な作業です。 OwnCloudは、ファイルの保存、管理、共有などのサービスを提供するWebベースのアプリケーションです。 OwnCloudを使用すると、ファイル、カレンダー、連絡先などを同期して共有できます。すべてのデバイスからどこからでもすべてにアクセスできます。
このチュートリアルでは、UbuntuVPSにNginxとPHP-FPMを備えた最新バージョンのOwnCloudをインストールします。
まず、rootとしてサーバーにログインし、UbuntuLinuxVPSが完全に最新であることを確認します
apt-get update apt-get upgrade
サーバーにMariaDBをインストールします
apt-get install mariadb-server
次のスクリプトを実行してMariaDBサーバーを保護し、ルートパスワードを設定します
mysql_secure_installation - Set root password? [Y/n] y - Remove anonymous users? [Y/n] y - Disallow root login remotely? [Y/n] y - Remove test database and access to it? [Y/n] y - Reload privilege tables now? [Y/n] y
次に、ユーザーrootとしてMariaDBサーバーにログインし、OwnCloud用の新しいユーザーとデータベースを作成します。
mysql -u root -p Enter password: MariaDB [(none)]> CREATE DATABASE owncloud; MariaDB [(none)]> GRANT ALL ON owncloud.* to ownclouduser@localhost identified by 'YOURPASSWORD'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> \q
YOURPASSWORDを変更することを忘れないでください 実際の強力なパスワードを使用します。
Nginx Webサーバー、PHP5-FPM、およびいくつかの追加のPHPパッケージをインストールします
apt-get install nginx php5-fpm php5-common php5-cli php5-json php5-mysql php5-curl php5-intl php5-mcrypt php5-memcache php5-gd
今、彼らの公式ウェブサイトから最新の安定したOwnCloudリリースをダウンロードしてください。この記事を書いている時点では、バージョン7.0.3です
cd /opt/ wget https://download.owncloud.org/community/owncloud-7.0.3.tar.bz2
ダウンロードしたファイルを解凍します
tar -jxvf owncloud-7.0.3.tar.bz2
OwnCloudのファイルは、「/opt」の下の新しい「owncloud」ディレクトリに解凍されます。ディレクトリの所有者を変更する
chown -R www-data:www-data /opt/owncloud
次のコンテンツを使用して、ドメインの新しい仮想ブロックを作成します
nano /etc/nginx/sites-available/yourdomain.tld server { listen 80; server_name yourdomain.tld www.yourdomain.tld; root /opt/owncloud; index index.php; rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect; rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect; rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect; 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 / { 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$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }を含める
次のコマンドを実行してサーバーブロックを有効にします
ln -s /etc/nginx/sites-available/yourdomain.tld /etc/nginx/sites-enabled/
/etc/php5/fpm/pool.d/www.confファイルを開き、以下に示すように「listen」変数を変更します。
listen = 127.0.0.1:9000;
変更を有効にするには、NginxとPHP-FPMを再起動します
service nginx restart service php5-fpm restart
最後に、ブラウザを http:yourdomain.tldに移動します ここで、管理者アカウントと、このチュートリアルで作成したMariaDBの情報を作成する必要があります。このステップで、OwnCloud7のインストールが完了します。
もちろん、UbuntuにOwnCloud 7 with NginxとPHP-FPMをインストールする必要はありません。OwnCloud最適化Linuxホスティングサービスのいずれかを使用している場合は、専門のLinux管理者にNginxを使用してOwnCloud7をインストールするよう依頼できます。あなた。 24時間年中無休でご利用いただけます。リクエストはすぐに処理されます。
PS。 この投稿が気に入った場合は、左側のボタンを使用してソーシャルネットワーク上の友達と共有するか、下に返信を残してください。ありがとう。