ラベル EasyAppointments の投稿を表示しています。 すべての投稿を表示
ラベル EasyAppointments の投稿を表示しています。 すべての投稿を表示

2020年5月7日木曜日

Ubuntu 20.04にEasy!AppointmentsとMariaDBをインストールする

Easy!Appointmentsでスケジュールを管理する事ができます。

〇Easy!Appointmentsの画面


〇インストール方法
1. 以下のコマンドを実行してMariaDBをインストールします。
sudo apt-get update

sudo apt-get -y install mariadb-server

sudo mysql -uroot -e "SET PASSWORD = PASSWORD('root'); FLUSH PRIVILEGES;"

mysql -uroot -proot -e "CREATE DATABASE easyappointments DEFAULT CHARACTER SET utf8mb4;"

mysql -uroot -proot -e "CREATE USER easyappointments@localhost IDENTIFIED BY 'easyappointments';"

mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON easyappointments.* TO 'easyappointments'@'localhost';"

mysql -uroot -proot -e "FLUSH PRIVILEGES;"

2. Easy!Appointmentsをインストールします。
sudo apt-get -y install apache2 \
  php7.4 \
  libapache2-mod-php7.4 \
  php7.4-mysql \
  php7.4-common \
  php7.4-xml \
  php7.4-zip \
  php7.4-mbstring \
  php7.4-curl \
  unzip

sudo mkdir -p /opt/easyappointments

cd /opt/easyappointments

sudo wget https://github.com/alextselegidis/easyappointments/releases/download/1.3.2/easyappointments_1.3.2.zip

sudo unzip easyappointments_1.3.2.zip

sudo cp config-sample.php config.php

sudo sed -i -e "s#http://url-to-easyappointments-directory#http://`hostname`/easyappointments#" /opt/easyappointments/config.php

sudo sed -i -e "s#DB_HOST.*= '';#DB_HOST       = 'localhost';#" /opt/easyappointments/config.php

sudo sed -i -e "s#DB_NAME.*= '';#DB_NAME       = 'easyappointments';#" /opt/easyappointments/config.php

sudo sed -i -e "s#DB_USERNAME.*= '';#DB_USERNAME   = 'easyappointments';#" /opt/easyappointments/config.php

sudo sed -i -e "s#DB_PASSWORD.*= '';#DB_PASSWORD   = 'easyappointments';#" /opt/easyappointments/config.php

sudo sed -i -e "s#LANGUAGE.*= 'english';#LANGUAGE   = 'japanese';#" /opt/easyappointments/config.php

sudo chown -R www-data:www-data /opt/easyappointments

sudo ln -s  /opt/easyappointments /var/www/html

sudo systemctl restart apache2.service

3. ブラウザからhttp://<ホスト名またはIPアドレス>/easyappointments/ にアクセスします。
管理者情報や会社情報を入力し、「Install Easy!Appointments」ボタンをクリックします。


2018年3月19日月曜日

VagrantでEasy!AppointmentsとMariaDBがインストールされた仮想マシン(CentOS7.4)を構築する

Easy!Appointmentsでスケジュールを管理する事ができます。
以下のVagrantfileを使用して、Easy!AppointmentsとMariaDBをインストールした仮想マシン(CentOS7.4)を構築する事ができます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/centos-7.4"
  config.vm.hostname = "co74easyappointmentsmariadb"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "co74easyappointmentsmariadb"
     vbox.cpus = 2
     vbox.memory = 2048
     vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
  end
config.vm.network "private_network", ip: "192.168.55.104", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.104", :netmask => "255.255.255.0"
  config.vm.provision "shell", inline: <<-SHELL
localectl set-locale LANG=ja_JP.UTF-8

# install mariadb
yum -y install mariadb mariadb-server
sudo systemctl enable mariadb.service
sudo systemctl start mariadb.service

