标签:设置 连接 make libs rem gdb 客户 readline 解压
安装centos7
解压安装python3 tar -xf Python-3.6.5.tar.xz 解压缩xz压缩包
源码编译安装
先要安装依赖包 yum groupinstall ‘Development Tools‘ yum install -y ncurses-libs zlib-devel mysql-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel mkdir /usr/local/python3 cd Python-3.6.5
#编译配置 ./configure --prefix=/usr/local/python3 --enable-optimizations
#编译和安装 make && make install #在/usr/bin创建python3的快捷方式链接,方便在系统任何目录运行python3 ln -s /usr/local/python3/bin/python3 /usr/bin/python3 ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
查看版本号 python3 -V
mysql安装
安装命令 yum -y install mariadb mariadb-server
安装完成MariaDB,首先启动MariaDB systemctl start mariadb
设置开机启动 systemctl enable mariadb
取消开机启动 systemctl disable mariadb
项目包处理
切换到/opt
解压ParkingSys-master.zip代码包到当前目录
进入源码目录
/opt/ParkingSys-master/ParkingSysApi
安装程序依赖包 pip3 install -r requirements.txt
pip3 install -r requirements.txt --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org
创建数据库
进入数据库使用mysql -u root -p CREATE DATABASE parking CHARSET=UTF8
找到config.py 数据的密码设定好,如果没有密码把 :123456 去除掉
启动停车场系统
切换目录 cd /opt/ParkingSys-master
#启动停车场系统 执行 python3 apprun.py &
navicat客户端连接数据库,更改mysql数据权限表
进入数据库 mysql -u root -p
use mysql;
update user set Host = ‘%‘ where User = ‘root‘ and Host = ‘localhost.localdomain‘;
重新启动数据库 systemctl restart mariadb
关闭防火墙(已经关闭的时候可以忽略) systemctl stop firewalld
标签:设置 连接 make libs rem gdb 客户 readline 解压
原文地址:https://www.cnblogs.com/wp950416/p/11840734.html