Linux 自動化運維實戰
吳光科,彭威城,文贇
買這商品的人也買了...
-
$400$380 -
$680$537 -
$480$432 -
$2,384CCSP (ISC)2 Certified Cloud Security Professional Official Study Guide & Practice Tests Bundle, 2/e
-
$600$468 -
$414$393 -
$880$748 -
$450$351 -
$630$498 -
$414$393 -
$654$621 -
$774$735 -
$414$393 -
$414$393 -
$414$393 -
$599$569 -
$720$562 -
$600$468 -
$880$695 -
$650$507 -
$680$530 -
$980$774 -
$790$624 -
$414$393 -
$352Linux 企業運維實戰 (Redis + Zabbix + Nginx + Prometheus + Grafana + LNMP)
相關主題
商品描述
《Linux自動化運維實戰》從實用的角度出發,詳細介紹了Linux自動化運維領域的相關理論、技術與應用,包括Shell企業編程基礎、Shell編程高級企業實戰、自動化運維發展、Puppet自動運維企業實戰、Ansible自動運維企業實戰、SaltStack自動運維企業實戰。 《Linux自動化運維實戰》免費提供與書中內容相關的視頻課程講解,以指導讀者深入地進行學習,詳見前言中的說明。 《Linux自動化運維實戰》既可作為高等學校電腦相關專業的教材,也可作為系統管理員、網絡管理員、Linux運維工程師及網站開發、測試、設計等人員的參考用書。
目錄大綱
第 1 章 Shell 企業編程基礎............................................................................................................. 1
1.1 Shell 編程入門.........................................................................................................................................1
1.2 Shell 腳本及編寫 Hello World 程序 ..........................................................................................................3
1.3 Shell 編程................................................................................................................................................3
1.3.1 變量詳解 ......................................................................................................................................3
1.3.2 系統變量 ......................................................................................................................................4
1.3.3 環境變量 ......................................................................................................................................4
1.3.4 用戶變量 ......................................................................................................................................5
1.4 if 條件語句實戰 ......................................................................................................................................6
1.5 Shell 編程括號和符號詳解 ......................................................................................................................7
1.5.1 括號詳解 ......................................................................................................................................7
1.5.2 符號詳解 ......................................................................................................................................8
1.6 MySQL 數據庫備份腳本 ..........................................................................................................................8
1.7 LNMP 一鍵自動化安裝腳本 ....................................................................................................................9
1.8 for 循環語句實戰...................................................................................................................................13
1.9 while 循環語句實戰...............................................................................................................................14
1.10 case 選擇語句實戰 ..............................................................................................................................17
1.11 select 選擇語句實戰 ............................................................................................................................19
1.12 Shell 編程函數實戰 .............................................................................................................................20
1.13 Shell 編程“四劍客”..........................................................................................................................21
1.13.1 find ...........................................................................................................................................21
1.13.2 sed ............................................................................................................................................23
1.13.3 awk ...........................................................................................................................................27
1.13.4 grep...........................................................................................................................................30
1.14 Shell 數組編程.....................................................................................................................................32
第 2 章 Shell 編程高級企業實戰 ................................................................................................... 35
2.1 Shell 編程 Linux 系統備份腳本..............................................................................................................35
2.2 Shell 編程收集服務器信息腳本 .............................................................................................................37
2.3 Shell 編程拒絕惡意 IP 登錄腳本............................................................................................................39
2.4 Shell 編程 LAMP 部署腳本 ....................................................................................................................40
VI Linux 自動化運維實戰
2.5 Shell 編程 LNMP 部署腳本 ....................................................................................................................44
2.6 Shell 編程 MySQL 主從復制腳本 ...........................................................................................................47
2.7 Shell 編程修改 IP 及主機名腳本............................................................................................................50
2.8 Shell 編程 Zabbix 安裝配置腳本 ............................................................................................................53
2.9 Shell 編程 Nginx 虛擬主機腳本..............................................................................................................55
2.10 Shell 編程 Nginx、Tomcat 腳本 ............................................................................................................57
2.11 Shell 編程管理 Linux 用戶和組腳本.....................................................................................................60
2.12 Shell 編程 Vsftpd 虛擬用戶管理腳本....................................................................................................64
2.13 Shell 編程 Apache 多版本軟件安裝腳本...............................................................................................66
2.14 Shell 編程局域網 IP 探活腳本 .............................................................................................................68
2.15 Shell 編程 Apache 虛擬主機管理腳本 ..................................................................................................72
2.16 Shell 編程實現 Apache 高可用腳本......................................................................................................73
2.17 Shell 編程拒絕黑客攻擊 Linux 腳本.....................................................................................................75
2.18 Shell 編程 mysqldump 數據庫自動備份腳本.........................................................................................77
2.19 Shell 編程 MySQL 主從自動配置腳本 ..................................................................................................79
2.20 Shell 編程部署 Tomcat 多實例腳本 ......................................................................................................81
2.21 Shell 編程 Nginx 日誌切割腳本............................................................................................................84
2.22 Shell 編程 Tomcat 實例和 Nginx 均衡腳本 ............................................................................................84
2.23 Shell 編程密碼遠程執行命令腳本........................................................................................................96
2.24 Shell 編程密碼遠程復制文件腳本........................................................................................................97
2.25 Shell 編程 Bind DNS 管理腳本 .............................................................................................................99
2.26 Shell 編程 Docker 虛擬化管理腳本 .................................................................................................... 105
2.27 Shell 編程腳本................................................................................................................................... 109
2.27.1 Shell 編程採集服務器硬件信息腳本........................................................................................ 109
2.27.2 Shell 編程 Linux 系統初始化腳本 ............................................................................................ 109
2.27.3 Shell 編程 Xtrabackup 數據庫自動備份腳本 ............................................................................ 110
2.27.4 Shell 編程 Linux 服務器免密鑰分發腳本 ................................................................................. 110
2.27.5 Shell 編程 Nginx 多版本軟件安裝腳本..................................................................................... 110
2.27.6 Shell 編程自動收集軟件、埠、進程腳本............................................................................. 111
2.27.7 Shell 編程 LVS 負載均衡管理腳本 .......................................................................................... 111
2.27.8 Shell 編程 Keepalived 管理腳本 ............................................................................................... 111
2.27.9 Shell 編程 Discuz 門戶網站自動部署腳本................................................................................ 111
2.27.10 Shell 編程監控 Linux 磁盤分區容量腳本 ............................................................................... 112
第 3 章 自動化運維發展.............................................................................................................. 113
3.1 傳統運維方式簡介 .............................................................................................................................. 113
3.2 自動化運維簡介.................................................................................................................................. 114
目錄 VII
3.3 自動化運維的具體內容....................................................................................................................... 114
3.4 建立高效的 IT 自動化運維管理 .......................................................................................................... 114
3.5 IT 自動化運維工具.............................................................................................................................. 115
3.6 IT 自動化運維體系.............................................................................................................................. 116
第 4 章 Puppet 自動運維企業實戰 .............................................................................................. 117
4.1 Puppet 入門 ......................................................................................................................................... 117
4.2 Puppet 工作原理.................................................................................................................................. 118
4.3 Puppet 安裝配置.................................................................................................................................. 119
4.4 Puppet 企業案例演示 .......................................................................................................................... 122
4.5 Puppet 常見資源及模塊....................................................................................................................... 124
4.6 Puppet file 資源案例 ............................................................................................................................ 126
4.7 Puppet package 資源案例 ..................................................................................................................... 129
4.8 Puppet service 資源案例....................................................................................................................... 131
4.9 Puppet exec 資源案例 .......................................................................................................................... 133
4.10 Puppet cron 資源案例......................................................................................................................... 136
4.11 Puppet 日常管理與配置..................................................................................................................... 138
4.11.1 Puppet 自動認證...................................................................................................................... 138
4.11.2 Puppet 客戶端自動同步........................................................................................................... 139
4.11.3 Puppet 服務器端主動推送....................................................................................................... 140
4.12 Puppet 批量部署案例......................................................................................................................... 141
4.12.1 Puppet 批量修改靜態 IP 案例.................................................................................................. 142
4.12.2 Puppet 批量配置 NTP 同步服務器 ........................................................................................... 143
4.12.3 Puppet 自動部署及同步網站 ................................................................................................... 145
第 5 章 Ansible 自動運維企業實戰.............................................................................................. 148
5.1 Ansible 工具特點................................................................................................................................. 148
5.2 Ansible 運維工具原理 ......................................................................................................................... 148
5.3 Ansible 管理工具安裝配置 .................................................................................................................. 149
5.4 Ansible 工具參數詳解 ......................................................................................................................... 151
5.5 Ansible ping 模塊實戰.......................................................................................................................... 152
5.6 Ansible command 模塊實戰 .................................................................................................................. 152
5.7 Ansible copy 模塊實戰 ......................................................................................................................... 154
5.8 Ansible YUM 模塊實戰 ........................................................................................................................ 156
5.9 Ansible file 模塊實戰 ........................................................................................................................... 157
5.10 Ansible user 模塊實戰........................................................................................................................ 159
5.11 Ansible cron 模塊實戰........................................................................................................................ 160
5.12 Ansible synchronize 模塊實戰 ............................................................................................................. 162
VIII Linux 自動化運維實戰
5.13 Ansible Shell 模塊實戰....................................................................................................................... 164
5.14 Ansible service 模塊實戰.................................................................................................................... 166
5.15 Ansible Playbook 應用 ........................................................................................................................ 168
5.16 Ansible 配置文件詳解........................................................................................................................ 174
5.17 Ansible 性能調優............................................................................................................................... 175
第 6 章 SaltStack 自動運維企業實戰 .......................................................................................... 179
6.1 SaltStack 運維工具特點 ....................................................................................................................... 179
6.2 SaltStack 運維工具簡介 ....................................................................................................................... 179
6.3 SaltStack 運維工具原理 ....................................................................................................................... 180
6.4 SaltStack 平臺配置實戰 ....................................................................................................................... 181
6.5 SaltStack 節點 Hosts 及防火牆設置 ...................................................................................................... 181
6.6 SaltStack 管理工具安裝配置................................................................................................................ 182
6.7 SaltStack 工具參數詳解 ....................................................................................................................... 183
6.8 SaltStack ping 模塊實戰 ....................................................................................................................... 185
6.9 SaltStack cmd 模塊實戰........................................................................................................................ 185
6.10 SaltStack copy 模塊實戰 ..................................................................................................................... 186
6.11 SaltStack pkg 模塊實戰....................................................................................................................... 187
6.12 SaltStack service 模塊實戰.................................................................................................................. 188
6.13 SaltStack 配置文件詳解 ..................................................................................................................... 189
6.14 SaltStack State 自動化實戰 ................................................................................................................. 190
6.14.1 SLS 文件企業實戰案例一........................................................................................................ 192
6.14.2 SLS 文件企業實戰案例二........................................................................................................ 192
6.14.3 SLS 文件企業實戰案例三........................................................................................................ 193
6.14.4 SLS 文件企業實戰案例四........................................................................................................ 193
6.14.5 SLS 文件企業實戰案例五........................................................................................................ 194
6.14.6 SLS 文件企業實戰案例六........................................................................................................ 195
6.14.7 SLS 文件企業實戰案例七........................................................................................................ 195
6.14.8 SLS 文件企業實戰案例八........................................................................................................ 196