VMware虚拟机断电重启后出现Generating /run/initramfs/rdsosreport.txt问题
执行xfs_repair /dev/mapper/centos-root 或者xfs_repair /dev/mapper/centos-root -L
# xfs_repair /dev/mapper/centos-root -L
# reboot
执行xfs_repair /dev/mapper/centos-root 或者xfs_repair /dev/mapper/centos-root -L
# xfs_repair /dev/mapper/centos-root -L
# reboot
$arr=[0,1,2,3];
$newArr = array_map(function ($value){
return 'str_'.$value;
},$arr);
$newArr就变成了['str_0','str_1','str_2','str_3']
SELECT * FROM tb_item AS T WHERE 1>(
SELECT COUNT(id)
FROM tb_item WHERE
`item_category_id`=T.`item_category_id` AND id>T.id)
导入数据
mysql -utest -p demo < demo.sql
导出数据
/usr/local/mysql/bin/mysqldump -uroot -p demo > demo.sql
CentOS 8 换源,设置dnf / yum镜像
aliyun更新了centos8的说明
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
centos 8 默认是会读取centos.org的mirrorlist的,所以一般来说是不需要配置镜像的。
如果你的网络访问centos.org的mirrorlist有问题,可能才需要另外配置镜像
cd /etc/yum.repos.d
cp CentOS-Base.repo CentOS-Base.repo.bak
cp CentOS-AppStream.repo CentOS-AppStream.repo.bak
cp CentOS-Extras.repo CentOS-Extras.repo.bak
sed -i 's/mirrorlist=/#mirrorlist=/g' CentOS-Base.repo CentOS-AppStream.repo CentOS-Extras.repo
sed -i 's/#baseurl=/baseurl=/g' CentOS-Base.repo CentOS-AppStream.repo CentOS-Extras.repo
sed -i 's/http:\/\/mirror.centos.org/https:\/\/mirrors.aliyun.com/g' CentOS-Base.repo CentOS-AppStream.repo CentOS-Extras.repo
内容摘自 csdn