软件源默认配置文件为:/etc/apt/sources.list修改里面的地址为国内地址:#先备份 cp /etc/apt/sources.list /etc/apt/sources.list_bak #修改为如下内容,使用中科大地址更新 root@debian115:/home/ice# grep -v '#' /etc/apt/sources.list deb h...
时光匆匆,记录是对思维的沉淀;
软件源默认配置文件为:/etc/apt/sources.list修改里面的地址为国内地址:#先备份 cp /etc/apt/sources.list /etc/apt/sources.list_bak #修改为如下内容,使用中科大地址更新 root@debian115:/home/ice# grep -v '#' /etc/apt/sources.list deb h...
debian11默认没安装ifconfig命令,运行会报错:root@debian115:/home/ice# ifconfig bash: ifconfig:未找到命令安装步骤如下:apt install net-tools -y #查找位置 whereis ifconfig ifconfig: /usr/sbin/ifconfig /usr/share/man/man8/ifconfig...
禁止未绑定的域名或任意域名直接访问服务器的80端口:server { listen 80 default_server; server_name _; # 默认server return 500; }对任意域名访问做301跳转:server { listen 80 default_server; server_name _; return ...
VM虚拟机卡死,在/var/log/message日志中出现大量的错误:echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.” 和“blocked for more than 120 seconds如下图:原因分析:Linux会最多使用40%的可用内存作为文件系统缓存。当超过这个阈值后...
在T440P上安装了CentOS7.9发现合上笔记本盖子就自动休眠了,需要修改下配置文件才能不休眠:CentOS7下对应配置文件/etc/systemd/logind.confvi /etc/systemd/logind.conf HandleLidSwitch后面的suspend修改为lock,即: HandleLidSwitch=lock # lock 仅锁屏,计算机继续工作。其他...
执行bash脚本的时候报错:[root@monitor_dev ~]# ./jk.sh -bash: ./jk.sh: /bin/bash^M: bad interpreter: No such file or directory需要使用dos2unix工具将Windows格式文件转换为Unix、Linux格式·解决方法:安装dos2unixyum install dos2unix -y转换...
Curl 是一个常用的命令行数据传输工具,可以方便的从命令行创建网络请求。它支持众多协议,支持如 HTTP, HTTPS, FTP, FTPS, SFTP, IMAP, SMTP, POP3 等等协议。Curl 提供了很多强大的功能,我们可以利用它来进行 HTTP 请求、上传/下载文件等,且支持 Cookie、用户密码验证、代理隧道、限速等。Curl 用于上传和下载指定 URL 的数据,它是...
一台老的机器在执行yum install ftp 时,报错如下:# yum install ftp Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile http://mirrors.163.com/centos/6.9/os/x86_64/rep...
yum update更新完系统以后发现php7不能运行,访问nginx直接报502,tail查看nginx error log报错如下2021/02/25 14:46:24 [crit] 1746#0: *6 connect() to unix:/usr/local/php7/var/run/php-cgi.sock failed (2: No such file or directory)...
安装中文版的CentOS7之后,root目录和home目录下会出现中文的路径名,如“桌面”、“文档”、“图片”、“公共的”、“下载”、“音乐”、“视频”等目录,转换方法如下:修改/etc/locale.conf文件内容如下:cat /etc/locale.conf LANG="en_US.UTF-8"重新加载source /etc/locale.conf echo $LA...