1.安裝openresty
# yum -y install libuuid-devel pcre-devel openssl-devel gcc-c++ wget
# mkdir /openresty
# cd /openresty
# wget https://openresty.org/download/openresty-1.9.15.1.tar.gz
# tar -zxf openresty-1.9.15.1.tar.gz
# cd openresty-1.9.15.1
# ./configure --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module
# gmake && gmake install
# ln -s /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
# nginx -v
2.建立MySQL數據庫並導入數據(腳本在orange/install文件夾下)
# yum -y install mariadb-server
# mysql -u root
# CREATE DATABASE orange CHARACTER SET utf8 COLLATE utf8_general_ci;
# CREATE USER 'orange'@'%' IDENTIFIED BY 'orange';
# GRANT ALL PRIVILEGES ON orange.* TO 'orange'@'%';
# FLUSH PRIVILEGES;
# 最後必定要執行mysql的數據庫導入。
# mysql -u orange -porange -h 10.0.2.15 orange < orange-v0.6.2.sql
3.安裝Orange
安裝以前須要 lor 框架,不然啓動有問題。
# yum install -y git
# git clone https://github.com/sumory/lor.git
# cd lor
# make install
啓動並配置 orange 服務
# service iptables stop
# chkconfig iptables off
# git clone https://github.com/sumory/orange.git
# cd orange
# vim conf/orange.conf
# sh start.sh
Tips:啓動不起來查看端口占用狀況殺掉其餘進程
# netstat -tunlp |grep 80