分类 linux 下的文章

这个问题确实是服务器系统盘满了
首先登录服务器:执行df -h

[root@VM_0_6_centos ~]# df   -h 
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        50G   47G  175M 100% /
devtmpfs        487M     0  487M   0% /dev
tmpfs           497M   32K  497M   1% /dev/shm
tmpfs           497M  336K  497M   1% /run
tmpfs           497M     0  497M   0% /sys/fs/cgroup
tmpfs           100M     0  100M   0% /run/user/0

cd到 根目录执行du -sh * 看哪个目录占用空间大,有的高达几十个G

[root@VM_0_6_centos /]# du -sh *
0    bin
137M    boot
4.0K    data
16K    dev
34M    etc
24K    home
0    lib
0    lib64
16K    lost+found
4.0K    media
4.0K    mnt
8.0K    opt
8.0K    patch
0    proc
380K    root
336K    run
0    sbin
4.0K    srv
0    sys
512K    tmp
3.0G    usr
4.4G    var
39G    www

cd占内存大的目录,继续 du -sh * 找出占用没用的大量占用空间的文件删除之,问题解决

在请求阿里云短信服务时遇到

cURL error 6: Could not resolve: dysmsapi.aliyuncs.com (Could not contact DNS servers) (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
null

不能解析域名

于是打开服务器终端

curl dysmsapi.aliyuncs.com
curl: (6) Could not resolve host: dysmsapi.aliyuncs.com; Unknown error
[root@chongpu ~]# curl baidu.com    

解决方法

vi   /etc/resolv.conf

修改dns

nameserver 114.114.114.114
nameserver 8.8.8.8

重新测试curl

[root@chongpu ~]# curl dysmsapi.aliyuncs.com
<?xml version='1.0' encoding='UTF-8'?><Error><RequestId>429BC09D-CB28-4FA2-B4F2-81E9032032F8</RequestId><HostId>dysmsapi.aliyuncs.com</HostId><Code>InvalidVersion</Code><Message>Specified parameter Version is not valid.</Message><Recommend><![CDATA[https://error-center.aliyun.com/status/search?Keyword=InvalidVersion&source=PopGw]]></Recommend></Error>[root@chongpu ~]#

成功