以下のVagrantfileを使用して、Tiny Tiny RSSとMySQLがインストールされた仮想マシン(Ubuntu16.04)を構築する事ができます。
仮想マシン構築後、ブラウザからhttp://192.168.55.103/ttrss/にアクセスして初期設定を行います。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.hostname = "ub1604tinytinyrss"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1604tinytinyrss"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.103", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.103", :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
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 ttrss DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER ttrss@localhost IDENTIFIED BY 'ttrss';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON ttrss.* TO 'ttrss'@'localhost';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"
# install apache and php
#apt-get -y install apache2 libapache2-mod-php7.0
#apt-get -y install php7.0-mbstring php7.0-xml php7.0-json php7.0-gd php7.0-curl php7.0-mysqli php7.0-pdo
# install apache and php
apt-get -y install software-properties-common
add-apt-repository ppa:ondrej/php
apt-get update
apt-get -y install apache2 libapache2-mod-php5.6
apt-get -y install php5.6-mysql php5.6-mbstring php5.6-xml php5.6-pdo php5.6-pdo-mysql php5.6-common php5.6-json php5.6-curl php5.6-dom php5.6-intl
# install Tiny Tiny RSS
wget https://git.tt-rss.org/fox/tt-rss/archive/master.tar.gz
tar xvfz master.tar.gz
mv tt-rss /opt/ttrss
chown -R www-data:www-data /opt/ttrss
sudo ln -s /opt/ttrss/ /var/www/html/
service apache2 restart
cat << EOF >> /etc/systemd/system/ttrss.service
[Unit]
Description=ttrss_backend
After=network.target mysql.service postgresql.service
[Service]
User=www-data
ExecStart=/opt/ttrss/update_daemon2.php
[Install]
WantedBy=multi-user.target
EOF
systemctl enable ttrss.service
systemctl start ttrss.service
echo 'access http://192.168.55.103/ttrss/'
echo 'default user: admin default password: password'
echo 'sample rss: http://serverarekore.blogspot.com/feeds/posts/default'
SHELL
end
○Tiny Tiny RSSの初期設定画面1
○Tiny Tiny RSSの初期設定画面2
○Tiny Tiny RSSの画面
○関連情報
・Tiny Tiny RSSに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