使用VMware fushion 8 + centos 7.0时,无法使用共享功能,所以必须安装vmtools。但是安装过程中有2个错误需要解决。
30 May,2023, Posted by : Mesong
1、gcc错误 Searching for GCC… The path “” is not valid path to the gcc binary. 2、内核头文件问题 Searching for a valid kernel header path… The path “” is not a valid path to the 3.10.0-229.el7.x86_64 kernel headers. 解决方法:在安装vmtools前,先安装需要的文件 yum -y update yum -y insta...
centos 下内容查找
26 May,2023, Posted by : Mesong
find ./ -type f -print0| xargs -0 grep 'your content' ...
CSS media 用法,自适应css中media要点
05 May,2023, Posted by : Mesong
代码: .gywmImgDiv img { width: 550px;height: auto; } 解释:浏览器任何宽度下,class=gywmImgDiv 的图片大小为550px,高度自动。 代码: @media screen and (min-width: 760px) { .gywmImgDiv img { width: 500px;height: auto; } } 解释:浏览器屏幕最小宽度760px以上,class=gywmImgDiv 的图片大小为500p...
nginx反向代理https主机配置参数事项
25 April,2023, Posted by : Mesong
location /static/ { proxy_set_header Host www.domainhostname.com; #换要指定相应的host proxy_ssl_server_name on;//代理域名证书 &n...
openssl 生成证书
24 April,2023, Posted by : Mesong
openssl req -x509 -nodes -days 36500 -newkey rsa:2048 -keyout /home/data/ssl/nginx.key -out /home/data/ssl/nginx.crt ...
php 浮点数对比
14 April,2023, Posted by : Mesong
function func($otderTotalGrand, $historyRefundAmount,$recharge_amount ) { $canRefundAmount = $otderTotalGrand - $historyRefundAmount; $canRefundBool = bccomp($canRefundAmount, $recharge_amount, 2); if ($otderTotalGrand < $historyRefundAmount || $canRefundBool === -1) { throw ...
mongoDB查询数组里面的object对像
13 April,2023, Posted by : Mesong
db.bios.find( { awards: { $elemMatch: { award: "Turing Award", year: { $gt: 1980 } } } } ) https://www.mongodb.com/docs/manual/tutorial/query-array-of-documents/ ...
redis设置连接密码
10 April,2023, Posted by : Mesong
可重启配置: 编辑 /etc/redis.conf 替换 # requirepass foobared 为 requirepass YOURPASSPHRASE 然后重启 redis-server restart 或临时设置,不用重启: CONFIG SET requirepass "YOURPASSPHRASE" 使用: AUTH YOURPASSPHRASE ...