Linux
CentOS 服务器运维实践
· ☕ 2 分钟
整理自「开发 Tips」系列,汇总 CentOS 服务器运维中的常见问题与解决方法。 1. 升级 Docker 版本 卸载旧版本的 Docker 1 2 3 4 5 6 $yum remove docker \ docker-common \ container-selinux \ docker-selinux \ docker-engine \ docker-engine-selinux 保存在 /var/lib/docker/ 的镜像、容器、数据、网络都会被保留。 安装依赖 1 yum install -y yum-utils device-mapper-persistent-data lvm2 安装 Docker 1 2 3 yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo 1 yum makecache fast 1 yum install docker-ce 2. 新

安装 CentOS 之后,需要做的几件事
· ☕ 1 分钟
1. 更换镜像源 首先备份官方的源 1 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 下载新的源到 /etc/yum.repos.d/ CentOS 5 1 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo CentOS 6 1 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo CentOS 7 1 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 生成元数据缓存 1 yum makecache 2. 访问 NTFS 文件系统 Linux 内核目前只支持对微软 NTFS 文件系统的读取。 ntfs-3g 是微软 NTFS 文件系统的一个开源实现,同时支持读和写。 ntfs-3g 在 epel-release 源中,执行命令查

SELinux 和 iptables
· ☕ 6 分钟
最近操作服务器时,遇到了一些不同清楚的概率,查找了一些资料,整理如下。 1. BLP 安全模型 该模型将信息系统中的实体分为两部分: 主体(Subject),实时操作的,如用户和进程 客体(Object),被操作的对象,如文件和数据库等。 对主体和客体来说,有

Linux 性能命令工具
· ☕ 1 分钟
Linux 平台上的性能工具有很多,眼花缭乱,长期的摸索和经验发现最好用的,还是那些久经考验的、简单的小工具。下面是,系统性能专家 Brendan D.Gregg ,关于Linux性能方面的talk(Linux Performance Tools)中所整理的命令工具。 1. 总览 2. 监控 3. 测试 4. 优化 5. 静态 6. 追踪