1、the configured user limit (128) on the number of inotify instances has been reached
解决方法:
临时:
$ echo 65536 > /proc/sys/fs/inotify/max_user_instances
永久更改:
vi /etc/sysctl.conf #添加如下内容
fs.inotify.max_queued_events = 32768
fs.inotify.max_user_instances = 65536
fs.inotify.max_user_watches = 1048576
sysctl -p #使修改后文件生效
2、The type initializer for 'Gdip' threw an exception
ASP.NET Core项目部署在Linux下可能会出现GDI错误
解决方法:
more /opt/shell/yaml/libgdiplus.yaml

- hosts: "{{ host }}"
  tasks:
    - name: copy libgdiplus
      copy: src=/opt/shell/soft/libgdiplus dest=/usr/local/src/ mode=0755
    - name: run libgdiplus.sh
      shell: bash /usr/local/src/libgdiplus/libgdiplus.sh
    - name: source libdgip
      shell: source /etc/locale.conf
    - name: source i18n
      shell: source /etc/sysconfig/i18n

more /opt/shell/soft/libgdiplus/libgdiplus.sh

#!/bin/bash
. /root/.bash_profile
set -m
yum -y install autoconf automake libtool freetype-devel fontconfig libXft-devel libjpeg-turbo-devel libpng-devel giflib-devel libtiff-devel libexif-devel glib2-devel cairo-devel
cd /opt/libgdiplus
unzip libgdiplus.zip
cd ./libgdiplus
bash autogen.sh
make && make install
ln -s /usr/local/lib/libgdiplus.so /usr/lib64/gdiplus.dll
ln -s /usr/local/lib/libgdiplus.so /usr/lib64/libgdiplus.so
ln -s /usr/local/lib/libgdiplus.so /usr/libgdiplus.so
mkdir -pv /usr/share/fonts/chinese/TrueType
chmod 755 /usr/share/fonts/chinese/TrueType
cp /opt/libgdiplus/fonts/* /usr/share/fonts/chinese/TrueType
chmod 666 /usr/share/fonts/chinese/TrueType/*
fc-cache  -fv
locale -a | grep zh_CN
cat > /etc/sysconfig/i18n << "EOF"
NG="zh_CN.UTF-8"
LC_ALL="zh_CN.UTF-8"
EOF
#source /etc/sysconfig/i18n
cat > /etc/locale.conf << "EOF"
LANG=en_US.utf8
LANG="zh_CN.UTF-8"
EOF
#source /etc/locale.conf

ll /opt/shell/soft/libgdiplus/
total 1112
drwxr-xr-x 2 root root 4096 Jun 14 2019 fonts
-rw-r--r-- 1 root root 928 Jul 1 2019 libgdiplus.sh
-rw-r--r-- 1 root root 1130161 Jun 12 2019 libgdiplus.zip
[root@10-9-160-129 ~]# ll /opt/shell/soft/libgdiplus/fonts/
total 57008
-rw-r--r-- 1 root root 16829116 Jun 12 2019 msyhbd.ttc
-rw-r--r-- 1 root root 12139380 Jun 12 2019 msyhl.ttc
-rw-r--r-- 1 root root 19647736 Jun 12 2019 msyh.ttc
-rw-r--r-- 1 root root 9753388 Jun 14 2019 simhei.ttf