解决UOS终端提示Your system is not...
最近公司里面进行UOS的兼容性验证,但是系统总是会提示: Your system is not activated. Please activate as soon as possible for normal use. 比较烦人. 今天发现原来他就是一个 systemd的服务 停止了服务就可以了. systemctl |grep license systemctl stop license.service systemctl disable license.service
他父母知道我们在一起上大学了
20080130我担心又早晚都的面对的事情终于发生了,他的父母知道我们在一起了。因为他对我不求回报的付出,上了校报,被他家人看到了。他晚上跑出了家,面对这种情况其实心里很不时滋味,自从和我好后,他受了很多委屈,也是他和父母从小到大发生的第一次争执。第一次离家出走我知道他很难过,左右为难,我也很难过。难过为什么我时残疾人,难过我为什么给他带来这么多麻烦,我也很理解他的父母,谁又愿意自己儿子娶残疾人呢,所以她们也没错。 这几天心里乱乱的,继续似乎对他不公平,他很优秀,值得更好的,放弃又万般不舍,不知道我们是否还可以去同一所大学继续读书,若去了他父母肯定时被迫同意,若不去,那又是如何割舍。他一直在坚持当初在高中说的的那句话:如果校园里有一对儿成的那一定是我们。心里真的太乱了,这种不安何时可以结束,这种心与心的煎熬何时才能毫无阻碍的靠在一起。整个假期,不知道他家那边什么情况,更不敢联系。每天都是心乱如麻的度过,希望我们有好的结局,如果没有也无怨无悔。
解决flask_avatars头像无法显示
无法显示头像的原因是flask_avatars使用的是国外的gravatar地址: https://gravatar.com/avatar/ 这个地址国内访问很糟糕,所以需要换成国内的地址。 修改如下文件: vi /opt/pypy3.10/lib/pypy3.10/site-packages/flask_avatars/__init__.py 将该文件50行的https://gravatar.com/avatar/修改为https://gravatar.cn/avatar/。 如果您使用的不是pypy而是python,就找到python的site-packages目录,修改方法一样。    
Nginx安全优化过绿盟漏洞扫描
今日客户服务器攻防演练,扫出了不少网站的安全问题,通过以下设置,可以通过绿盟的漏扫。 以下配置都是基于Nginx的反向代理。 server { listen 8080; server_name ocm.shengu.com.cn; #安全配置开始 #处理缺少头信息的安全问题 add_header Content-Security-Policy "default-src 'self' data: *.shengu.com.cn 'unsafe-inline' 'unsafe-eval' mediastream: "; add_header X-Content-Type-Options "nosniff"; add_header X-XSS-Protection "1; mode=block"; add_header X-Frame-Options SAMEORIGIN; add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; add_header Referrer-Policy "origin"; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; #cookie设置httponly add_header Set-Cookie "HttpOnly"; #禁用不安全的http方法 if ($request_method ~* OPTIONS|DELETE|SEARCH|COPY|MOVE|PROPFIND|PROPPATCH|MKCOL|LOCK|UNLOCK) { ...
解决pip报错Error: pg_config executable not found.
报错如下: running egg_info creating /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info writing /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info/dependency_links.txt writing top-level names to /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info/top_level.txt writing manifest file '/tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info/SOURCES.txt' Error: pg_config executable not found. 原因是系统缺少postgresql-devel这个包。 解决: yum install postgresql-devel 重新运行pip安装,问题解决。
解决 OpenSSL library not found 或者 Your...
报错如下: checking OpenSSL header version... 1010107f (OpenSSL 1.1.1g 21 Apr 2020) checking for OpenSSL_version... no checking for OpenSSL_version_num... no checking OpenSSL library version... not found configure: error: OpenSSL library not found. 或者: checking for openssl... /usr/local/bin/openssl checking for openssl/opensslv.h... yes checking OpenSSL header version... 30000000 (OpenSSL 3.0.0 7 sep 2021) checking for OpenSSL_version... yes checking for OpenSSL_version_num... yes checking OpenSSL library version... 1010104f (OpenSSL 1.1.1d 10 Sep 2019) checking whether OpenSSL's headers match the library... no configure: error: Your OpenSSL headers do not match your library. Check config.log for details. If you are sure your installation is consistent, you can disable the check by running "./configure --without-openssl-header-check". Also see contrib/findssl.sh for help identifying...