instalação e implantação verniz

Prepare o ambiente: Centos 7

# 关闭防火墙、修改 seLinux 为警告模式
[root@fp-21 ~]# systemctl stop firewalld.service 
[root@fp-21 ~]# setenforce 0

dependência instalação de propriedade

[root@fp-21 ~]# yum -y install autoconf.noarch automake.noarch jemalloc-devel.x86_64 libedit-devel.x86_64 libtool.x86_64 ncurses-devel.x86_64 pcre-devel.x86_64 pkgconfig.x86_64 python-docutils.noarch python-sphinx.noarch graphviz.x86_64
Loaded plugins: fastestmirror
Determining fastest mirrors
……
Complete!

pacote fonte Carregar

[root@fp-21 ~]# cd /opt/
[root@fp-21 opt]# mkdir varnish
[root@fp-21 opt]# cd varnish
[root@fp-21 opt]# rz
[root@fp-21 varnish]# ls
varnish-6.3.2.tgz

Olhe para o tipo, o comando relevante deste pacote: comandos básicos Linux - arquivo

[root@fp-21 varnish]# file varnish-6.3.2.tgz 
varnish-6.3.2.tgz: gzip compressed data, from Unix, last modified: Fri Jan 31 20:27:18 2020, max compression

Use os comandos relevantes para descomprimir

[root@fp-21 varnish]# gunzip varnish-6.3.2.tgz 
[root@fp-21 varnish]# ls
varnish-6.3.2.tar
[root@fp-21 varnish]# tar xf varnish-6.3.2.tar 
[root@fp-21 varnish]# ls
varnish-6.3.2  varnish-6.3.2.tar

Digite verniz

[root@fp-21 varnish]# cd varnish-6.3.2/
[root@fp-21 varnish-6.3.2]# ll
total 948
-rw-r--r--.  1 1000 1000  63162 Jan 31 20:21 aclocal.m4
-rwxr-xr-x.  1 1000 1000    849 Dec 17 17:50 autogen.sh
drwxr-xr-x. 10 1000 1000    190 Jan 31 20:27 bin
drwxr-xr-x.  2 1000 1000    143 Jan 31 20:27 build-aux
-rw-r--r--.  1 1000 1000     95 Aug  2  2017 ChangeLog
-rw-r--r--.  1 1000 1000   8270 Jan 31 20:13 config.h.in
-rwxr-xr-x.  1 1000 1000 761298 Jan 31 20:21 configure
……

Existem dois arquivos executáveis ​​(autogen.sh, configure), primeiro pré-compilados

[root@fp-21 varnish-6.3.2]# ./autogen.sh 
+ libtoolize --copy --force
……
lib/libvmod_debug/Makefile.am:9:   'lib/libvmod_debug/automake_boilerplate.am' included from here
+ autoconf

Pré-compilados não há problema, a próxima no monitoramento ambiental

[root@fp-21 varnish-6.3.2]# ./configure --prefix=/usr/local/varnish
checking for gcc... gcc
……
checking for a Python interpreter with version >= 3.4... none
configure: error: Python >= 3.4 is required.

Erro: python 3.4 ou mais tarde

[root@fp-21 varnish-6.3.2]# python -V
Python 2.7.5

Detalhes, consulte o processo de atualização: no Centos7.6 Python2.7 atualizado para Python3.7

[root@fp-21 varnish-6.3.2]# python -V
Python 3.7.3

ambiente de instalação de detecção de novo

[root@fp-21 varnish-6.3.2]# ./configure --prefix=/usr/local/varnish
checking for gcc... gcc
checking whether the C compiler works... yes
……
config.status : executing Libtool commands
config.status : executing mkdir commands

Não tem problema, o próximo passo

[root@fp-21 varnish-6.3.2]# make
make  all-recursive
make[1]: Entering directory `/opt/varnish/varnish-6.3.2'
Making all in include
……
ModuleNotFoundError: No module named 'docutils'
make[2]: *** [vsl.7] Error 1
make[2]: Leaving directory `/opt/varnish/varnish-6.3.2/man'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/varnish/varnish-6.3.2'
make: *** [all] Error 2

Estão faltando alguma coisa, você pode instalar

[root@fp-21 varnish-6.3.2]# pip install docutils
Collecting docutils
  Downloading https://files.pythonhosted.org/packages/81/44/8a15e45ffa96e6cf82956dd8d7af9e666357e16b0d93b253903475ee947f/docutils-0.16-py2.py3-none-any.whl (548kB)
    100% |████████████████████████████████| 552kB 13kB/s 
Installing collected packages: docutils
Successfully installed docutils-0.16

A instalação novamente

[root@fp-21 varnish-6.3.2]# make
make  all-recursive
make[1]: Entering directory `/opt/varnish/varnish-6.3.2'
Making all in include
……
make[2]: Leaving directory `/opt/varnish/varnish-6.3.2/man'
make[2]: Entering directory `/opt/varnish/varnish-6.3.2'
make[2]: Leaving directory `/opt/varnish/varnish-6.3.2'
make[1]: Leaving directory `/opt/varnish/varnish-6.3.2'

Não tem problema, a última etapa

[root@fp-21 varnish-6.3.2]# make install
Making install in include
make[1]: Entering directory `/opt/varnish/varnish-6.3.2/include'
make  install-am
……
make[2]: Leaving directory `/opt/varnish/varnish-6.3.2'
make[1]: Leaving directory `/opt/varnish/varnish-6.3.2'

A instalação está completa, faça um soft link

[root@fp-21 ~]# ln -s /usr/local/varnish/sbin/varnishd /usr/bin/varnishd

Exibir informações de versão

[root@fp-21 ~]# varnishd -V
varnishd (varnish-6.3.2 revision 6870fd661a2b42c2e8adad838b5d92a71f27dccd)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2019 Varnish Software AS

Serviço início

[root@fp-21 ~]# varnishd -a :6081 -T localhost:6802 -b localhost:8080
Debug: Version: varnish-6.3.2 revision 6870fd661a2b42c2e8adad838b5d92a71f27dccd
Debug: Platform: Linux,3.10.0-957.el7.x86_64,x86_64,-jnone,-sdefault,-sdefault,-hcritbit
Debug: Child (31574) Started

Visualização de processos e portos

# 进程信息
[root@fp-21 ~]# ps -ef |grep varnishd
root      31564      1  0 06:42 ?        00:00:00 varnishd -a :6081 -T localhost:6802 -b localhost:8080
root      31574  31564  0 06:42 ?        00:00:00 varnishd -a :6081 -T localhost:6802 -b localhost:8080
root      31795   7788  0 06:44 pts/0    00:00:00 grep --color=auto varnishd

# 端口信息
[root@fp-21 ~]# ss -lntp |grep varnishd
LISTEN   0    10     127.0.0.1:6802    *:*    users:(("varnishd",pid=31564,fd=9))
LISTEN   0    128      *:6081       *:*       users:(("cache-main",pid=31574,fd=3),("varnishd",pid=31564,fd=3))
LISTEN   0    10       ::1:6802     :::*      users:(("varnishd",pid=31564,fd=8))
LISTEN   0    128      :::6081      :::*      users:(("cache-main",pid=31574,fd=5),("varnishd",pid=31564,fd=5))

Apenas injetar ideias blog é um bom blog

Publicado 40 artigos originais · ganhou elogios 178 · vê 20000 +

Acho que você gosta

Origin blog.csdn.net/xtlhxl/article/details/104780550
Recomendado
Clasificación