Skip to content

Instantly share code, notes, and snippets.

@d-Rickyy-b
Last active December 24, 2022 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d-Rickyy-b/8ada734450b1d42a32bca6fdc32f1c08 to your computer and use it in GitHub Desktop.
Save d-Rickyy-b/8ada734450b1d42a32bca6fdc32f1c08 to your computer and use it in GitHub Desktop.
Install script for grocy on a fresh debian installation
#!/bin/bash
cd /var/www/html
rm index.html
version="2.7.1"
wget -q "https://github.com/grocy/grocy/releases/download/v${version}/grocy_${version}.zip"
unzip "grocy_${version}.zip"
rm "grocy_${version}.zip"
chown www-data: /var/www/html -R
cp /var/www/html/config-dist.php /var/www/html/data/config.php
touch /etc/apache2/sites-available/grocy.conf
> /etc/apache2/sites-available/grocy.conf
echo -e "<VirtualHost *:80>" >> /etc/apache2/sites-available/grocy.conf
echo -e " DocumentRoot /var/www/html/public" >> /etc/apache2/sites-available/grocy.conf
echo -e " ErrorLog \${APACHE_LOG_DIR}/error.log" >> /etc/apache2/sites-available/grocy.conf
echo -e " CustomLog \${APACHE_LOG_DIR}/access.log vhost_combined" >> /etc/apache2/sites-available/grocy.conf
echo -e "</VirtualHost>" >> /etc/apache2/sites-available/grocy.conf
apt-get update && upgrade
apt-get install php-sqlite3
a2dissite 000-default.conf
a2ensite grocy.conf
systemctl reload apache2
@witzker
Copy link

witzker commented Dec 24, 2022

12/ 2022
can anyone Pls. be so kind and update this that it is running on Debian 11 with no problems and uses PHP 8.1 (I think is required)

Many THX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment