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
@Konradrundfunk
Copy link

Would be nice to update to the newest version

@d-Rickyy-b
Copy link
Author

Hi @Konradrundfunk, I updated the code to me more dynamic. I did not test if the script still works the same as it did for the old version. Maybe you can give me feedback on that.

@Konradrundfunk
Copy link

Sure I can thanks.

@Konradrundfunk
Copy link

Ok I have tried that out but the dependencies arent working under apt. Please check that(sqlite3 isnt the newest under apt) otherwise it will take users long to figure out.

@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