- git安装
yum -y install git
- maven安装
yum -y install maven
- docker安装
添加组:groupadd docker
添加用户到组中:gpasswd -a ${USER} docker
重启服务:systemctl restart docker
- chrome安装
1 安装chrome(root用户)
yum install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
2 安装必要的库(root用户)
yum install mesa-libOSMesa-devel gnu-free-sans-fonts wqy-zenhei-fonts
3 下载驱动(普通用户)
mkdir -p /home/chually/2_hzlh-drp/cps-hzlh-data/chrome_driver/
cd /home/chually/2_hzlh-drp/cps-hzlh-data/chrome_driver/
wget https://chromedriver.storage.googleapis.com/2.38/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
chmod +x chromedriver
- 宝塔面板安装
参考文档:https://www.bt.cn/bbs/thread-19376-1-1.html
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
安装后会显示用户名和密码:
Bt-Panel: http://192.168.100.253:8888/885bc880
username: hgywfs8b
password: 3e270cde
命令参考:https://www.bt.cn/btcode.html
启动宝塔:bt start
重启宝塔:bt stop
停止宝塔:bt restart
卸载宝塔:/etc/init.d/bt stop && chkconfig --del bt && rm -f /etc/init.d/bt && rm -rf /www/server/panel
wget http://download.bt.cn/install/bt-uninstall.sh
sh bt-uninstall.sh
查看修改端口:cat /www/server/panel/data/port.pl
查看日志:cat /tmp/panelBoot.pl
修改脚本
cp /www/server/panel/class/panelSite.py /www/server/panel/class/panelSite.py.back
在panelSite.py文件2701行修改,去掉如下代码,同时在#PROXY-START%s后添加“【%s %s】参数占位符
#PROXY-START%s %s %s
location ~* \.(php|jsp|cgi|asp|aspx)$
{
proxy_pass %s;
proxy_set_header Host %s;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
}
重启宝塔面板 bt restart
反向代理配置
#PROXY-START/api
location /api/
{
proxy_pass http://127.0.0.1:18852/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
add_header Cache-Control no-cache;
expires 12h;
}
#PROXY-END/api