多米诺骨牌源
最快捷的苹果资讯

Crysadm(云监工)Centos6-7部署教程

1.安装python3
编译需要的一些包,此步骤的目的是python3 与 系统自带的python2共存

yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-deve

下载解压并编译

yum install wget
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
tar -zxvf Python-3.5.1.tgz
cd Python-3.5.1
./configure --prefix=/usr/local --enable-shared
make
make altinstall
让库起作用
echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf
ldconfig
重启才能生效

2.安装pip

yum install curl
curl -O https://bootstrap.pypa.io/get-pip.py
python3.5 get-pip.py
/usr/local/bin/pip3.5 install redis
/usr/local/bin/pip3.5 install requests
/usr/local/bin/pip3.5 install flask

3.安装redis

yum -y install epel-release
yum -y install redis
chkconfig redis on #开机启动
service redis start #启动redis
service redis stop  #关闭redis
service redis status #状态查询

—-设置防火墙,开端口还是全关,按自己情况选择

service iptables stop #临时关闭防火墙
service iptables start
/var/lib/redis/ 数据库目录

5.解压源码上传
6.cd到源码目录,分别运行

nohup python3.5 crysadm.py&
nohup python3.5 crysadm_helper.py&
查看进程状态 ps aux|grep xxx
暂停进程 kill -STOP 18900
恢复进程 kill -CONT 18900

7.访问http://主机IP:5000/install 生成管理员账号 (注:5000是默认端口,如有修改config.py按修改过的打开)

8.云监工开机自启动(Linux)

echo 'Runing Crysadm'
python3 /home/crysadm/crysadm/crysadm_helper.py >> /tmp/error 2>&1 & //这里注意修改成自己的云监工目录文件位置!
python3 /home/crysadm/crysadm/crysadm.py >> /tmp/error 2>&1 & //这里注意修改成自己的云监工目录文件位置!
exit 0

文件是/etc/rc.locl文件,将脚本添加到 exit 0 的前面即可。注意修改成自己的云监工目录!

Crysadm723

Crysadm715

https://github.com/hauntek/crysadm

https://github.com/xyzt07/crysadm

crysadm-master

https://github.com/jzpo/Crysadm

Crysadm-2019422r

sed -i 's/\r$//' setup.sh
crysadm/account.py
176行
elif account_no >= user_info.get('max_account_no'):
安装 ip:4000/install
或者 修改点数

nginx 端口反向代理

  location / {
        proxy_redirect off;
        proxy_set_header Host $host:$server_port;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:5000/;
        }


未经允许不得转载:多米诺骨牌 » Crysadm(云监工)Centos6-7部署教程
分享到:

评论 抢沙发

提交评论

  •   昵称 (必填)
  • 邮箱 (必填)
  • 网址 (选填)