このチュートリアルでは、 Ubuntu14.04VPSにPimcoreをインストールする方法を紹介します。 PHP-FPMとNginxを使用します。 Pimcoreは、オープンソース、コンテンツ、および製品管理のフレームワークです。これは、高速で柔軟性があり、設計者および開発者にとって使いやすいものです。このガイドは他のLinuxVPSシステムでも機能するはずですが、Ubuntu14.04VPS用にテストおよび作成されています。
SSH経由でVPSにログイン
ssh user@vps_IP
システムを更新し、必要なパッケージをインストールします
[user]$ sudo apt-get update && sudo apt-get -y upgrade [user]$ sudo apt-get install software-properties-common nano wget
MariaDB10.1をインストールします
MariaDBリポジトリをソースリストに追加し、最新のMariaDBサーバーをインストールするには、次のコマンドを実行します。
[user]$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db [user]$ sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.1/ubuntu trusty main' [user]$ sudo apt-get update [user]$ sudo apt-get install -y mariadb-server
インストールが完了したら、次のコマンドを実行してインストールを保護します。
[user]$ mysql_secure_installation
次に、Pimcoreインストール用のデータベースを作成する必要があります。
[user]$ mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE pimcore DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; MariaDB [(none)]> GRANT ALL PRIVILEGES ON pimcore.* TO 'pimcore'@'localhost' IDENTIFIED BY 'strong_password'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> \q
PHPのインストールと構成
PHPバージョン5.6の最新の安定バージョンと必要なすべてのモジュールをインストールするには、次のコマンドを実行します。
[user]$ sudo add-apt-repository -y ppa:ondrej/php5-5.6 [user]$ sudo apt-get update [user]$ sudo apt-get -y install php5-fpm php5-cli php5-json php5-curl php5-gd php5-mysqlnd php5-mcrypt
ユーザー用に新しいPHP-FPMプールを作成します:
[user]$ sudo nano /etc/php5/fpm/pool.d/your_user.conf [your_user] user = your_user group = your_user listen = /var/run/php-fpm-your_user.sock listen.owner = your_user listen.group = your_user listen.mode = 0666 pm = ondemand pm.max_children = 5 pm.process_idle_timeout = 10s pm.max_requests = 200 chdir = /
your_userを自分のユーザー名に変更することを忘れないでください。
PHP-FPMを再起動します:
[user]$ sudo service php5-fpm restart
Pimcoreのインストール
次のコマンドを使用して、Pimcoreインストールのルートディレクトリを作成します。
[user]$ mkdir -p ~/myPimcore.com
ディレクトリに移動します:
[user]$ cd ~/myPimcore.com
wgetを使用して最新リリースをダウンロードします:
[user]$ wget https://www.pimcore.org/download/pimcore-latest.zip
ドキュメントルートでzipファイルを抽出します
[user]$ unzip pimcore-latest.zip
Nginxをインストールして構成する
Ubuntu 14.04にはNginxバージョン1.4が付属しています。Nginxバージョン1.8の最新の安定バージョンをインストールするには、次のコマンドを実行します。
[user]$ sudo add-apt-repository -y ppa:nginx/stable [user]$ sudo apt-get update [user]$ sudo apt-get -y install nginx
次に、新しいNginxサーバーブロックを作成します:
[user]$ sudo nano /etc/nginx/sites-available/myPimcore.com
server { listen 80; server_name your_domain_name; root /home/your_user/myPimcore.com; index index.php; access_log /var/log/nginx/pimcore.access.log; error_log /var/log/nginx/pimcore.error.log; set $getassets ""; if ($uri ~* ^/website/var/assets) { set $getassets "${getassets}A"; } if ($request_method = GET) { set $getassets "${getassets}B"; } if ($getassets = "AB") { rewrite ^ $uri$args last; } location ~* ^(/plugins/(?!.*/static).*|^/pimcore/(?!(static|modules/3rdparty)).*|/website/var/(?!tmp|assets|areas)|^.*modules/.*/static.*|^(vendor|tests|node_modules|phing)/.*|^(bower|package|composer|gulpfile)\.) { return 403; } location / { try_files $uri $uri/ /index.php$args; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php-fpm-your_user.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors off; fastcgi_buffer_size 16k; fastcgi_buffers 4 16k; } location ~* \.(jpe?g|gif|png|bmp|ico|css|js|pdf|zip|htm|html|docx?|xlsx?|pptx?|txt|wav|swf|avi|mp\d)$ { access_log off; log_not_found off; try_files $uri $uri/ /website/var/assets$uri /index.php?$args; expires 1w; } location ~ /\.ht { deny all; } # cache-buster rule for scripts & stylesheets embedded using view helpers rewrite ^\/cache-buster-\d+(.*) $1 break; }を書き換えます。
your_userを自分のユーザー名に変更することを忘れないでください。
シンボリックリンクを作成してサーバーブロックをアクティブ化します:
[user]$ sudo ln -s /etc/nginx/sites-available/myPimcore.com /etc/nginx/sites-enabled/myPimcore.com
Nginx構成をテストし、サービスを再起動します:
[user]$ sudo nginx -t [user]$ sudo service nginx restart
お気に入りのWebブラウザでhttp://myPimcore.com/を開くと、Pimcoreのインストール画面が表示されます。このページで、前に作成したデータベースの詳細、Pimcore管理者の詳細を入力し、[今すぐインストール]ボタンをクリックする必要があります。
それでおしまい。これで、Ubuntu14.04VPSにPimcoreが正常にインストールされました。 Pimcoreのインストールを管理する方法の詳細については、Pimcoreの公式ドキュメントを参照してください。
もちろん、Ubuntu VPSホスティングサービスのいずれかを使用している場合は、これを行う必要はありません。その場合は、専門のLinux管理者にPimcoreのインストールを依頼するだけです。 あなたのために。 24時間年中無休でご利用いただけます。リクエストはすぐに処理されます。
PS 。この投稿が気に入った場合は、左側のボタンを使用してソーシャルネットワーク上の友達と共有するか、下に返信を残してください。ありがとう。