3.2.1.
yum源(c7)
#修改系统默认的源 base
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
#增加epel源
curl -o /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
#php webtatic源 或remi源
3.2.2. 麒麟sp3
不要修改默认的源, kylin_x86_64.repo 保留相当于是base源,update源...
可以增加1个epel源(centos 7就行)
坑: 麒麟系统中 yum源中
$releasever 正常是系统版本 比如centos 7 就是7 麒麟中这个变量是10
$basearch/ x86_64/aarch64 这个没有坑
nginx源
[root@web01 ~]# cat /etc/yum.repos.d/ngx.repo
[nginx-stable]
name=nginx stable repo
#baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
baseurl=http://nginx.org/packages/centos/7/$basearch/ #这里直接写为7即可.
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
3.2.3. Ubuntu xxx.xxx
cp /etc/apt/sources.list /tmp/sources.list
修改文件即可
备份ubt源不要放在/etc/apt/目录,只要放了就会被读取.
apt源内容 ubt20.04 lts
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
apt update
4. 定时任务使用与管理
ubt/debian系统lsyncd配置文件路径
grep -n ^CONFIG /etc/init.d/lsyncd
18:CONFIG=/etc/lsyncd/lsyncd.conf.lua
7.3.2. sersync
没有区别,二进制部署
8. 管理工具
8.1. ansible
host_key_checking = False
deprecation_warnings = False
interpreter_python = /usr/bin/python3
[inventory]
[privilege_escalation]
[paramiko_connection]
[ssh_connection]
[persistent_connection]
[accelerate]
[selinux]
[colors]
[diff]
9.
web服务
9.1.
nginx
# 永久取消tmp分区
[root@m01 ~]# systemctl disable tmp.mount
[root@m01 ~]# systemctl mask tmp.mount
Created symlink /etc/systemd/system/tmp.mount → /dev/null.
[root@m01 ~]# systemctl stop tmp.mount