搭建一個(gè)網(wǎng)絡(luò)倉(cāng)庫(kù)
服務(wù)端:10.0.0.200
1.準(zhǔn)備軟件包(光盤 緩存 聯(lián)網(wǎng)下載 同步)
掛載光盤
mount /dev/cdrom /mnt
2.通過(guò)ftp共享軟件包存放的目錄
[root@oldboy ~] yum install vsftpd -y
[root@oldboy ~] systemctl start vsftpd
[root@oldboy ~] systemctl stop firewalld
[root@oldboy ~] setenforce 0
3.將光盤中的軟件包都拷貝至ftp的共享目錄下
[root@oldboy ~] mkdir /var/ftp/centos7/
[root@oldboy ~] find /mnt/ -type f -name "*.rpm" exec cp {} /var/ftp/centos7/ \;
4.將共享的目錄設(shè)置成yum倉(cāng)庫(kù)
[root@oldboy ~] yum install createrepo -y
[root@oldboy ~] createrepo /var/ftp/centos7/
客戶端 10.0.0.201
1.關(guān)閉所有的公網(wǎng)yum倉(cāng)庫(kù)
[root@fang ~] gzip /etc/yum.repos.d/
2.新建一個(gè)repo文件胯府,文件中的baseurl指向服務(wù)端
[root@fang ~] cat /etc/yum.repos.d/ftpcentos7.repo
[ftp-centos7]
name = This is Base Repo
baseurl = ftp://10.0.0.200/centos7/
enable = 1
gpgcheck = 0
3.測(cè)試是否能正常安裝軟件
[root@fang ~] yum install httpd -y
如果客戶端需要通過(guò)共享的倉(cāng)庫(kù)安裝zabbix軟件? 怎么辦?
1.服務(wù)端需要提供zabbix軟件相關(guān)的倉(cāng)庫(kù) 10.0.0.200
[root@fang ~] mkdir /var/ftp/zabbix -------------獲取zabbix的軟件包--->
[root@fang ~] find ./ -type f -name "*.rpm" -exec mv {} /var/ftp/zabbix/ \;
將zabbix目錄生成為一個(gè)yum倉(cāng)庫(kù)
[root@fang ~] createrepo /var/ftp/zabbix/
zabbix還缺少的四個(gè)軟件包
wget http://repo.zabbix.com/nonsupported/rhel/7/x86_64/fping-3.10-1.el7.x86_64.rpm
wget http://repo.zabbix.com/nonsupported/rhel/7/x86_64/iksemel-1.42.el7.centos.x86_64.rpm
wget http://repo.zabbix.com/nonsupported/rhel/7/x86_64/iksemel-devel-1.42.el7.centos.x86_64.rpm
wget http://repo.zabbix.com/nonsupported/rhel/7/x86_64/iksemel-utils-1.42.el7.centos.x86_64.rpm
2.客戶端新建一個(gè)repo文件指向服務(wù)端提供的zabbix倉(cāng)庫(kù) 10.0.0.201
[root@fang ~] cat /etc/yum.repos.d/ftpzabbix.repo
[ftp-zabbix]
name = ftp share zabbix repo
baseurl = ftp://10.0.0.200/zabbix/
enable = 1
gpgcheck = 0
3.客戶端測(cè)試zabbix倉(cāng)庫(kù)是否可用
[root@fang ~] yum clean all
[root@fang ~] yum install zabbix-agent
[root@fang ~] yum install zabbix-get
[root@fang ~] yum install zabbix-server
源碼包管理
congiure,生成makefile文件
[root@oldboy ~] ./configure -prefix=/usr/local/nginx-1.16 --with-http_mp4_module
[root@oldboy ~] yum install pcre pcredevel -y
[root@oldboy ~] yum install zlib zlibdevel -y
編譯
[root@oldboy ~]# make
安裝
[root@oldboy ~]# make install
測(cè)試
ln -s /usr/local/nginx-1.16/ /usr/local/nginx /usr/local/nginx/sbin/nginx
最后瀏覽器訪問(wèn)該服務(wù)器的IP地址即可