ニスのインストールと展開

環境を準備します。CentOSに7

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

インストール所有依存性

[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!

アップロードソースパッケージ

[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

タイプ、このパッケージの関連するコマンドを見てください:Linuxの基本的なコマンドを-ファイルを

[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

解凍に関連するコマンドを使用します。

[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

ニスを入力します。

[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
……

2つの実行可能ファイル(autogen.shは、configure)、最初のプリコンパイルがあります

[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

何の問題、環境モニタリングの次をプリコンパイルしません

[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.

エラー:のpython 3.4以降

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

詳細は、アップグレードプロセスを参照してください。Centos7.6 Python2.7でPython3.7にアップグレード

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

再び検出設置環境

[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

問題ありません、次のステップ

[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

何かが欠けている、あなたがインストールすることができます

[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

インストールを再び

[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'

問題ありません、最後のステップ

[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'

インストールが完了し、ソフトリンクを行います

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

ビューのバージョン情報

[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

サービス開始

[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

ビューのプロセスとポート

# 进程信息
[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))

唯一の注入アイデアのブログは良いブログです

公開された40元の記事 ウォンの賞賛178 ・は 20000 +を見て

おすすめ

転載: blog.csdn.net/xtlhxl/article/details/104780550