业务系统安装

修改/etc/sudoers 添加nginx   ALL=(ALL)       NOPASSWD: ALL

安装源yum install -y

https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm

安装postgresql :  yum install -y postgresql10 postgresql10-server

之后运行/usr/pgsql-10/bin/postgresql-10-setup initdb

systemctl enable postgresql-10

复制pg_hba.conf 到/var/lib/pgsql/10/data  复制postgresql.conf 到/var/lib/pgsql/10/data/复制default.conf到/etc/nginx/conf.d/

复制www.conf到/etc/php-fpm.d/

复制default.conf 到/etc/nginx/conf.d/

www726.tar.gz解压覆盖到 /var

修改ip地址vi /var/www/.env

关闭防火墙

systemctl stop firewalld.service

systemctl disable firewalld.service

运行  systemctl restart nginx

systemctl restart php-fpm       

systemctl restart postgresql-10

chmod 755 /root

su postgres

psql

CREATE DATABASE was;              [注意结尾输入";"]

将was_726.sql导入到postgres数据库

psql -h $hostip -U postgres -f /root/was_726.sql was

后端部分:

yum -y install wget

安装python3.6

安装psycopg2(python3 连接postgres组件)

安装tcpdump

安装libpcap

复制window上的python后端文件夹ywsj_py内文件到/centos7的/root文件夹下

修改http_capture内的tcpdump文件夹地址

重启crondtcp添加定时任务:

crontab -e

SHELL=/bin/bash

*/1 * * * * nohup/root/http_capture.sh >/dev/null 2>&1

*/1 * * * * nohup/root/ywsj_http.sh >/dev/null 2>&1 &

*/1 * * * * nohup/root/txtosql.sh >/dev/null 2>&1 &

*/1 * * * * nohup/root/ywsj_user.sh >/dev/null 2>&1 &

*/1 * * * * nohup/root/ywsj_study.sh >/dev/null 2>&1 &

*/1 * * * * nohup/root/ywsj_stragey_handle.sh >/dev/null 2>&1 &

*/1 * * * * nohup/root/ywsj_stragey_custom.sh >/dev/null 2>&1 &

*/1 * * * * nohup/root/ywsj_stragey_power.sh >/dev/null 2>&1 &

*/1 * * * * nohup/root/ywsj_stragey_frequency.sh >/dev/null 2>&1 &

*/1 * * * * nohup/root/ywsj_stragey_websafe.sh >/dev/null 2>&1 &

0 * * * * nohup/root/keepromsic.sh >/dev/null 2>&1

*/1 * * * * nohup /root/netkeep.sh >/dev/null 2>&1 &

运行  systemctl restart nginx

systemctl restart php-fpm       

systemctl restart postgresql-10

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容