# change password and create users and databases.
mysql -uroot -e "SET PASSWORD = PASSWORD('root'); FLUSH PRIVILEGES;"
mysql -uroot -proot -e "CREATE DATABASE easyappointments DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER easyappointments@localhost IDENTIFIED BY 'easyappointments';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON easyappointments.* TO 'easyappointments'@'localhost';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"

# install apache2
yum -y install --enablerepo=remi,remi-php71 httpd php php-devel php-mbstring php-pdo php-mysqlnd php-gd php-xml php-zip
sed -i -e 's#;date.timezone =#date.timezone="Asia/Tokyo"#' /etc/php.ini

# install Easy!Appointments
mkdir -p /opt/easyappointments
cd /opt/easyappointments
yum -y install unzip
wget https://github.com/alextselegidis/easyappointments/releases/download/1.2.1/easyappointments_1.2.1.zip
unzip easyappointments_1.2.1.zip
sed -i -e "s#http://url-to-easyappointments-directory#http://192.168.55.104/easyappointments/#" /opt/easyappointments/config.php
sed -i -e "s#DB_HOST.*= '';#DB_HOST       = 'localhost';#" /opt/easyappointments/config.php
sed -i -e "s#DB_NAME.*= '';#DB_NAME       = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_USERNAME.*= '';#DB_USERNAME   = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_PASSWORD.*= '';#DB_PASSWORD   = 'easyappointments';#" /opt/easyappointments/config.php

chown -R apache:apache /opt/easyappointments
ln -s  /opt/easyappointments /var/www/html
service httpd restart

echo 'access http://192.168.1.104/easyappointments/'
SHELL
end

〇Easy!Appointmentsの初期設定画面


〇Easy!Appointmentsの画面



○関連情報
・Easy!Appointmentsに関する他の記事はこちらを参照してください。

2018年3月9日金曜日

VagrantでEasy!AppointmentsとMySQLがインストールされた仮想マシン(CentOS7.4)を構築する

Easy!Appointmentsでスケジュールを管理する事ができます。
以下のVagrantfileを使用して、Easy!AppointmentsとMySQLをインストールした仮想マシン(CentOS7.4)を構築する事ができます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/centos-7.4"
  config.vm.hostname = "co74easyappointments"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "co74easyappointments"
     vbox.cpus = 2
     vbox.memory = 2048
     vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
  end
  config.vm.network "private_network", ip: "192.168.55.104", :netmask => "255.255.255.0"
  config.vm.network "public_network", ip:"192.168.1.104", :netmask => "255.255.255.0"
  config.vm.provision "shell", inline: <<-SHELL
localectl set-locale LANG=ja_JP.UTF-8

# install mysql
sudo yum -y remove mariadb-libs
yum -y localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum -y install yum-utils
yum-config-manager --disable mysql57-community
yum-config-manager --enable mysql56-community
yum -y install mysql mysql-devel mysql-server mysql-utilities
sudo systemctl enable mysqld.service
sudo systemctl start mysqld.service

# change password and create users and databases.
chkconfig mysqld on
service mysqld start
export MYSQL_ROOTPWD='Root123#'
export MYSQL_PWD=`cat /var/log/mysqld.log | awk '/temporary password/ {print $NF}'`
mysql -uroot --connect-expired-password -e "SET PASSWORD = PASSWORD('$MYSQL_ROOTPWD');"
export MYSQL_PWD=$MYSQL_ROOTPWD
export MYSQL_ROOTPWD='root'
mysql -uroot --connect-expired-password -e "UNINSTALL PLUGIN validate_password;"
mysql -uroot --connect-expired-password -e "SET PASSWORD = PASSWORD('$MYSQL_ROOTPWD'); FLUSH PRIVILEGES;"
mysql -uroot -proot -e "CREATE DATABASE easyappointments DEFAULT CHARACTER SET utf8;"
export MYSQL_PWD=$MYSQL_ROOTPWD

