images\cherry_red.png1 Linux运维学习笔记
      images\cherry_blue.png1.1 基本操作命令
         images\cherry_orange.png1.1.1 权限管理
            images\cherry_cyan.png1.1.1.1 chmod
            images\cherry_cyan.png1.1.1.2 chown
            images\cherry_cyan.png1.1.1.3 setfacl
            images\cherry_cyan.png1.1.1.4 chattr
         images\cherry_orange.png1.1.2 用户管理
            images\cherry_cyan.png1.1.2.1 useradd(添加用户)
            images\cherry_cyan.png1.1.2.2 passwd(修改用户密码)
            images\cherry_cyan.png1.1.2.3 userdel(删除用户角色)
            images\cherry_cyan.png1.1.2.4 usermod(修改用户信息)
            images\cherry_cyan.png1.1.2.5 groupadd(添加工作组)
            images\cherry_cyan.png1.1.2.6 groupdel(删除工作组)
         images\cherry_orange.png1.1.3 文件管理
            images\cherry_cyan.png1.1.3.1 cat
            images\cherry_cyan.png1.1.3.2 mv
            images\cherry_cyan.png1.1.3.3 scp,rsync文件传输
               images\cherry_orange_dark.png1.1.3.3.1 scp
            images\cherry_cyan.png1.1.3.4 rz
            images\cherry_cyan.png1.1.3.5 awk
               images\cherry_orange_dark.png1.1.3.5.1 案例
            images\cherry_cyan.png1.1.3.6 cp复制
            images\cherry_cyan.png1.1.3.7 more
            images\cherry_cyan.png1.1.3.8 less
            images\cherry_cyan.png1.1.3.9 mkdir
            images\cherry_cyan.png1.1.3.10 diff
            images\cherry_cyan.png1.1.3.11 head
            images\cherry_cyan.png1.1.3.12 tail
            images\cherry_cyan.png1.1.3.13 sed
            images\cherry_cyan.png1.1.3.14 sort
            images\cherry_cyan.png1.1.3.15 uniq (去重语句)
            images\cherry_cyan.png1.1.3.16 grep
               images\cherry_orange_dark.png1.1.3.16.1 grep(2)
            images\cherry_cyan.png1.1.3.17 xargs
            images\cherry_cyan.png1.1.3.18 tr
            images\cherry_cyan.png1.1.3.19 cut
            images\cherry_cyan.png1.1.3.20 od
            images\cherry_cyan.png1.1.3.21 dos2unix
            images\cherry_cyan.png1.1.3.22 cpio
            images\cherry_cyan.png1.1.3.23 tee
            images\cherry_cyan.png1.1.3.24 column
            images\cherry_cyan.png1.1.3.25 swapon
         images\cherry_orange.png1.1.4 软件包管理
            images\cherry_cyan.png1.1.4.1 yarn
            images\cherry_cyan.png1.1.4.2 zip
         images\cherry_orange.png1.1.5 备份策略
            images\cherry_cyan.png1.1.5.1 tar
            images\cherry_cyan.png1.1.5.2 cp
      images\cherry_blue.png1.2 系统工作常用命令
         images\cherry_orange.png1.2.1 ab(压力测试)
            images\cherry_cyan.png1.2.1.1 ab常见问题
         images\cherry_orange.png1.2.2 nohup
            images\cherry_cyan.png1.2.2.1 bg fg
         images\cherry_orange.png1.2.3 crontab
         images\cherry_orange.png1.2.4 find
            images\cherry_cyan.png1.2.4.1 find
         images\cherry_orange.png1.2.5 tcpdump
         images\cherry_orange.png1.2.6 ifconfig
         images\cherry_orange.png1.2.7 netstat(网络通信情况)
         images\cherry_orange.png1.2.8 ps (查看系统进程)
         images\cherry_orange.png1.2.9 top (系统运维状态)
         images\cherry_orange.png1.2.10 alias
         images\cherry_orange.png1.2.11 pidof
         images\cherry_orange.png1.2.12 kill与killall与pkill
         images\cherry_orange.png1.2.13 uptime(系统负载信息)
         images\cherry_orange.png1.2.14 free(系统内存情况)
         images\cherry_orange.png1.2.15 last(登陆日志)
         images\cherry_orange.png1.2.16 fdisk(磁盘分区)
         images\cherry_orange.png1.2.17 strace
         images\cherry_orange.png1.2.18 lsmod
         images\cherry_orange.png1.2.19 ssh
            images\cherry_cyan.png1.2.19.1 sshpass
         images\cherry_orange.png1.2.20 ftp (sftp)
         images\cherry_orange.png1.2.21 du
         images\cherry_orange.png1.2.22 umask(文件权限)
         images\cherry_orange.png1.2.23 df (磁盘占用情况)
         images\cherry_orange.png1.2.24 curl
         images\cherry_orange.png1.2.25 date
         images\cherry_orange.png1.2.26 lsof
         images\cherry_orange.png1.2.27 chrony
         images\cherry_orange.png1.2.28 cpu运行状态
         images\cherry_orange.png1.2.29 lshw
         images\cherry_orange.png1.2.30 vim
         images\cherry_orange.png1.2.31 lsb_release -a (系统版本信息)
      images\cherry_blue.png1.3 网络基础
         images\cherry_orange.png1.3.1 ifconfig
         images\cherry_orange.png1.3.2 route
         images\cherry_orange.png1.3.3 nslookup
         images\cherry_orange.png1.3.4 ping网关
         images\cherry_orange.png1.3.5 ISO/OSI七层模型
         images\cherry_orange.png1.3.6 TCP/IP三次握手(四次挥手)
            images\cherry_cyan.png1.3.6.1 三次握手
            images\cherry_cyan.png1.3.6.2 四次挥手
         images\cherry_orange.png1.3.7 IP地址网段(可用IP地址)(广播地址)
         images\cherry_orange.png1.3.8 网络连接数
         images\cherry_orange.png1.3.9 mtr
         images\cherry_orange.png1.3.10 ip
      images\cherry_blue.png1.4 系统管理类
         images\cherry_orange.png1.4.1 进程与线程
            images\cherry_cyan.png1.4.1.1 pstree
         images\cherry_orange.png1.4.2 系统安全
            images\cherry_cyan.png1.4.2.1 记录一次远程挖矿病毒
            images\cherry_cyan.png1.4.2.2 漏洞修补
         images\cherry_orange.png1.4.3 nfs远程挂载
            images\cherry_cyan.png1.4.3.1 nfs自动挂载
         images\cherry_orange.png1.4.4 查询系统用户登录情况
         images\cherry_orange.png1.4.5 权限优化
         images\cherry_orange.png1.4.6 备份策略
         images\cherry_orange.png1.4.7 Raid(磁盘阵列)
         images\cherry_orange.png1.4.8 资源查看(监控)
            images\cherry_cyan.png1.4.8.1 dstat(网络监控)
         images\cherry_orange.png1.4.9 启动流程
         images\cherry_orange.png1.4.10 系统优化
         images\cherry_orange.png1.4.11 cpu
      images\cherry_blue.png1.5 Shell编程
         images\cherry_orange.png1.5.1 数组类型
         images\cherry_orange.png1.5.2 if 条件判断
         images\cherry_orange.png1.5.3 for
         images\cherry_orange.png1.5.4 文本截取
         images\cherry_orange.png1.5.5 随机字符串
         images\cherry_orange.png1.5.6 网站检测
            images\cherry_cyan.png1.5.6.1 nmap
         images\cherry_orange.png1.5.7 Debug
         images\cherry_orange.png1.5.8 declare
      images\cherry_blue.png1.6 网络服务类
         images\cherry_orange.png1.6.1 网关
         images\cherry_orange.png1.6.2 SSH服务
         images\cherry_orange.png1.6.3 DHCP + FTP
         images\cherry_orange.png1.6.4 DNS服务
            images\cherry_cyan.png1.6.4.1 智能DNS
         images\cherry_orange.png1.6.5 Apache配置
            images\cherry_cyan.png1.6.5.1 Apache 三种工作模式
         images\cherry_orange.png1.6.6 Apache优化
            images\cherry_cyan.png1.6.6.1 CDN
         images\cherry_orange.png1.6.7 Nginx配置
            images\cherry_cyan.png1.6.7.1 nginx开启SSL证书
            images\cherry_cyan.png1.6.7.2 Session一致性解决方案
            images\cherry_cyan.png1.6.7.3 异步非阻塞方式
            images\cherry_cyan.png1.6.7.4 Nginx反向代理配置出现问题
            images\cherry_cyan.png1.6.7.5 nginx 负载均衡算法
            images\cherry_cyan.png1.6.7.6 nginx status
         images\cherry_orange.png1.6.8 Nginx优化
            images\cherry_cyan.png1.6.8.1 Nginx请求PHP(Tomcat)过程
            images\cherry_cyan.png1.6.8.2 gzip压缩
            images\cherry_cyan.png1.6.8.3 缓存优化
            images\cherry_cyan.png1.6.8.4 反向代理
         images\cherry_orange.png1.6.9 http状态码
      images\cherry_blue.png1.7 数据库管理类
         images\cherry_orange.png1.7.1 集群部署(Amoeba)
         images\cherry_orange.png1.7.2 索引
         images\cherry_orange.png1.7.3 误操作Drop语句如何解决?
         images\cherry_orange.png1.7.4 Redis(缓存数据库)
            images\cherry_cyan.png1.7.4.1 Redis_
      images\cherry_blue.png1.8 Good Luck
      images\cherry_blue.png1.9 Linux(实际工作可能常用命令)
      images\cherry_blue.png1.10 LeetCode(Bash)
         images\cherry_orange.png1.10.1 统计词频
         images\cherry_orange.png1.10.2 有效电话号码
   images\cherry_red.png2 三剑客
      images\cherry_blue.png2.1 正则表达式
         images\cherry_orange.png2.1.1 扩展正则表达式
      images\cherry_blue.png2.2 grep(...过滤)
      images\cherry_blue.png2.3 sed(...替换)
         images\cherry_orange.png2.3.1 sed删除,增加
         images\cherry_orange.png2.3.2 sed 替换
      images\cherry_blue.png2.4 awk(...取列统计)
         images\cherry_orange.png2.4.1 awk模式匹配
         images\cherry_orange.png2.4.2 awk数组
