From 8b038fd533dd238c02a2a05ccfdbc646a91e28e7 Mon Sep 17 00:00:00 2001 From: poiuty Date: Thu, 18 May 2023 23:20:13 +0300 Subject: [PATCH] Update README.md --- README.md | 64 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 8620fc8..04fc87f 100644 --- a/README.md +++ b/README.md @@ -2,28 +2,48 @@

+Statbate is running on the AX102 Hetzner server.
+CPU 7950X3D, 128 GB DDR5 ECC, 2 x1.92 TB NVMe (KIOXIA KCD81RUG1T92), 1 GBit/s network. + +I am using ext4 file system. Clickhouse and Mariadb work better with `noatime` +``` +# nano /etc/fstab +UUID=xxx / ext4 defaults,noatime 0 0 + +# after that you can do a remount or reboot +# mount -o remount,noatime / + +# check changes +# mount +/dev/md1 on / type ext4 (rw,noatime) +``` + +CPU Scaling Governor. Always use the performance scaling governor. +``` +# let's check +# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor +schedutil + +# now let's change +# apt-get install cpufrequtils +# nano /etc/default/cpufrequtils +ENABLE="true" +GOVERNOR="performance" +MAX_SPEED="0" +MIN_SPEED="0" + +# systemctl restart cpufrequtils.service +# and check again +# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor +performance +``` + +After installing OS Debian 11, I need to update and install packages and change config files. + ``` apt-get update apt-get upgrade apt-get install htop bwm-ng strace lsof iotop git build-essential screen -adduser --disabled-login stat -``` - -``` -git clone https://github.com/poiuty/statbate.git - -mkdir /home/stat/go -mkdir /home/stat/php -mkdir /home/stat/python -mkdir /var/www/statbate - -cp -r /statbate/app /home/stat/go -cp -r /statbate/cli/*.php /home/stat/php -cp -r /statbate/cli/*.py /home/stat/python -cp -r /statbate/html/* /var/www/statbate - -chown -R stat:stat /home/stat -chown -R www-data:www-data /var/www/statbate ``` 1. Mariadb
@@ -34,12 +54,4 @@ chown -R www-data:www-data /var/www/statbate 6. Redis
7. App 8. Add cron -``` -# nano /etc/cron.d/php -*/10 * * * * stat php /home/stat/php/start2.php > /home/stat/php/log.txt 2>&1 -* * * * * www-data php /var/www/statbate/root/index.php >/dev/null 2>&1 - -# systemctl restart cron -# systemctl status cron -```