1.搭建yum倉庫
1.1yum倉庫(搭建yum倉庫以前必須先掛載/dev/sr0
光盤)
1.1.1去/etc/yum.repos.d目錄下
![image_1cjsqf9d81qqi1q19vm91c1t12om1j.png-1.9kB](http://static.javashuo.com/static/loading.gif)
![image_1cjsqfjdsn5p1bni1dvc1fs81tbm20.png-2.3kB](http://static.javashuo.com/static/loading.gif)
![image_1cjsqfvnp1shh1kk31jqo1a17qhr2d.png-2.5kB](http://static.javashuo.com/static/loading.gif)
1.1.3清理以前的yum的緩存
![image_1cjsqgcnf7np10i1371ck31k232q.png-6kB](http://static.javashuo.com/static/loading.gif)
1.1.4生成新的yum緩存
![image_1cjsqgmbtip8v2t1sl21thv14hv37.png-2kB](http://static.javashuo.com/static/loading.gif)
1.1.5yum -y install
要安裝的軟件包
![image_1cjsqh184152k1ieao081anjhq23k.png-2.3kB](http://static.javashuo.com/static/loading.gif)
1.2yum倉庫腳本搭建
![image_1cjsqknks1b4n1gdk1qa0d9nrhr4k.png-24.1kB](http://static.javashuo.com/static/loading.gif)
1.3本地定製化yum
倉庫(偷包)
1.3.1定製雲yum
倉庫(前提是能夠連的通外網)
1.3.1.1首先得有wget
這個命令,沒有就提早安裝
[root@jumpServer ~]# which wget
/usr/bin/wget
1.3.1.2清空yum配置文件裏全部文件
[root@jumpServer ~]# cd /etc/yum.repos.d/
[root@jumpServer yum.repos.d]# ls
bak CentOS-Media.repo
[root@jumpServer yum.repos.d]# mv CentOS-Media.repo bak/
[root@jumpServer yum.repos.d]# ls
bak
1.3.1.3下載雲yum
源
[root@jumpServer yum.repos.d]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
--2018-09-23 03:07:20-- http://mirrors.aliyun.com/repo/epel-6.repo
Resolving mirrors.aliyun.com... 183.203.69.120
Connecting to mirrors.aliyun.com|183.203.69.120|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 664 [application/octet-stream]
Saving to: 「/etc/yum.repos.d/epel.repo」
100%[================================================>] 664 --.-K/s in 0s
2018-09-23 03:07:20 (173 MB/s) - 「/etc/yum.repos.d/epel.repo」 saved [664/664]
[root@jumpServer yum.repos.d]# ls
bak epel.repo
1.3.1.4不要清空yum
緩存, 也不要生成新的緩存(切記)
1.3.2修改yum
的配置文件
![image_1cjupd17qnonl1d14rucdqojv4d.png-11.9kB](http://static.javashuo.com/static/loading.gif)
1.3.3重新清除yum
緩存,並生成新的緩存(由於修改了yum
的配置文件)
![image_1cjupldk11ktk107s13k518g1d0l5a.png-23.8kB](http://static.javashuo.com/static/loading.gif)
1.3.4實驗偷包
![image_1cjupnfnbc321m1rnonoav1qnq5n.png-2.5kB](http://static.javashuo.com/static/loading.gif)
1.3.5包源在哪
![image_1cjups0ll1ddh1ueo1opp1gt7g5j74.png-4.7kB](http://static.javashuo.com/static/loading.gif)
![image_1cjuq1kqf4n01cj614841npp1rmg7h.png-41.6kB](http://static.javashuo.com/static/loading.gif)
1.3.6把包拉到桌面,再拉到新的虛擬機內
1.4本地定製化yum
倉庫
1.4.1使用光盤源yum倉庫,並清除緩存,生成新緩存
![image_1cjut2tpv1ov7t65iap1uitn4g7u.png-3kB](http://static.javashuo.com/static/loading.gif)
1.4.2必須得裝一個軟件
![image_1cjut7ifn1k4kgdmecm1l4714i68b.png-2.5kB](http://static.javashuo.com/static/loading.gif)
1.4.3生成一個yum
承認的目錄
![image_1cjuteeslmsd7fv1dm116ss1dqf95.png-3.5kB](http://static.javashuo.com/static/loading.gif)
![image_1cjutij8f1fotm856981ltdhtf9i.png-28.8kB](http://static.javashuo.com/static/loading.gif)
1.4.4修改光盤源配置文件
![image_1cjutubqf1fepoii1nrm1ahd1s9tdc.png-2.3kB](http://static.javashuo.com/static/loading.gif)
![image_1cjuu6ac11aqtu0i1cn010tm13b9ep.png-16.1kB](http://static.javashuo.com/static/loading.gif)
1.4.5重新清除緩存並生成新緩存(由於修改了光盤源配置文件)
![image_1cjuu9k341eaf1al012h91gke1mbjgs.png-39.3kB](http://static.javashuo.com/static/loading.gif)
1.5裝包檢查
![image_1cjuuct7r6ef1cki1t22tva1hduh9.png-2.3kB](http://static.javashuo.com/static/loading.gif)
![image_1cjuuedbi1ppeg321ddl1qf91c48hm.png-37.4kB](http://static.javashuo.com/static/loading.gif)
2.源碼編譯
2.1首先經過xshell把本機裏的源碼包傳輸到Linux中
![image_1cjsreu1118381o2j121on1lgi0p.png-14.9kB](http://static.javashuo.com/static/loading.gif)
![image_1cjsrf8rarhuudcrhr1pq0gi116.png-3.4kB](http://static.javashuo.com/static/loading.gif)
![image_1cjsrfqb7136coq61smfk5e1hvv1j.png-2.7kB](http://static.javashuo.com/static/loading.gif)
2.2源碼(開發寫的代碼)編譯安裝軟件程序
![image_1cjsrg9uri0foqp6gh1t521dpk20.png-3.6kB](http://static.javashuo.com/static/loading.gif)
2.3將源碼包解壓縮到/usr/src目錄下
![image_1cjsrgjgd13l4ta115cp113e93c2d.png-5kB](http://static.javashuo.com/static/loading.gif)
2.4進人httpd-2.2.9目錄下
![image_1cjsri4hg1jgnl8214fsp2785a.png-3.2kB](http://static.javashuo.com/static/loading.gif)
2.5預配置安裝程序的安裝目錄
![image_1cjsrip3jhvp12v55512db1rp66n.png-4.4kB](http://static.javashuo.com/static/loading.gif)
2.6檢查上一個命令是否執行成功(最好每一步都測試一遍)
![image_1cjsrj3mg1pk21saart44mq1l3274.png-7.5kB](http://static.javashuo.com/static/loading.gif)
2.7編譯(將人類能看懂的語言轉換成計算機能看懂的語言)
![image_1cjsrjd75v55bj28mlgi9unj7h.png-3.8kB](http://static.javashuo.com/static/loading.gif)
2.8安裝
![image_1cjsrjkb91m1qeuv1rqevja13r27u.png-2.2kB](http://static.javashuo.com/static/loading.gif)
3.Linux七種開機模式
- 0:關機
- 1:單用戶模式
- 2:沒有NFS網絡文件系統的多用戶模式
- 3:多用戶模式,命令模式
- 4:保留模式
- 5:桌面模式
- 6:重啓動
3.1reboot
(重啓)更換模式:
![image_1cjsro4431b3c1bnrhtm2m61m6e8b.png-1.4kB](http://static.javashuo.com/static/loading.gif)
![image_1cjsrobeh7ic3281vq51lrj14gh8o.png-14.9kB](http://static.javashuo.com/static/loading.gif)
![image_1cjsrop1qv9m1vil1rr51ucos59l.png-25.4kB](http://static.javashuo.com/static/loading.gif)
![image_1cjsrp3h910e36lhe113i6hkfa2.png-37.8kB](http://static.javashuo.com/static/loading.gif)
![image_1cjsrpfc946m1s3s122n18cb149raf.png-28.2kB](http://static.javashuo.com/static/loading.gif)
![image_1cjsrpq821gkt1bo6l4c1j2eupjas.png-37.8kB](http://static.javashuo.com/static/loading.gif)
![image_1cjsrs5b8ge1sh73q76fa8lvf9.png-28.2kB](http://static.javashuo.com/static/loading.gif)