安装docker
yum install -y docker
下载centos7镜像
docker pull centos:7.2.1511
启动镜像
docker run -d -i -t -p 58001:58001 -p 58002:58002 -p 58003:58003 -p 58004:58004 -p 56379:56379 -p 53306:53306 hua/tool_chicken_chat /usr/sbin/init
docker start <containerid >
docker exec -it <containerid > /bin/bash
进入容器
docker exec -it <CONTAINER ID> bash
安装所需依赖
yum install -y wget gcc automake autoconf libtool make initscripts net-tools lrzsz openssl-devel -y
安装python3
./install_py3.sh
安装运行redis
yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum --enablerepo=remi install redis
systemctl start redis
安装mysql
wget https://repo.mysql.com/yum/mysql-8.0-community/el/7/x86_64/mysql-community-devel-8.0.18-1.el7.x86_64.rpm
mysql-community-devel-8.0.18-1.el7.x86_64.rpm
yum install gcc gcc-devel python-devel
安装git
curl https://setup.ius.io | sh
yum remove -y git | yum -y install git2u
git --version
安装nginx
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install -y nginx
克隆代码
cd /home
git clone https://gitee.com/huashiyuting/Tool-Chicken-Chat.git
uwsgi启动
uwsgi uwsgi.ini
uwsgi uwsgiWeb.ini
如果上面搭建失败,可以直接下载我生成的镜像
qq群下载:566438779