GNU/Linux >> Linux の 問題 >  >> Ubuntu

Ubuntu16.04にEasyEngineでMauticをインストールする方法

この記事では、オープンソースのマーケティング自動化ツールであるMauticのインストールについて学習します。セットアッププロセスの一部では、EasyEngineを使用してLAMPスタックのデプロイを自動化します。

Mauticを使用して、リードを作成し、オンラインマーケティングキャンペーンとランディングページを管理できます。

このチュートリアルは本番環境で公開されているセットアップを対象としているため、開始する前にクラウドサーバーインスタンスが必要です。一部の手順では、ドメイン設定をセットアップするためにDNSパネルにもアクセスする必要があります(パブリックドメイン設定のセットアップ方法はここで説明します。

次の要件を満たすVPSから始めることができます。

-Ubuntu16.04.0364ビットまたは最新のものが利用可能
-1CPU
--2 GB RAM
-30GBハードドライブ

1。システムバージョンを確認してください

a。サーバーにログインして、システムが最新であることを確認します。

ssh root@yourserverip
lsb_release -a

例:

  root@newvps:~# lsb_release -a
  No LSB modules are available.
  Distributor ID:    Ubuntu
  Description:    Ubuntu 16.04.3 LTS
  Release:    16.04
  Codename:    xenial

b。必要に応じてシステムアップデートを実行して、最新のシステムパッチとアップグレードをインストールします。

apt update && apt upgrade -y
reboot

2。 DNS構成を確認してください

a。 DNS設定が正しいことを確認してください。1つのAレコードがサーバーIPを指し、CNAMEレコードの「www」サブドメインがドメインを指します。

dig www.yoursitedomain.net

例:

  user@workstation:~$ dig www.yoursitedomain.net
  
  ; <> DiG 9.9.5-9+deb8u14-Debian <> www.yoursitedomain.net
  ;; global options: +cmd
  ;; Got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9405
  ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
  
  ;; QUESTION SECTION:
  ;www.yoursitedomain.net.        IN    A
  
  ;; ANSWER SECTION:
  www.yoursitedomain.net.    300    IN    CNAME    yoursitedomain.net.
  yoursitedomain.net.    60    IN    A    yourserverip
  
  ;; Query time: 96 msec
  ;; SERVER: 192.168.10.1#53(192.168.10.1)
  ;; WHEN: Sat Sep 16 03:56:05 CST 2017
  ;; MSG SIZE  rcvd: 68

3。ドメインに一致するようにVPSの名前を設定します

a。ルートとしてUbuntuのDNSファイルを変更します。

ssh root@yourserverip
sudo -i
cp -av /etc/hostname /etc/hostname.orig
cp -av /etc/hosts /etc/hosts.orig
echo "yoursitedomain.net" > /etc/hostname
echo -e "\nyourserverip          yoursitedomain.net          yoursitedomain" >> /etc/hosts
hostname yoursitedomain.net

b。新しいDNS設定を使用して新しいインスタンスを再起動し、元に戻します。新しい構成はすでに機能しているはずです。

reboot
ssh root@yourserverip

4。 EasyEngineを使用してアプリケーションのデプロイを準備する

a。以下のコマンドラインをrootとして使用してEasyEngineをインストールします。

sudo -i
wget -qO ee rt.cx/ee && sudo bash ee

b。 Easy Engineを使用して、Let's Encryptのサポートを含め、MySQL、NGINX、およびPHPをサーバーにデプロイします。

ee site create yoursitedomain.net --mysql --letsencrypt

例:

  root@yoursitedomain:~# ee site create yoursitedomain.net --mysql --letsencrypt
  Adding repository for MySQL, please wait...
  Adding repository for NGINX, please wait...
  Adding repository for PHP, please wait...
  Updating apt-cache, please wait...
  Installing packages, please wait...
  Downloading MySQLTuner           [Done]
  Reload : postfix   [OK]
  Reload : nginx     [OK]
  Restart : php5.6-fpm[OK]
  Reload : mysql     [OK]
  Running pre-update checks, please wait...
  Setting up NGINX configuration     [Done]
  Setting up webroot         [Done]
  Setting up database        [Done]
  Reload : nginx     [OK]
  HTTP Auth User Name: easyengine
  HTTP Auth Password : 4ZOQc2
  Successfully created site http://yoursitedomain.net
  Letsencrypt is currently in beta phase. 
  Do you wish to enable SSl now for yoursitedomain.net?
  Type "y" to continue [n]:y
  Please Wait while we fetch SSL Certificate for your site.
  It may take time depending upon network.
  Let's Encrypt successfully setup for your site
  Your certificate and chain have been saved at /etc/letsencrypt/live/yoursitedomain.net/fullchain.pem
  Configuring Nginx SSL configuration
  Adding /var/www/yoursitedomain.net/conf/nginx/ssl.conf
  Adding /etc/nginx/conf.d/force-ssl-yoursitedomain.net.conf
  Added HTTPS Force Redirection for Site  http://yoursitedomain.net
  Creating Cron Job for cert auto-renewal
  Reload : nginx     [OK]
  Congratulations! Successfully Configured SSl for Site  https://yoursitedomain.net
  Your cert will expire within 89 days.
  root@yoursitedomain:~# 

5。 Mauticをダウンロードしてインストールする

a。アプリケーションのWebディレクトリを使用してGitHubからMauticソースをダウンロードします。

cd /var/www/yoursitedomain.net/
rm -rf htdocs
wget https://github.com/mautic/mautic/archive/master.zip
unzip master.zip
mv mautic-master htdocs
cd htdocs

b。 PHP Composerをダウンロードしてインストールし、インストールプロセスを完了します。

apt -y install curl
curl -s https://getcomposer.org/installer | php
mv -v composer.phar /usr/local/bin/composer
composer install
cd ..
chown -R www-data: htdocs

6。 PHP、MySQL、Nginxを調整して、Mauticアプリケーションで動作するようにします

a。 MySQLサーバーのrootパスワードを取得します。

cat /etc/mysql/conf.d/my.cnf


b。 MySQLサーバーにアクセスし、Mauticのユーザーとデータベースを作成します。

mysql -uroot -p
CREATE DATABASE mautic_data;
CREATE USER 'mautic_user'@'localhost' IDENTIFIED BY 'RRl4$3W7fvpdKd#OVNV';
GRANT ALL PRIVILEGES ON  mautic_data.* TO 'mautic_user'@'localhost';

例:

  root@yoursitedomain:/var/www/yoursitedomain.net# mysql -uroot -p
  Enter password: 
  Welcome to the MariaDB monitor.  Commands end with ; or \g.
  Your MariaDB connection id is 27
  Server version: 10.1.26-MariaDB-1~xenial mariadb.org binary distribution
      
  Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
      
  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
  MariaDB [(none)]> CREATE DATABASE mautic_data;
  Query OK, 1 row affected (0.00 sec)
      
  MariaDB [(none)]> CREATE USER 'mautic_user'@'localhost' IDENTIFIED BY 'RRl4$3W7fvpdKd#OVNV';
  Query OK, 0 rows affected (0.00 sec)
      
  MariaDB [(none)]> GRANT ALL PRIVILEGES ON  mautic_data.* TO 'mautic_user'@'localhost';
  Query OK, 0 rows affected (0.00 sec)
      
  MariaDB [(none)]> quit
  Bye

c。 PHPFastCGIのPHP構成を更新します。

sed -i "47ialways_populate_raw_post_data = -1" /etc/php/5.6/fpm/php.ini

d。 Nginx構成を更新して、SSLサイトバージョンへのリダイレクトが有効になっている場合にMauticがアセットにアクセスする際の問題を修正します。

cat "rewrite ^/index.php/(.*)$ /$1 last;" > /var/www/yoursitedomain.net/conf/nginx/urlfix.conf

e。ファイルの所有権が正しく設定されていることを確認してください。

chown www-data: /var/www/yoursitedomain.net/conf/nginx/urlfix.conf

f。 PHPFastCGIおよびNginxサービスを再起動します。

service php5.6-fpm restart
systemctl restart nginx

7。 Mauticセットアップウィザードを実行します

a。ブラウザを開き、次のURLを入力します:https://yoursitedomain.net設定ウィザードを開始します。

b。セットアップ中に、下のボックスのように、必ずデータベース設定を入力してください。

データベース設定

ユーザー:mautic_user
パス:RRl4 $ 3W7fvpdKd#OVNV
db:mautic_data

c。アプリケーションの管理者ユーザーとパスワードを設定します(データベースユーザーとパスワードと同じであってはなりません)

モーティックアドミニストレーター

ユーザー:mautic-admin
パス:F1e#vQueb + Jouwegibyu

d。セットアップウィザードが終了したら、サーバーコンソールに戻り、これらのcronジョブを追加します。

# Setting up Mautic cron jobs,
# please refer to https://www.mautic.org/docs/en/setup/cron_jobs.html for further details

# Updating Contact Segments
0,15,30,45  * * * *  /usr/bin/php /var/www/yoursitedomain.net/htdocs/app/console mautic:segments:update

# Campaign Updates
5,20,35,50  * * * *  /usr/bin/php /var/www/yoursitedomain.net/htdocs/app/console mautic:campaigns:rebuild

# Email Delivery
10,25,40,55 * * * *  /usr/bin/php /var/www/yoursitedomain.net/htdocs/app/console mautic:emails:send

c。 IPルックアップライブラリをダウンロードしてデプロイし、mauticのセットアップを完了します。

php /var/www/yoursitedomain.net/htdocs/app/console mautic:iplookup:download
chown -R www-data: /var/www/yoursitedomain.net
service php5.6-fpm restart
systemctl restart nginx

この時点で、Mauticサーバーが稼働しているはずなので、キャンペーンの設定方法とeコマースサイトのランディングページの作成方法については、サイトの公式ドキュメントから始めることをお勧めします。


Ubuntu
  1. Ubuntu18.04とDebianにEasyEngineでWordPressをインストールする方法

  2. Ubuntu16.04にNginxでMediaWikiをインストールする方法

  3. Ubuntu 20.04 に .NET 5 をインストールする方法

  1. Ubuntu15.10にNginxを使用してMagentoをインストールする方法

  2. Ubuntu15.10にNginxでMailpileをインストールする方法

  3. Ubuntu15.10でNginxを使用してRedmine3をインストールする方法

  1. Ubuntu15.10にNginxを使用してPiwikをインストールする方法

  2. UbuntuでDockerを使用してONLYOFFICE8.9.0をインストールする方法

  3. Ubuntu16.04でNginxを使用してRedmine3.2をインストールする方法