#Install php
echo ">>> Installing PHP7"
-sudo apt-get install -y php libapache2-mod-php php-cli php-mysql php-curl php-gd php-mbstring
-sudo apt-get install -y imagemagick
-sudo apt-get install -y php-imagick
+sudo apt-get install -y php libapache2-mod-php php-cli php-mysql php-curl php-gd php-mbstring php-xml imagemagick php-imagick
sudo systemctl restart apache2
Q2="FLUSH PRIVILEGES;"
SQL="${Q1}${Q2}"
$MYSQL -uroot -proot -e "$SQL"
+# add a separate database user for friendica
+$MYSQL -uroot -proot -e "CREATE USER 'friendica'@'localhost' identified by 'friendica';"
+$MYSQL -uroot -proot -e "GRANT ALL PRIVILEGES ON friendica.* TO 'friendica'@'localhost';"
+$MYSQL -uroot -proot -e "FLUSH PRIVILEGES"
systemctl restart mysql
# create the friendica database
echo "create database friendica DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" | mysql -u root -proot
# import test database
-# $MYSQL -uroot -proot friendica < /vagrant/friendica_test_data.sql
+$MYSQL -uroot -proot friendica < /vagrant/friendica_test_data.sql
# create cronjob - activate if you have enough memory in you dev VM
-# echo "*/10 * * * * cd /vagrant; /usr/bin/php include/poller.php" >> friendicacron
-# sudo crontab friendicacron
-# sudo rm friendicacron
+echo "*/10 * * * * cd /vagrant; /usr/bin/php scripts/worker.php" >> friendicacron
+sudo crontab friendicacron
+sudo rm friendicacron
#Optional: checkout addon repositroy
#sudo git clone https://github.com/friendica/friendica-addons.git /vagrant/addon