论文推荐环境配置
mysql数据库环境配置
1.将MySQL-5.5.40-1.linux2.6.x86_64.rpm-bundle.tar上传到新建的 /soft下
2.进入 /soft 路径下 tar 开 MySQL-5.5.40-1.linux2.6.x86_64.rpm-bundle.tar 到新建的 /soft/mysql下
>tar -xvf MySQL-5.5.40-1.linux2.6.x86_64.rpm-bundle.tar -C mysql
3.按顺序安装三个文件:安装命令:【rpm - ivh *.rpm】
>rpm -ivh MySQL-client-5.5.40-1.linux2.6.x86_64.rpm
>rpm -ivh MySQL-devel-5.5.40-1.linux2.6.x86_64.rpm
>rpm -ivh MySQL-server-5.5.40-1.linux2.6.x86_64.rpm
执行rpm -ivh MySQL-server-5.5.40-1.linux2.6.x86_64.rpm报以下错
就执行yum install libaio命令
4.初始化数据库:
/usr/bin/mysql_install_db
结果: Installing MySQL system tables...
OK
Filling help tables...
OK
5.查看mysql状态:
service mysql status
结果: ERROR! MySQL is not running
6.如果mysql没有运行,启动:
service mysql start
7.设置mysql密码为“mysql”:
/usr/bin/mysqladmin -u root password ‘mysql’
8、设置mysql开机自启动:
chkconfig mysql on
9.登陆mysql:
mysql -u root -h 127.0.0.1 -p
10.建表
一、Database
(1)创建数据库
create database [database name];
(2)选择数据库
use [database name]
(3)显示数据库
show databases;
(4)显示数据库创建语句
show create database [database name];
二、Table
(1)创建表
create table [table name] ( [column name] [column type]([column length]), … );
例:
mysql> CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), -> species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
(2)显示当前数据库的表
show tables;
(3)显示表定义
describe [table name];
或者是
show columns from [table name];
(4)显示表创建语句
show create table [table name];
修改mysql密码
https://blog.csdn.net/zzvar/article/details/119280439
安装tmux
sudo yum install tmux
conda环境
python3.7
PymuPDF需要python3.7以上
nltk安装
(1)pip install nltk
(2)再根据以下命令看看nltk_data需要放在哪里
uwsgi配置
参考https://blog.csdn.net/xyy1028/article/details/98941896
yum instal uwsgi
uwsgi --http-socket :80 --chdir=/root/lhx/ --module djangoproject.wsgi
uwsgi: unrecognized option ‘–wsgi-file’ getopt_long() error
需要安装对应的插件,这里因为使用python3,所以安装python3插件
yum install uwsgi-plugin-common
yum install uwsgi-plugin-python3
#如果是安装python2版本的,则把3去掉就可以了
阿里云默认的安全组只支持80,443,22,3389,80这几个端口
ModuleNotFoundError: No module named 'django’解决方法
https://www.cnblogs.com/fine-6/p/11110365.html
django对应版本
export PYTHONPATH=/root/anaconda3/envs/paper/lib/python3.6/site-packages:/root/lhx/djangoproject
uwsgi --http-socket :80 --chdir=/root/lhx/ --module djangoproject.wsgi