如何進(jìn)行openresty安裝部署腳本-創(chuàng)新互聯(lián)

本篇文章為大家展示了如何進(jìn)行openresty安裝部署腳本,內(nèi)容簡(jiǎn)明扼要并且容易理解,絕對(duì)能使你眼前一亮,通過這篇文章的詳細(xì)介紹希望你能有所收獲。

創(chuàng)新互聯(lián)公司專注于中大型企業(yè)的成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)和網(wǎng)站改版、網(wǎng)站營(yíng)銷服務(wù),追求商業(yè)策劃與數(shù)據(jù)分析、創(chuàng)意藝術(shù)與技術(shù)開發(fā)的融合,累計(jì)客戶成百上千,服務(wù)滿意度達(dá)97%。幫助廣大客戶順利對(duì)接上互聯(lián)網(wǎng)浪潮,準(zhǔn)確優(yōu)選出符合自己需要的互聯(lián)網(wǎng)運(yùn)用,我們將一直專注高端網(wǎng)站設(shè)計(jì)和互聯(lián)網(wǎng)程序開發(fā),在前進(jìn)的路上,與客戶一起成長(zhǎng)!
  1. 工作中經(jīng)常部署openresty做了個(gè)sh

  2. 壓縮吧解壓到/opt下執(zhí)行腳本,將安裝到/usr/local/openresty

  3. 腳本如下:


#!/bin/bash
#init dir
autoDir="/usr/local/src"
sourceDir="/opt/openresty"
openrestyTarGz="openresty-1.15.8.2.tar.gz"
opensslTarGz="openssl-1.0.1l.tar.gz"
zlibTarGz="zlib-1.2.8.tar.gz"
pcreTarGz="pcre-8.31.tar.gz"

mkdir -p /usr/local/src/{zlib,pcre,openssl,openresty}

#openresty
cd /usr/local/
if [[ -d openresty ]]; then
echo "WARN: openresty is already installed, exit."
#return
exit
fi

#install Dependent package
#yum install -y gcc gcc-c++ pcre zlib openssl

#untar
cd ${sourceDir}
tar zxvf ${openrestyTarGz} -C /usr/local/src/openresty --strip-component=1  
tar zxvf ${opensslTarGz} -C /usr/local/src/openssl --strip-component=1  
tar zxvf ${zlibTarGz} -C /usr/local/src/zlib --strip-component=1
tar zxvf ${pcreTarGz} -C /usr/local/src/pcre --strip-component=1
chmod -R 777 ${autoDir}

#install openresty

cd ${autoDir}/openresty
./configure --prefix=/usr/local/openresty  --with-http_stub_status_module  --with-stream --with-stream_ssl_module --with-pcre=/usr/local/src/pcre --with-openssl=/usr/local/src/openssl --with-zlib=/usr/local/src/zlib
make && make install
if [[ $? == 0 ]]; then
    cp -fv $sourceDir/openresty.service /usr/lib/systemd/system && systemctl daemon-reload
    echo "OK: openresty is installed, exit."
    else
    echo "ERROR: openresty is NOT installed, exit."
fi
4.源碼包如下

上述內(nèi)容就是如何進(jìn)行openresty安裝部署腳本,你們學(xué)到知識(shí)或技能了嗎?如果還想學(xué)到更多技能或者豐富自己的知識(shí)儲(chǔ)備,歡迎關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道。

標(biāo)題名稱:如何進(jìn)行openresty安裝部署腳本-創(chuàng)新互聯(lián)
文章起源:http://bm7419.com/article22/ihgjc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)、網(wǎng)站導(dǎo)航外貿(mào)建站、虛擬主機(jī)、Google用戶體驗(yàn)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

手機(jī)網(wǎng)站建設(shè)