分类: Linux

117 篇文章

ZSH安装配置
命令行安装ZSH 切换 Linux/Unix 产品一般默认的都是使用 bash。 从 bash 切换到 zsh 使用系统自带的 zsh:chsh -s /bin/zsh,输入密码成功切换,重启终端即可使用 zsh。 使用第三方的 zsh,如从 brew 安装的 zsh。 sudo chsh -s /usr/local/bin/zsh 从 zsh 切换回 bash chsh -s /bin/bash zsh 和 bash 的环境变量 bash 的环境变量是.bash_profile文件。 zsh 的环境变量是.zshrc文件。 PS:如果从 bash 切换到 zsh,但想保留 bash 所设置的环境变量,可在 .zshrc文件末尾添加 source ~/.bash_profile 保存退出,并重启终端即可使用 bash 的环境变量。 zsh-…
目录级别的冗余存储:SnapRAID
2018-03-08 from--https://wzyboy.im/post/1186.html 在数据存储领域,「备份」和「冗余」是两种常见的数据保护策略。两种策略各有不同的使用场景,对于重要数据,两者一起使用自然是最好了。本文介绍使用 SnapRAID 实现灵活的数据冗余存储。 以下两篇文章与本文内容有联系,推荐阅读: BorgBackup —— 增量备份方案 使用 mergerfs 合并多块硬盘的剩余空间 一、神奇的奇偶校验 小时候一直觉得 WinRAR 的「恢复卷」功能非常神奇。比如有一个 100 MiB 的压缩文件分成 10 个分卷,每个 10 MiB,创建者又创建了 3 个恢复卷,每个也是 10 MiB。当复制、分发这些卷的时候,如果因为数据传输、磁盘存储等各种原因,导致 10 个数据卷中有部分文件损坏或丢失,只要损坏或丢失的…
CentOS 7 中firewall-cmd命令
2017.08.14 from--https://www.jianshu.com/p/411274f96492 如果你的系统上没有安装使用命令安装 安装firewalld 防火墙yum install firewalld 开启服务systemctl start firewalld.service 关闭防火墙systemctl stop firewalld.service 开机自动启动systemctl enable firewalld.service 关闭开机制动启动systemctl disable firewalld.service 使用firewall-cmd 命令 查看状态firewall-cmd --state //running 表示运行 获取活动的区域firewall-cmd --get-active-zones 这条命令将用…
thumbnail
Centos7.4源码编译安装GCC7.2.0
2017-11-16 from--https://www.hualuoo.com/linux/72.html 此处测试使用的是腾讯云Centos 7.4 x64系统,具体信息如下,如有出现其他问题欢迎留言询问。 ---------- System Information ---------- OS : CentOS 7.4.1708 Arch : x86_64 (64 Bit) Kernel : 3.10.0-514.21.1.el7.x86_64 ---------------------------------------- 1、yum安装必要组件 yum install -y bzip2 2、访问GCC的官网:https://gcc.gnu.org/ 选择距离自己服务器较近的下载站 然后依次进入releases→gcc-7.2.0→右…
thumbnail
Create htpasswd file for nginx (without apache)
2017-05-07 from--https://coderwall.com/p/zvvgna/create-htpasswd-file-for-nginx-without-apache apache nginx htaccess If you're like me, and use Nginx instead of Apache, you could eventually face this problem: Create an htpasswd file (for htaccess "authentication"). To create your file, without installing Apache, just run: $ printf "USER:$(openssl passwd -crypt PASSWORD)\n" …
centos7的网卡重启方法
2018-02-27 from--https://blog.51cto.com/andyboge/2073420 1、centos6的网卡重启方法:service network restart centos7的网卡重启方法:systemctl restart network 2、DNS配置文件:cat /etc/resolv.conf 设置主机和IP绑定信息:cat /etc/hosts 设置主机名:cat /etc/hostname 3、可以使用nmtui文本框方式修改IP 4、关闭防火墙并设置开机不启动 查看防火墙状态:systemctl status firewalld.service 关闭:systemctl stop firewalld 开启:systemctl start firewalld 开机自动关闭:systemctl …