开启HTTPS超文本传输安全协议

前提准备工作

1,域名(已备案)

2,申请SSL证书,阿里云,腾讯云等都有免费的证书申请

举例阿里云,控制台搜索SSL证书

images\169-1.png

与域名绑定即可,一般证书下来时间1~2天左右

我们选择nginx开启SSL服务,下载该类型的即可

images\169-2.png


将该压缩包上传至服务器,创建目录并压缩

unzip xxx.zip
文件内容有两个
images\169-3.png

可自行修改文件名称,注意后缀不用弄错了
xxx.key
xxx.pem

关键步骤,可能出现问题点
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
开启nginx,SSL证书,可能你默认的nginx没有该模块,因此需重新编译nginx ,把缺少的模块添加上去!

nginx -V 查询nginx已配置的相关模块信息
images\169-4.png

nginx 编译源码目录重新编译
./configure --prefix=... 前面的直接复制,在结尾处添加 --with-... 对应的模块即可

make 重新编译
在当前目录下会重新生成一个objs文件夹,进入该文件夹,内部会有 nginx 编译好的文件
可以使用 ./nginx -V 看是否已生成文件

将已编译好的nginx 可执行文件替换掉当前nginx可执行文件
注: 替换时,需对之前nginx可执行文件进行备份操作

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

修改nginx默认配置文件
vi conf.d/default.conf
先备份在修改

server {
listen 80;
listen [::]:80;
server_name gaogaotwo.top;
#对于http链接,将它重定向到443上面
rewrite .* https://$server_name$1 redirect;
#应用位置目录
location / {
root /gaogaotwo/wwwroot;
index index.html index.htm;
}
}
#HTTPS server
server {
listen 443 ssl;
server_name gaogaotwo.top;
#SSL 证书配置,根据你的SSL证书pem,key位置修改
ssl_certificate /etc/nginx/key/gaogaotwo.top.pem;
ssl_certificate_key /etc/nginx/key/gaogaotwo.top.key;
#SSL 缓存
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;

#SSL 选择加密算法
ssl_ciphers HIGH:!aNULL:!MD5;
#SSL 服务端优先使用的加密算法
ssl_prefer_server_ciphers on;

location / {
root /gaogaotwo/wwwroot/;
index index.html index.htm;
}
}

检验证书是否配置正确
nginx -t

重新加载nginx
nginx -s reload

访问游览器域名,http与https都尝试访问一下 如果有一把锁说明配置成功!!
images\169-5.png