综合架构

2021-04-25  本文已影响0人  天生顽皮

1.什么是架构?

集群架构,高并发的时候,从单台(单点)机器转换为集群架构、

集群是一点点演变出来的 

集群中的机器,划分角色(分层次)

2.运维日常工作内容

**网站7*24小时运行,数据不丢,用户体验好,自动化

**日常故障处理:紧急随机处理,不紧急第二天上班处理

**日常查看监控:观察与检查网站的状态,分层次的,多角度监控(硬件、系统、服务、业务)

**项目:不断完善整个网站集群架构

**代码上线(代码放在网站的站点目录)

**日常主动汇报,总结(知识点、学习内容总结、故障总结)

3.总和架构准备

3.1模版机

重新安装1台,linux

优化

软件

安装源  yum

创建虚拟机

一个是NAT模式

有一个是LAN模式

安装系统

修改网卡名字ens33改为eth0

安装界面 选择 install cetnos 7 按tab键 输入 

net.ifnames   biosdevname=0

配置网卡

eth0 10.0.0.200/24 配置网关 ,DNS

eth1 172.16.1.200/24 不配置网关 ,DNS

4.linux系统基础优化

1) 关闭防火墙和selinux    vi    /etc/selinux/config

SELINUX=disable

systemctl  stop firewalld     临时关闭防火墙

systemctl disable firewalld   永久关闭防火墙

2) 配置yum源 base, epel

curl  -o /etc/yum.repos.d/CentOS-Base.repo  http://mirrors.aliyun.com/repo/Centos-7.repo

curl  -o /etc/yum.repos.d/epel.repo  

http://mirrors.aliyun.com/repo/epel-7.repo

3) 常用工具

yum  install   -y    tree   vim wget bash-completion bash-completion-extras

lrzsz net-tools sysstat iotop iftop htop unzip nc nmap

telnet bc psmisc httpd-tools bind-utils nethogs

4) ssh连接慢解决

vi    /etc/ssh/sshd_config

GSSAPIAuthentication no

UseDNS no

最后重启     systemctl restart sshd

5)网络服务关闭NetworkManager 保留network

systsystemctl stop NetworkManager

systemctl disable NetworkManager

6)配置 时间同步 定时任务

# sync time by lidao996

*/2 * * * * /sbin/ntpdate   ntp1.aliyun.com &>/dev/null

8)hosts解析

cat >/etc/hosts<

127.0.0.1   localhost localhost.localdomain localhost4

localhost4.localdomain4

::1         localhost localhost.localdomain localhost6

localhost6.localdomain6

172.16.1.5     lb01

172.16.1.6     lb02

172.16.1.7     web01

172.16.1.8     web02

172.16.1.9     web03

172.16.1.31     nfs01

172.16.1.41     backup

172.16.1.51     db01 db01.etiantian.org

172.16.1.61     m01

EOF

9) 配置sudo

vi    /etc/sudoers

[root@oldboy-muban ~]$ grep wheel /etc/sudoers

## Allows people in group wheel to run all commands

%wheel ALL=(ALL) ALL

# %wheel ALL=(ALL) NOPASSWD: ALL

oldboy  ALL=(ALL) NOPASSWD: ALL

10)检查

上一篇 下一篇

猜你喜欢

热点阅读