仮想マシン構築後、ブラウザからhttp://192.168.1.105/lychee/にアクセスして初期を行います。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.hostname = "ub1604lycheemariadb"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1604lycheemariadb"
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 lychee DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER lychee@localhost IDENTIFIED BY 'lychee';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON lychee.* TO 'lychee'@'localhost';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"
apt-get -y install apache2 libapache2-mod-php7.0
apt-get -y install php7.0-gd php7.0-json php7.0-mysql php7.0-pdo php7.0-curl php7.0-mbstring
# install lychee
apt-get -y install unzip
wget https://github.com/electerious/Lychee/archive/master.zip
unzip master.zip
mv Lychee-master /opt/lychee
chown -R www-data:www-data /opt/lychee
ln -s /opt/lychee /var/www/html
systemctl reload apache2.service
echo 'access http://192.168.1.105/lychee/'
SHELL
end
○Lycheeの初期設定画面1
○Lycheeの初期設定画面2
○Lycheeの画面
○関連情報
・Lycheeに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