瀏覽代碼

git barerepos & redis warnings

bach 3 年之前
父節點
當前提交
37a8a031da
共有 2 個文件被更改,包括 7 次插入2 次删除
  1. 2 2
      bin/gitbarrerepos.sh
  2. 5 0
      bin/lemp.sh

+ 2 - 2
bin/gitbarrerepos.sh

@@ -111,12 +111,12 @@ if [ "$vh" = "yes" ]; then
   chmod +x post-receive # pre-receive
 
   # setup git repo on site folder
-  cd /home/"$user"/www/"$_domain"/public_html
+  cd /home/"$user"/www/"$_domain"/app
   git init
   # link to the bare repo
   git remote add origin /home/"$user"/git-repositories/"$_domain".git
 
-  chown -R "$user":"$user" /home/"$user"/www/"$_domain"/public_html
+  chown -R "$user":"$user" /home/"$user"/www/"$_domain"/app
 
   cd "$_cwd"
   # done

+ 5 - 0
bin/lemp.sh

@@ -162,6 +162,11 @@ apt-get --yes install redis-server php-redis
 # TODO set maxmemory-policy=volatile-lru
 # TODO comment all save line
 
+# WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
+# WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
+# WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
+
+# https://blog.opstree.com/2019/04/16/redis-best-practices-and-performance-tuning/
 
 systemctl enable redis-server
 systemctl restart redis-server