mysql -uroot -proot -e "CREATE USER easyappointments@localhost IDENTIFIED BY 'easyappointments';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON easyappointments.* TO 'easyappointments'@'localhost';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"


# install apache2
yum -y install --enablerepo=remi,remi-php71 httpd php php-devel php-mbstring php-pdo php-mysqlnd php-gd php-xml php-zip
sed -i -e 's#;date.timezone =#date.timezone="Asia/Tokyo"#' /etc/php.ini

# install Easy!Appointments
mkdir -p /opt/easyappointments
cd /opt/easyappointments
yum -y install unzip
wget https://github.com/alextselegidis/easyappointments/releases/download/1.2.1/easyappointments_1.2.1.zip
unzip easyappointments_1.2.1.zip
sed -i -e "s#http://url-to-easyappointments-directory#http://192.168.55.104/easyappointments/#" /opt/easyappointments/config.php
sed -i -e "s#DB_HOST.*= '';#DB_HOST       = 'localhost';#" /opt/easyappointments/config.php
sed -i -e "s#DB_NAME.*= '';#DB_NAME       = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_USERNAME.*= '';#DB_USERNAME   = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_PASSWORD.*= '';#DB_PASSWORD   = 'easyappointments';#" /opt/easyappointments/config.php

chown -R apache:apache /opt/easyappointments
ln -s  /opt/easyappointments /var/www/html
service httpd restart

echo 'access http://192.168.1.104/easyappointments/'
SHELL
end

〇Easy!Appointmentsの初期設定画面


〇Easy!Appointmentsの画面



○関連情報
・Easy!Appointmentsに関する他の記事はこちらを参照してください。

2018年3月5日月曜日

VagrantでEasy!AppointmentsとMariaDBがインストールされた仮想マシン(Debian Stretch/9.3)を構築する

Easy!Appointmentsでスケジュールを管理する事ができます。
以下のVagrantfileを使用して、Easy!AppointmentsとMariaDBをインストールした仮想マシン(Debian Stretch/9.3 )を構築する事ができます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/debian-9.3"
  config.vm.hostname = "db93easyappointmentsmariadb"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "db93easyappointmentsmariadb"
     vbox.cpus = 2
     vbox.memory = 2048
     vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
  end
config.vm.network "private_network", ip: "192.168.55.101", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.101", :netmask => "255.255.255.0"
  config.vm.provision "shell", inline: <<-SHELL
apt-get -y install task-japanese
sed -i -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
update-locale LANG=ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
#DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade


# install mariadb
echo "mariadb-server-10.0 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mariadb-server-10.0 mysql-server/root_password_again password root" | sudo debconf-set-selections
apt-get -y install mariadb-server
mysql -uroot -proot -e "CREATE DATABASE easyappointments DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER easyappointments@localhost IDENTIFIED BY 'easyappointments';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON easyappointments.* TO 'easyappointments'@'localhost';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"


# install Easy!Appointments
apt-get -y install apache2 apache2-bin libapache2-mod-php7.0 php7.0-mysql php7.0-mbstring php7.0-xml php7.0-json unzip
mkdir -p /opt/easyappointments
cd /opt/easyappointments
wget https://github.com/alextselegidis/easyappointments/releases/download/1.2.1/easyappointments_1.2.1.zip
unzip easyappointments_1.2.1.zip
sed -i -e "s#http://url-to-easyappointments-directory#http://192.168.55.101/easyappointments/#" /opt/easyappointments/config.php
sed -i -e "s#DB_HOST.*= '';#DB_HOST       = 'localhost';#" /opt/easyappointments/config.php
sed -i -e "s#DB_NAME.*= '';#DB_NAME       = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_USERNAME.*= '';#DB_USERNAME   = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_PASSWORD.*= '';#DB_PASSWORD   = 'easyappointments';#" /opt/easyappointments/config.php

chown -R www-data:www-data /opt/easyappointments
ln -s  /opt/easyappointments /var/www/html
service apache2 restart

