幾個源:
centos基本源
mysql-community源
cdh源 cloudera-manager源
ambari源
[TOC]
原則問題: 要使用最小安裝剃根,然后通過源的方式安裝自己需要的東西哩盲。從空白開始擴展
一定要閱讀文檔。
dhcp配置文件: /etc/dhcp/dhcpd.conf
default文件: /var/lib/tftpboot/pxelinux.cfg/default
kickstart文件: /var/www/html/ks_config/Centos7-ks.cfg
- [ ] linux基本的原理
- [ ] 做幾個動圖
- [ ] 寫shell---sed命令 netstat命令 awk命令
-
基本知識
-
磁盤管理
-
基本原理
- 什么是磁盤
- linux磁盤基礎(chǔ)知識
- 掛載狈醉、擴容
linux下的磁盤管理
-
擴容廉油、刪除make
-
/root分區(qū)擴容
- [ ] LVM的作用
-
-
-
網(wǎng)絡(luò)管理
- 出現(xiàn)network無法啟動,由于NetworkManager管理套件的影響
-
遠(yuǎn)程重裝
-
基礎(chǔ)知識
-
selinux和firewall是什么
-
selinux是為inux設(shè)計的安全加強系統(tǒng)(由美國國安局設(shè)計)苗傅。是MAC(Mandatory Access Control)的實現(xiàn)抒线。簡而言之,任何進程想在SELinux系統(tǒng)中干任何事情渣慕,都必須先在安全策略配置文件中賦予權(quán)限嘶炭。[后面會有針對selinux的詳解]
關(guān)閉selinux:
臨時關(guān)閉:setenforce 0
永久關(guān)閉: 將/etc/selinux/config的selinux改為disable
- [ ] Firewall是一款linux下的防火墻。
-
-
dhcp是什么
- DHCP(Dynamic Host Configuration Protocol)動態(tài)主機配置協(xié)議逊桦。DCHP基于UDP傳輸眨猎,可以自動為網(wǎng)絡(luò)中的主機配置信息(IP地址、掩碼强经、DNS服務(wù)器地址等)
-
pxe是什么
- PXE(Pre-boot Execution Environment)預(yù)啟動執(zhí)行環(huán)境睡陪。交互過程如下
- [ ] 此處應(yīng)有動圖
kickstart是什么
-
優(yōu)雅的裝系統(tǒng)
[圖片上傳失敗...(image-3dfb32-1553096183615)]
-
linux在啟動流程
BIOS->硬件自檢->引導(dǎo)啟動(MBR)->硬盤啟動[^1]->操作系統(tǒng)
-
-
配置DHCP服務(wù)
yum install dhcpd # 首先要知道自己的ip地址,自己的ip范圍 #修改配置文件 vi /etc/dhcp/dhcpd.conf #在配置文件添加以下內(nèi)容 #設(shè)置DHCP于DNS服務(wù)器的動態(tài)信息更新模式。初學(xué)時完全可以不理這個選項匿情,但是全局設(shè)置中一定要有這個選項兰迫,否則DHCP服務(wù)不能成功啟動。 ddns-update-style interim; #下面開始分配子網(wǎng)码秉,網(wǎng)段是192.168.233.0 子網(wǎng)掩碼是 255.255.255.0 #不能理解網(wǎng)段和子網(wǎng)掩碼的可以去網(wǎng)上查一下逮矛。簡單的說網(wǎng)段規(guī)定了分配IP的段(分配哪一段IP給客戶機),子網(wǎng)掩碼規(guī)定了網(wǎng)段的大小 subnet 192.168.233.0 netmask 255.255.255.0 { range 192.168.233.100 192.168.233.199; #分配給客戶機的IP從192.168.233.100開始到192.168.233.199 option routers 192.168.233.2; #設(shè)置網(wǎng)關(guān) default-lease-time 600; #默認(rèn)租約時間 max-lease-time 7200; #最大租約時間 }
配置tftp
-
配置kickstart
-
配置kickstart
-
-
基本運維知識運維工具
- 對文本處理并批量新建文件夾
sed '/^\s*$/d' bsync.sh | awk 'NR%3==0'|awk '{print $2}'|xargs sudo mkdir -p
-
建立軟鏈接
注意軟鏈接使用 ln -s转砖。 刪除時務(wù)必使用 rm -rf directoryname 不要在后面加 /否則會將文件夾內(nèi)所有內(nèi)容刪除掉
-
nginx的配置
# 刪除nginx的進程 pkill nginx # 檢查nginx的配置文件 nginx -t # 運行nginx nginx # 設(shè)置允許http協(xié)議 # firewall-cmd --permanent --add-service=http # firewall-cmd --reload # nginx增加server模塊 server { listen 80;#監(jiān)聽端口 server_name localhost;#域名 autoindex on; autoindex_exact_size off; autoindex_localtime on; root /srv/www/htdocs } #配置文件 http{里面增加如下內(nèi)容: autoindex on; #開啟nginx目錄瀏覽功能 autoindex_exact_size off; #文件大小從KB開始顯示 autoindex_localtime on; #顯示文件修改時間為服務(wù)器本地時間
-
腳本編寫
- 編寫ssh分發(fā)腳本
#!/bin/bash # 注意此處用于主機已經(jīng)生成了ssh-key password='moon' auto_ssh(){ /usr/bin/expect <<-EOF set time 30 spawn ssh-copy-id -i $HOME/.ssh/id_rsa.pub$1 expect { "*yes/no" { send"yes\r"; exp_ continue } "*password:" { send"$password\r" } } expect eof EOF } for i in $@;do auto_ssh $I done ## 至此所有互信已經(jīng)完成,接下來開始復(fù)制host文件 for i in $@;do scp/etc/hosts root@$i:/etc/hosts #scp/shellscripts/hello root@$i:/usr/local done
- 全自動重裝系統(tǒng)
- C:\Users\john\AppData\Local\Programs\Python\Python36\Scripts;C:\Users\john\AppData\Local\Programs\Python\Python36;C:\Users\john\AppData\Roaming\cabal\bin;C:\Users\john\AppData\Roaming\local\bin;C:\Users\john\AppData\Roaming\npm;C:\Program Files\MongoDB\Server\4.0\bin;%GOPATH%\bin;C:\Users\john\go\bin
-
-
yum源的搭建
- 排除列表
#新建文件 [root@centos-test ~]# vim /usr/local/local_mirror/exclude.list #填入內(nèi)容 SRPMS aarch64 ppc64 ppc64le debug repodata EFI LiveOS images isolinux CentOS_BuildTag EULA GPL RPM-GPG-KEY-CentOS-7 RPM-GPG-KEY-CentOS-Testing-7 drpms
- shell同步腳本
#建立文件 [root@centos-test ~]# /usr/local/local_mirror/rsync.sh #填入內(nèi)容须鼎, 在之前需要新建需要的文件目錄 #epel rsync -avz --exclude-from=/usr/local/local_mirror/exclude.list rsync://mirrors.tuna.tsinghua.edu.cn/epel/7/ /usr/local/local_mirror/epel/7/ createrepo /usr/local/local_mirror/epel/7/ #centos7-base rsync -avz --exclude-from=/usr/local/local_mirror/exclude.list rsync://mirrors.tuna.tsinghua.edu.cn/centos/7/os/x86_64/ /usr/local/local_mirror/centos/7/os/x86_64/ createrepo /usr/local/local_mirror/centos/7/os/x86_64/ #centos7-updates rsync -avz --exclude-from=/usr/local/local_mirror/exclude.list rsync://mirrors.tuna.tsinghua.edu.cn/centos/7/updates/x86_64/ /usr/local/local_mirror/centos/7/updates/x86_64/ createrepo /usr/local/local_mirror/centos/7/updates/x86_64/ #centos7-extras rsync -avz --exclude-from=/usr/local/local_mirror/exclude.list rsync://mirrors.tuna.tsinghua.edu.cn/centos/7/extras/x86_64/ /usr/local/local_mirror/centos/7/extras/x86_64/ createrepo /usr/local/local_mirror/centos/7/extras/x86_64/ #centos7-centosplus rsync -avz --exclude-from=/usr/local/local_mirror/exclude.list rsync://mirrors.tuna.tsinghua.edu.cn/centos/7/centosplus/x86_64/ /usr/local/local_mirror/centos/7/centosplus/x86_64/ createrepo /usr/local/local_mirror/centos/7/centosplus/x86_64/ #centos7.3.1611-base rsync -avz --exclude-from=/usr/local/local_mirror/exclude.list rsync://mirrors.tuna.tsinghua.edu.cn/centos/7.3.1611/os/x86_64/ /usr/local/local_mirror/centos/7.3.1611/os/x86_64/ createrepo /usr/local/local_mirror/centos/7.3.1611/os/x86_64/ #centos7.3.1611-updates rsync -avz --exclude-from=/usr/local/local_mirror/exclude.list rsync://mirrors.tuna.tsinghua.edu.cn/centos/7.3.1611/updates/x86_64/ /usr/local/local_mirror/centos/7.3.1611/updates/x86_64/ createrepo /usr/local/local_mirror/centos/7.3.1611/updates/x86_64/ #centos7.3.1611-extras rsync -avz --exclude-from=/usr/local/local_mirror/exclude.list rsync://mirrors.tuna.tsinghua.edu.cn/centos/7.3.1611/extras/x86_64/ /usr/local/local_mirror/centos/7.3.1611/extras/x86_64/ createrepo /usr/local/local_mirror/centos/7.3.1611/extras/x86_64/ #centos7.3.1611-centosplus rsync -avz --exclude-from=/usr/local/local_mirror/exclude.list rsync://mirrors.tuna.tsinghua.edu.cn/centos/7.3.1611/centosplus/x86_64/ /usr/local/local_mirror/centos/7.3.1611/centosplus/x86_64/ createrepo /usr/local/local_mirror/centos/7.3.1611/centosplus/x86_64/ #賦予權(quán)限 [root@centos-test ~]# chmod +x /usr/local/local_mirror/rsync.sh # 同步某個repo文件,例如cloudera-cdh5 reposync -r cloudera-cdh5 # 安裝mysql-server # 安裝Oracle jdk # cat命令 sed命令 netstat命令 lsof命令
-
運維框架的構(gòu)建
- ELK日志記錄
- 各服務(wù)器性能指標(biāo)探測
分布式計算框架的搭建
-
各類服務(wù)的搭建
- DNS服務(wù)器
- python等源鏡像
- docker
- web服務(wù)府蔗、云計算平臺
腳本的書寫
-
進階知識
- 對性能的理解
- 對磁盤的理解
- 對內(nèi)存的理解
- 對CPU的理解
- 對集群的理解
- 對并發(fā)晋控、并行的理解
- 對自動化、云計算姓赤、容器的理解
一鍵刪除jdk
rpm -qa | grep openjdk | xargs yum -y remove