日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

kong1.0安装

發布時間:2024/4/15 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 kong1.0安装 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.安裝依賴

yum install -y gcc gcc-c++ yum install -y pcre pcre-devel yum install -y zlib zlib-devel

2.#openssl安裝

#openssl?是一個安全套接字層密碼庫,囊括主要的密碼算法、常用的密鑰和證書封裝管理功能及?SSL?協議

yum install -y openssl openssl-devel

3.安裝postgres10

  • Install the repository RPM: yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
  • 安裝postgresql10-contrib和postgresql10-server。 yum install postgresql10-contrib postgresql10-server -y

    ?

  • ?

    修改默認數據目錄

    Postgresql默認的數據目錄是/var/lib/pgsql/版本號/data目錄,這要求你在/var下有足夠的存儲空間,我們這里將其換掉,假設/home的空間很大。

    首先在/home下創建一個Postgresql的數據目錄,指定所有者postgres同時分配權限

    mkdir /home/postgresql chown postgres:postgres /home/postgresql chmod 750 /home/postgresql

    ?

    設置環境變量:

    export?PATH=/usr/pgsql-10/bin:$PATH export?LD_LIBRARY_PATH=/usr/pgsql-10/lib export PGDATA=/home/postgresql

    切換到postgres用戶,使用initdb初始化數據庫,這樣在/home/postgresql下會增加很多東西。

    修改/usr/lib/systemd/system/postgresql-10.service文件的內容,在#Location of database direcotry里面指定正確的PGDATA:

    vi /usr/lib/systemd/system/postgresql-10.service #修改Environment=PGDATA=/var/lib/pgsql/10/data/為 Environment=PGDATA=/home/postgresql

    ?

  • 執行初始化數據庫

    su - postgres initdb

    ?

  • #配置數據庫服務開機啟動并立即啟動數據庫服務

    systemctl enable postgresql-10.service service postgresql-10 start service postgresql-10 status

    ?

  • 創建kong數據庫 su - postgres qsql CREATE USER kong; CREATE DATABASE kong OWNER kong;

    ?

  • 安裝openresty依賴(切換到root)
  • yum install -y epel-release yum install -y luarocks
  • yum install git -y git clone git://github.com/luarocks/luarocks.git ./configure --lua-suffix=jit --with-lua=/usr/local/openresty/luajit --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 make install 1安裝PCRE庫(可在官網下載最新版本)
    ? mkdir /usr/local/nginxTools cd /usr/local/nginxTools yum install wget -y wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz? tar -zxvf pcre-8.39.tar.gz cd pcre-8.39 ./configure make && make install
    ? 2.安裝openssl庫
    ? yum -y install openssl openssl-devel

    ?

  • 下載OpenResty壓縮文件

  • cd /usr/local/nginxTools wget https://openresty.org/download/openresty-1.13.6.2.tar.gz tar -xvf openresty-1.13.6.2.tar.gz cd openresty-1.13.6.2/ ./configure --with-pcre-jit --with-http_ssl_module --with-http_realip_module --with-http_stub_status_module --with-http_v2_module --prefix=/usr/local/bin/openresty make -j2 make install //默認安裝在--prefix指定的目錄,這里是:/usr/local/bin/openresty #設置環境變量 export PATH=/usr/local/openresty/bin:$PATH
  • 安裝kong cd /usr/local/nginxTools wget https://bintray.com/kong/kong-rpm/download_file?file_path=centos%2F7%2Fkong-1.0.3.el7.noarch.rpm -O kong-1.0.3.el7.noarch.rpm yum install kong-1.0.3.el7.noarch.rpm -y

    ?

  • #準備kong的配置文件, cd /etc/kong cp kong.conf.default kong.conf # 在kong.conf中填入數據地址、用戶、密碼、端口、日志路徑等#kong默認的代理地址改成:proxy_listen = 0.0.0.0:80, 0.0.0.0:443 默認的管理地址是:admin_listen = 127.0.0.1:8001, 127.0.0.1:8444 ssl #初始化數據 kong migrations bootstrap #創建kong的數據庫: kong migrations up -c /etc/kong/kong.conf #啟動kong: kong start -c /etc/kong/kong.conf #如果提示 [warn] ulimit is currently set to "1024". For better performance set it to at least "4096" 則修改一下ulimit ulimit -n 4096
  • 14上安裝 Node.js?

    mkdir /usr/software cd /usr/software/ wget https://nodejs.org/dist/v10.9.0/node-v10.9.0-linux-x64.tar.xz // 下載 tar xf node-v10.9.0-linux-x64.tar.xz // 解壓 mv node-v10.9.0-linux-x64 nodejs // 進入解壓目錄 ln -s /usr/software/nodejs/bin/npm /usr/local/bin/ ln -s /usr/software/nodejs/bin/node /usr/local/bin/ #node -v // 執行node命令 查看版本 v10.9.0 # Install Kong Dashboard npm install -g kong-dashboard ln -s /usr/software/nodejs/bin/kong-dashboard /usr/local/bin/ # Start Kong Dashboard kong-dashboard start --kong-url http://0.0.0.0:8001# Start Kong Dashboard on a custom port #kong-dashboard start --kong-url http://kong:8001 --port [port]# Start Kong Dashboard with basic auth #kong-dashboard start --kong-url http://kong:8001 --basic-auth user1=password1 user2=password2# See full list of start options kong-dashboard start --help

    ?

    超強干貨來襲 云風專訪:近40年碼齡,通宵達旦的技術人生

    總結

    以上是生活随笔為你收集整理的kong1.0安装的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。