echo 'access http://192.168.1.101/easyappointments/'

SHELL
end

〇Easy!Appointmentsの画面



○関連情報
・Easy!Appointmentsに関する他の記事はこちらを参照してください。

2018年2月26日月曜日

VagrantでEasy!AppointmentsとMySQLがインストールされた仮想マシン(Debian Stretch/9.3)を構築する

Easy!Appointmentsでスケジュールを管理する事ができます。
以下のVagrantfileを使用して、Easy!AppointmentsとMySQLをインストールした仮想マシン(Debian Stretch/9.3)を構築する事ができます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/debian-9.3"
  config.vm.hostname = "db93easyappointments"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "db93easyappointments"
     vbox.cpus = 2
     vbox.memory = 2048
     vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
  end
config.vm.network "private_network", ip: "192.168.55.101", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.101", :netmask => "255.255.255.0"
  config.vm.provision "shell", inline: <<-SHELL
apt-get -y install task-japanese
sed -i -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
update-locale LANG=ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
#DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade

# install mysql
wget https://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb
export DEBIAN_FRONTEND=noninteractive
echo mysql-apt-config mysql-apt-config/enable-repo select mysql-5.7-dmr | sudo debconf-set-selections
dpkg -i mysql-apt-config_0.8.9-1_all.deb
apt-get update
apt-get -y install mysql-server
mysql -uroot -e "CREATE DATABASE easyappointments DEFAULT CHARACTER SET utf8;"
mysql -uroot -e "CREATE USER easyappointments@localhost IDENTIFIED BY 'easyappointments';"
mysql -uroot -e "GRANT ALL PRIVILEGES ON easyappointments.* TO 'easyappointments'@'localhost';"
mysql -uroot -e "FLUSH PRIVILEGES;"


# install Easy!Appointments
apt-get -y install apache2 apache2-bin libapache2-mod-php7.0 php7.0-mysql php7.0-mbstring php7.0-xml php7.0-json unzip
mkdir -p /opt/easyappointments
cd /opt/easyappointments
wget https://github.com/alextselegidis/easyappointments/releases/download/1.2.1/easyappointments_1.2.1.zip
unzip easyappointments_1.2.1.zip
sed -i -e "s#http://url-to-easyappointments-directory#http://192.168.55.101/easyappointments/#" /opt/easyappointments/config.php
sed -i -e "s#DB_HOST.*= '';#DB_HOST       = 'localhost';#" /opt/easyappointments/config.php
sed -i -e "s#DB_NAME.*= '';#DB_NAME       = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_USERNAME.*= '';#DB_USERNAME   = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_PASSWORD.*= '';#DB_PASSWORD   = 'easyappointments';#" /opt/easyappointments/config.php

chown -R www-data:www-data /opt/easyappointments
ln -s  /opt/easyappointments /var/www/html
service apache2 restart

echo 'access http://192.168.1.101/easyappointments/'

SHELL
end

〇Easy!Appointmentsの初期設定画面


〇Easy!Appointmentsの画面



○関連情報
・Easy!Appointmentsに関する他の記事はこちらを参照してください。

2018年2月22日木曜日

VagrantでEasy!AppointmentsとMariaDBがインストールされた仮想マシン(Ubuntu16.04)を構築する

Easy!Appointmentsでスケジュールを管理する事ができます。
以下のVagrantfileを使用して、Easy!AppointmentsとMariaDBをインストールした仮想マシン(Ubuntu16.04)を構築する事ができます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/ubuntu-16.04"
  config.vm.hostname = "ub1604easyappointmentsmariadb"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "ub1604easyappointmentsmariadb"
     vbox.cpus = 2
     vbox.memory = 2048
     vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
  end
config.vm.network "private_network", ip: "192.168.55.105", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.105", :netmask => "255.255.255.0"
  config.vm.provision "shell", inline: <<-SHELL
# update packages
apt-get update
#DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade

