分类目录归档:Linux
Errors during downloading metadata for repository ‘appstream’:
inotifywait upper limit on inotify watches reached!
cc: fatal error: Killed signal terminated program cc1
compilation terminated.
由于内存不足make报错,开启虚拟内存即可
cc: fatal error: Killed signal terminated program cc1 compilation terminated.
请跳转至:
干掉/boot分区,移动boot分区到LVM分区里
想要移动/boot分区时,首先使用(Gparted 这个软件,直接apt-get install gparted 就可以安装)
(1)使用gparted查看你的/boot分区挂载在哪个磁盘上
(2)之后使用mount 挂载你的目的磁盘
(3)将源/boot磁盘中的信息全都拷贝到你的目的磁盘中
(4)将源/boot磁盘unmount一下,并将目的磁盘mount到/boot目录下
(5)更新sudo grub-install –boot-directory=目的boot目录 /dev/sda
5.1 检查fstab
(6)reboot 查看是否更新成功
certbot renew: ImportError: cannot import name constants
certbot renew
An unexpected error occurred:
ImportError: cannot import name constants
Please see the logfile ‘/tmp/tmpl4isIP/log’ for more details.
Installing snapd
With the EPEL repository added to your CentOS installation, simply install the snapd package:
$ sudo yum install snapd
Once installed, the systemd unit that manages the main snap communication socket needs to be enabled:
$ sudo systemctl enable --now snapd.socket
To enable classic snap support, enter the following to create a symbolic link between /var/lib/snapd/snap
and /snap
:
$ sudo ln -s /var/lib/snapd/snap /snap
Remove certbot-auto and any Certbot OS packages
If you have any Certbot packages installed using an OS package manager like apt, dnf, or yum, you should remove them before installing the Certbot snap to ensure that when you run the command certbot the snap is used rather than the installation from your OS package manager. The exact command to do this depends on your OS, but common examples are sudo apt-get remove certbot,
sudo dnf remove certbot, or sudo yum remove certbot.
If you previously used Certbot through the certbot-auto script, you should also remove its installation by following the instructions here.
Install CertbotRun this command on the command line on the machine to install Certbot.
sudo snap install --classic certbot
Prepare the Certbot commandExecute the following instruction on the command line on the machine to ensure that the certbot command can be run.sudo
ln -s /snap/bin/certbot /usr/bin/certbot
Choose how you’d like to run Certbot
Either get and install your certificates…Run this command to get a certificate and have Certbot edit your Nginx configuration automatically to serve it, turning on HTTPS access in a single step.
sudo certbot --nginx
Or, just get a certificateIf you’re feeling more conservative and would like to make the changes to your Nginx configuration by hand, run this command.
sudo certbot certonly --nginx
Test automatic renewalThe Certbot packages on your system come with a cron job or systemd timer that will renew your certificates automatically before they expire. You will not need to run Certbot again, unless you change your configuration. You can test automatic renewal for your certificates by running this command:
sudo certbot renew --dry-run
The command to renew certbot is installed in one of the following locations:
- /etc/crontab/
- /etc/cron.*/*
- systemctl list-timers
Running setup.py install for Twisted … error
pip install https://download.lfd.uci.edu/pythonlibs/z4tqcw5k/Twisted-20.3.0-cp39-cp39-win_amd64.whl
装下 Twisted 即可 否则 ,需要下载庞大的vs来编译,还会失败
或者点击这个下载解压
pip install D:\Downloads\Twisted-20.3.0-cp39-cp39-win_amd64.whl
Centos8配置Mail
配置mail
明白了基本概念,接下来配置mail使用SMTP对外发送邮件。mail命令的系统级配置文件是/etc/mail.rc,用户级别的默认配置文件是~ /.mailrc,也可以通过MAILRC环境变量设置配置文件路径。作为普通用户,我们在本地的~/.mailrc文件进行配置,SMTP的主要配置如下:
set from=346010975@sohu.com smtp=smtps://smtp.sohu.com:465
set smtp-auth-user="****@****.com" smtp-auth-password="******"
set smtp-auth=login
原文链接: https://blog.csdn.net/raymond_d/article/details/104152933
Chrome 每个浏览器只支持6个并发链接
🤣
Linux 快速开启虚拟内存
mkdir /var/swap # 创建目录
cd /var/swap # 进入目录
dd if=/dev/zero of=/var/swap/swapfile bs=1M count=1024 # 分配个1024*1M的文件
chmod 600 swapfile # (推荐)修改权限为 0600
mkswap swapfile # 格式化为交换区格式
swapon /var/swap/swapfile # 开启交换区
/etc/fstab
添加下列行 实现开机自动挂载(可选)
/var/swap/swapfile swap swap defaults 0 0