20 operation and maintenance of the network build and source source yum package management

Yum source within the network to build

A: two computers to experiment

1: Server RedHat server

Ip:  10.0.0.200

2: Client RedHat client

Ip: 10.0.0.201

3: the server and client can ping each other

Two: server configuration is as follows
1. Under current directory, create a folder
the make zabbix
2. By curl command will return the results page redirects to 1.txt
curl http://nginx.org/packages/centos/7/x86_64/RPMS/ > 1.txt
3. the use wget batch 1.txt to filter out website link to download the screening redirected to 2.txt
shell script. Then run 2.txt
grep "the href" 1.txt | awk -F ' "' 'Print $ {2}' | -R & lt Sed 'wget http://nginx.org/packages/centos/ # S # (*.) 7 / x86_64 / RPMS / \ 1 # g '> 2.txt

Three client
1. Install the vsftpd, and start
yum the install the vsftpd -Y
systemctl Start the vsftpd
2. temporarily turn off the firewall, turn off SELinux
systemctl STOP firewalld
the setenforce 0
3. moved to / var / ftp / directory
mv zabbix / var / ftp /
4. access browser
ftp://10.0.0.200/

IV. The list creation packet is stored in a warehouse rpm
① server
yum the install the createrepo -Y
the createrepo / var / FTP / ZABBIX /
② client
VI /etc/yum.repos.d/ftp_zabbix.repo
[ZABBIX-REP]
Monitor = ZABBIX name
BaseURL = ftp://10.0.0.200/zabbix/
enable. 1 =
gpgcheck = 0

yum install zabbix-agent

Source package management

1. compile and install advantages

CD software partial old, many new features may not be available
path can be compiled and installed from the appointed, convenient unified planning
source installation of features can be customized according to your business needs

2. For a standard source distribution C / C ++ package, compile and install process generally include the following:

Unpack: the tar command to download the source code directory to the specified release
configuration: ./configure script, specify the installation directory / function module performed in the source directory option
① passing by the option parameter specifying the installation path and associated features generating Makefile.in template according to the Makefile
② to check the dependence of the outside environment, such as a package dependent
compilation: make operations performed at the source, based on the binary configuration files to generate an executable Makefile single case
is mounted: performing the source tree make install operation, copy the compiled programs and files to the installation directory

3. Compile install nginx

 wget http://nginx.org/download/nginx-1.16.1.tar.gz
 mkdir  /soft
tar xf nginx-1.16.1.tar.gz  -C /soft/
 cd /soft/nginx-1.16.1/
 ./configure --prefix=/usr/local/nginx-1.16
 make
 make install

In order to upgrade the late good (soft link)
LN /usr/local/nginx-1.16/ -s / usr / local / nginx

Prior to the service httpd stop, avoid port is occupied cause nginx not start
systemctl stop httpd

启动nginx
/usr/local/nginx/sbin/nginx

Given the information
will need to install the error prompt execution dependencies ./configure
yum the install PCRE -Y-devel
yum the install zlib-devel -Y

Published 22 original articles · won praise 0 · Views 286

Guess you like

Origin blog.csdn.net/weixin_44648034/article/details/105103673