# install mariadb
echo "mariadb-server-10.0 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mariadb-server-10.0 mysql-server/root_password_again password root" | sudo debconf-set-selections
apt-get -y install mariadb-server
mysql -uroot -proot -e "CREATE DATABASE easyappointments DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER easyappointments@localhost IDENTIFIED BY 'easyappointments';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON easyappointments.* TO 'easyappointments'@'localhost';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"


# install Easy!Appointments
apt-get -y install apache2 apache2-bin libapache2-mod-php7.0 php7.0-mysql php7.0-mbstring php7.0-xml php7.0-json unzip
mkdir -p /opt/easyappointments
cd /opt/easyappointments
wget https://github.com/alextselegidis/easyappointments/releases/download/1.2.1/easyappointments_1.2.1.zip
unzip easyappointments_1.2.1.zip
sed -i -e "s#http://url-to-easyappointments-directory#http://192.168.55.105/easyappointments/#" /opt/easyappointments/config.php
sed -i -e "s#DB_HOST.*= '';#DB_HOST       = 'localhost';#" /opt/easyappointments/config.php
sed -i -e "s#DB_NAME.*= '';#DB_NAME       = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_USERNAME.*= '';#DB_USERNAME   = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_PASSWORD.*= '';#DB_PASSWORD   = 'easyappointments';#" /opt/easyappointments/config.php

chown -R www-data:www-data /opt/easyappointments
ln -s  /opt/easyappointments /var/www/html
service apache2 restart

echo 'access http://192.168.1.105/easyappointments/'
echo 'user: easyappointments password:easyappointments db:easyappointments'
SHELL
end

〇Easy!Appointmentsの初期設定画面


〇Easy!Appointmentsの画面



○関連情報
・Easy!Appointmentsに関する他の記事はこちらを参照してください。

2018年2月19日月曜日

DockerでEasy!Appointments、MySQLがインストールされたコンテナ(Alpine 3.7)を構築する

Easy!Appointmentsでスケジュールを管理する事ができます。
以下の手順で、Easy!AppointmentsとMySQLのコンテナを構築・実行します。

○構築方法
1. Easy!Appointmentsイメージの作成(Dockerfileがあるフォルダで実行)
docker build -t easyappointments .

