本篇內(nèi)容介紹了“centos7下nginx-qat的安裝教程”的有關(guān)知識(shí),在實(shí)際案例的操作過程中,不少人都會(huì)遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
獨(dú)山網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián)建站,獨(dú)山網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為獨(dú)山上千提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)網(wǎng)站建設(shè)要多少錢,請(qǐng)找那個(gè)售后服務(wù)好的獨(dú)山做網(wǎng)站的公司定做!
qat的資料主要在intel官網(wǎng)和github上找
intel官網(wǎng):https://01.org/zh/packet-processing/intel%C2%AE-quickassist-technology-drivers-and-patches?langredirect=1&tdsourcetag=s_pcqq_aiomsg
github:https://github.com/intel/asynch_mode_nginx
官網(wǎng)上主要是驅(qū)動(dòng)的安裝包,安裝說明,配置文件和其它說明,根據(jù)自己的qat卡型號(hào),在官網(wǎng)上下載對(duì)應(yīng)的驅(qū)動(dòng),查看對(duì)應(yīng)的安裝說明進(jìn)行安裝。然后安裝nginx-qat先跑通所有的測(cè)試,最后根據(jù)需要去查看配置文件和其它說明的pdf修改對(duì)應(yīng)的配置文件
環(huán)境:
qat : Intel QuickAssist Technology DH895xCC kernel: 3.10.0-693.el7.x86_64
環(huán)境變量設(shè)置
# export NGINX_INSTALL_DIR=/usr/local/nginx # export OPENSSL_LIB=/usr/local/ssl # export QZ_ROOT=/root/nginx-qat/QATzip # export ICP_ROOT=/root/nginx-qat/QAT_Driver # export NGINX_SRC_DIR=/root/nginx-qat/asynch_mode_nginx # export QATZIP_SRC_DIR=/root/nginx-qat/QATzip # export OPENSSL_SRC_DIR=/root/nginx-qat/openssl-1.1.1c # export PERL5LIB=$PERL5LIB:/root/nginx-qat/openssl-1.1.1c # export LD_LIBRARY_PATH=/root/nginx-qat/QAT_Driver/build
1.安裝 qat_driver
# cd ~ # mkdir nginx-qat # cd nginx-qat # mkdir QAT_Driver # cd QAT_Driver # wget https://01.org/zh/packet-processing/intel%C2%AE-quickassist-technology-drivers-and-patches?langredirect=1&tdsourcetag=s_pcqq_aiomsg # tar -zxvf qat1.7.l.4.6.0-00025.tar.gz # ./configure # make # make install # lsmod | fgrep qa
2.安裝openssl
# cd ~/nginx-qat/openssl # ./config --prefix=/usr/local/ssl -Wl,-rpath=/usr/local/ssl/lib # make depend # make # make install # export OPENSSL_ENGINES=/usr/local/ssl/lib/engines-1.1
3.安裝 qat_engine,安裝完測(cè)試是否可以使用qat卡進(jìn)行加解密
# cd ~/nginx-qat # git clone https://github.com/intel/QAT_Engine.git # cd QAT_Engine/ # ./autogen.sh # ./configure --with-qat_dir=/root/nginx-qat/QAT_Driver --with-openssl_dir=/root/nginx-qat/openssl-1.1.1c --with-openssl_install_dir=/usr/local/ssl --enable-upstream_driver --enable-usdm # make # make install # cp qat/config/c6xx/multi_process_optimized/c6xx_dev* /etc/ # service qat_service restart # /usr/local/ssl/bin/openssl engine -t -c -vvvv qat
4.安裝qat_zip
# cd ~/nginx-qat # git clone https://github.com/intel/QATzip.git # cd QATzip/ # service qat_service stop # echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages # rmmod usdm_drv # insmod $ICP_ROOT/build/usdm_drv.ko max_huge_pages=1024 max_huge_pages_per_process=16 # ./configure --with-ICP_ROOT=$ICP_ROOT # make clean # make all install # cp config_file/c6xx/multiple_process_opt/c6xx_dev* /etc/ # service qat_service restart # ./setenv.sh # cd $QZ_ROOT/test/performance_tests # ./run_perf_test.sh
5.安裝nginx-test
# cd ~/nginx-qat/ # git clone https://github.com/intel/asynch_mode_nginx.git # ./configure --prefix=$NGINX_INSTALL_DIR --with-http_ssl_module --add-dynamic-module=modules/nginx_qatzip_module --add-dynamic-module=modules/nginx_qat_module/ --with-cc-opt="-DNGX_SECURE_MEM -I$OPENSSL_LIB/include -I$QZ_ROOT/include -Wno-error=deprecated-declarations" --with-ld-opt="-Wl,-rpath=$OPENSSL_LIB/lib -L$OPENSSL_LIB/lib -L$QZ_ROOT/src -lqatzip -lz" # make # make install
6.運(yùn)行test(在這之前要修改qat驅(qū)動(dòng)的配置文件) 詳見下面這個(gè)issue https://github.com/intel/asynch_mode_nginx/issues/28
# cd ~/nginx-qat/asynch_mode_nginx/test # ./nginx-test qat
“centos7下nginx-qat的安裝教程”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!