随笔分类 - Linux
摘要:服务端 环境 操作系统:CentOS Linux release 7.8.2003 (Core) 架构:x86 安装squid yum install squid -y 配置 vi /etc/squid/squid.conf http_access deny all修改为http_access al
阅读全文
摘要:#yumdownloader ##安装 yum install yum-utils -y ##下载软件 yumdownloader --destdir /tmp/dir <package-name> --resolve --enablerepo=[repo] 注: --resolve依赖包也会被下载
阅读全文
摘要:同步线上YUM源仓库 rsync -avrt --delete rsync://mirrors.ustc.edu.cn/centos/7/cloud/x86_64/openstack-stein /home/yum/cloud/ 本地创建私有源仓库 # 安装createrepo工具 yum inst
阅读全文
摘要:桌面右键打开终端 # apt源 root@uos-PC:/home/uos# cat /etc/apt/sources.list ## Generated by deepin-installer deb https://enterprise-packages.chinauos.com/server-
阅读全文
摘要:需求:服务器新添加一个挂载盘,为防止以后存储空间不够需要扩容时格式化磁盘,故使用LVM逻辑卷管理。 LVM简介: LVM是 Logical Volume Manager(逻辑卷管理)的简写,它是Linux环境下对磁盘分区进行管理的一种机制,它由Heinz Mauelshagen在Linux 2.4内
阅读全文
摘要:查看openssh加密算法 sshd -T | grep ciphers
阅读全文
摘要:开发利用OpenOffice组件转换PDF时,发现部分文字乱码,Linux系统本身就不自带Windows中文字体,故而将Windows中文字体导入至Linux。 # 1.安装字体库(已存在的跳过) yum -y install fontconfig # 2.新建存储中文字体的目录 mkdir /us
阅读全文
摘要:bash-it——终端美化、命令补全插件 官网:https://github.com/Bash-it/bash-it uos或ubuntu普通用户与root用户切换时,bash颜色失效 # 拷贝.bash*至家目录 \cp /etc/skel/.bash* /root/
阅读全文
摘要:1. 创建服务配置文件 [root@localhost ~]# cat /etc/systemd/system/test.service [Unit] Description=test Service After=syslog.target [Service] User=root ExecStart
阅读全文
摘要:vi /etc/sudoers test ALL=NOPASSWD: ALL
阅读全文
摘要:0、思路 创建一个新的逻辑分区,将新的逻辑分区格式化ext3(或其他类型)的文件系统,mount到磁盘空间不够的文件系统,就跟原来的分区/文件系统一样的使用 1、准备 1.1 注意使用VMware自带的Expand功能不能有Snapshot存在,所以在expand之前先把所有的Snapshot删掉了
阅读全文
摘要:setfacl -R -m u:test:rwx /opt/test setfacl: 命令. -R:递归 -m: 修改文件的当前 ACL u: 指明用户 test: 用户名 rwx: 要设置的权限 /opt/test: 文件名称 getfacl 目录或文件(查看当前目录或文件的acl状态)
阅读全文
摘要:包源替换 替换yum源 # 阿里 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo # 网易 wget -O /etc/yum.repos.d/CentOS-Base.repo
阅读全文
摘要:一、NFS服务简介 NFS 就是 Network FileSystem 的缩写,最早之前是由sun 这家公司所发展出来的。 它最大的功能就是可以透过网络,让不同的机器、不同的操作系统、可以彼此分享个别的档案 (share files)。所以,你也可以简单的将他看做是一个文件服务器 (file ser
阅读全文