Dockerfile(※192.168.55.129は適宜変更します)
FROM alpine:3.7
WORKDIR /
RUN  apk update \
  && apk add --no-cache apache2 php7-apache2 php7-mysqli php7-pdo php7-session php7-mbstring php7-mcrypt php7-ctype php7-json php7-xml php7-simplexml php7-zip openssl openrc unzip \
  && rm -rf /var/cache/apk/* \
  && mkdir -p /opt/easyappointments
WORKDIR /opt/easyappointments
RUN wget https://github.com/alextselegidis/easyappointments/releases/download/1.2.1/easyappointments_1.2.1.zip \
  && unzip easyappointments_1.2.1.zip \
  && rm -f easyappointments_1.2.1.zip \
  && sed -i -e "s#http://url-to-easyappointments-directory#http://192.168.55.129/easyappointments/#" /opt/easyappointments/config.php \
  && sed -i -e "s#DB_HOST.*= '';#DB_HOST       = 'db';#" /opt/easyappointments/config.php \
  && sed -i -e "s#DB_NAME.*= '';#DB_NAME       = 'easyappointments';#" /opt/easyappointments/config.php \
  && sed -i -e "s#DB_USERNAME.*= '';#DB_USERNAME   = 'root';#" /opt/easyappointments/config.php \
  && sed -i -e "s#DB_PASSWORD.*= '';#DB_PASSWORD   = 'easyappointments';#" /opt/easyappointments/config.php \
  && chown -R apache:apache /opt/easyappointments \
  && mkdir -p /run/apache2 \
  && ln -s /opt/easyappointments /var/www/localhost/htdocs
EXPOSE 80
VOLUME /opt/easyappointments
CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"]

2. Easy!AppointmentsとMySQLコンテナの構築・実行(docker-compose.ymlがあるフォルダで実行)
docker-compose up -d

docker-compose.yml
version: "2"
services:
  easyappointments:
    image: easyappointments
    container_name: "easyappointments"
    volumes:
      - "easyappointments-data:/opt/easyappointments"
    ports:
      - "80:80"
    depends_on:
      - db
  db:
    image: mysql:5.7
    command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    container_name: "easyappointments-db"
    volumes:
      - "db-data:/var/lib/mysql"
    environment:
        MYSQL_DATABASE: easyappointments
        MYSQL_ROOT_PASSWORD: easyappointments
volumes:
  db-data:
    driver: local
  easyappointments-data:
    driver: local

3. ブラウザからhttp:///easyappointments/にアクセス
管理者情報や会社情報を入力します。


○Easy!Appointmentsの画面


○その他
・Easy!AppointmentsとMySQLコンテナの停止・削除(docker-compose.ymlがあるフォルダで実行)
docker-compose down

・永続化ボリュームの一覧表示
docker volume ls


○関連情報
・Easy!Appointmentsに関する他の記事はこちらを参照してください。

2018年2月17日土曜日

VagrantでEasy!AppointmentsとMySQLがインストールされた仮想マシン(Ubuntu16.04)を構築する

Easy!Appointmentsでスケジュールを管理する事ができます。
以下のVagrantfileを使用して、Easy!AppointmentsとMySQLをインストールした仮想マシン(Ubuntu16.04)を構築する事ができます。
構築後、ブラウザからhttp://192.168.55.105/easyappointments/にアクセスします。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/ubuntu-16.04"
  config.vm.hostname = "ub1604easyappointments"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "ub1604easyappointments"
     vbox.cpus = 2
     vbox.memory = 2048
     vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
  end
config.vm.network "private_network", ip: "192.168.55.105", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.105", :netmask => "255.255.255.0"
  config.vm.provision "shell", inline: <<-SHELL
# update packages
apt-get update
#DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade

# install mysql
echo "mysql-server-5.7 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mysql-server-5.7 mysql-server/root_password_again password root" | sudo debconf-set-selections
apt-get -y install mysql-server-5.7
mysql -uroot -proot -e "CREATE DATABASE easyappointments DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER easyappointments@localhost IDENTIFIED BY 'easyappointments';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON easyappointments.* TO 'easyappointments'@'localhost';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"

# install Easy!Appointments
apt-get -y install apache2 apache2-bin libapache2-mod-php7.0 php7.0-mysql php7.0-mbstring php7.0-xml php7.0-json unzip
mkdir -p /opt/easyappointments
cd /opt/easyappointments
wget https://github.com/alextselegidis/easyappointments/releases/download/1.2.1/easyappointments_1.2.1.zip
unzip easyappointments_1.2.1.zip
sed -i -e "s#http://url-to-easyappointments-directory#http://192.168.55.105/easyappointments/#" /opt/easyappointments/config.php
sed -i -e "s#DB_HOST.*= '';#DB_HOST       = 'localhost';#" /opt/easyappointments/config.php
sed -i -e "s#DB_NAME.*= '';#DB_NAME       = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_USERNAME.*= '';#DB_USERNAME   = 'easyappointments';#" /opt/easyappointments/config.php
sed -i -e "s#DB_PASSWORD.*= '';#DB_PASSWORD   = 'easyappointments';#" /opt/easyappointments/config.php

chown -R www-data:www-data /opt/easyappointments
ln -s  /opt/easyappointments /var/www/html
service apache2 restart

echo 'access http://192.168.1.105/easyappointments/'
SHELL
end

〇Easy!Appointmentsの初期設定画面


〇Easy!Appointmentsの画面



○関連情報
・Easy!Appointmentsに関する他の記事はこちらを参照してください。