Revive adserverのインストールについて
この記事は、「第2のドワンゴAdvent Calendar 2017」1日目の記事です。
私はドワンゴ社員ではありません。
Revive adserverとは?
https://www.revive-adserver.com/
- 広告管理・配信ツール
- PHPで作られている
「動作を見てみたいなあ」
「誰かの作ったDockerイメージを動かせばいいじゃん」
「なんかバージョン古いな」
ということで、インストールだけやります。
インストール手順はこちら https://www.revive-adserver.com/support/installation/
構成 |
---|
Vagrant
bentoは最高。ubuntu公式の16.04のイメージはユーザ名がvagrantじゃなかったりしてメチャクチャじゃない?
Vagrant.configure("2") do |config| config.vm.box = "bento/ubuntu-16.04" config.vm.network "private_network", ip: "192.168.56.21" end
vagrant up vagrant ssh
Ubuntuに入って作業
# rootで作業 sudo su - root # パッケージを更新する apt update apt upgrade # 必要なパッケージを入れる apt-get install apache2 mysql-server php php-mysql php-mbstring php-gd unzip libapache2-mod-php # (途中、MySQLのパスワードを聞かれるので、適当に答える。) # reviveを配置する cd /usr/local/src wget https://download.revive-adserver.com/revive-adserver-4.1.1.tar.gz tar xvf ./revive-adserver-4.1.1 mv revive-adserver-4.1.1 /var/www/html/revive chown -R www-data:www-data /var/www/html/revive vim /etc/apache2/sites-enabled/revive.conf
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName example.com DocumentRoot /var/www/html/revive ErrorLog ${APACHE_LOG_DIR}/revive-error.log CustomLog ${APACHE_LOG_DIR}/revive-access.log combined <Directory /var/www/html/revive> AllowOverride All Require all granted </Directory> </VirtualHost>
systemctl restart apache2
ブラウザでセットアップ
http://192.168.56.21/revive/ にアクセスする。
Welcome to Revive Adserver 4.1.1
http://192.168.56.21/revive/www/admin/install.php?action=welcome
I Agree >>
を押す。
Provide your database
適当に値を入力する。
Configure your local Revive Adserver system administrator account
適当に値を入力する。
色々とインストールされるので待つ。
Your Revive Adserver installation is complete
Continue >>
を押す。
これで一旦インストール完了ですが、 実際に利用する際は、定期バッチをcronに追加する必要があるようです。
https://documentation.revive-adserver.com/display/DOCS/Running+Maintenance
近況
Revive adserverは正直どうでもいいので近況について書きます。最近はGo言語でサーバー側を書いているのですが、JSONのデコードが簡単だし、コンパイルも早いし、デプロイも簡単そうだしで、悪くない感じがしています。