1、我使用的是miniconda3创建的python3.7.12环境
2、配置mysql5.7环境;
#安装mysql依赖
sudo yum -y install python-devel libevent-devel mysql-devel mysqlclient
pip install mysqlclient pymysql mysql
#修改mysql参数
vi /etc/my.cnf
explicit_defaults_for_timestamp=1
#创建个airflow的用户,airflow数据库
mysql -uroot -p
CREATE DATABASE IF NOT EXISTS airflow DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
create user 'airflow'@'%' identified by 'xxxxxxxx';
grant all privileges on airflow.* to airflow@localhost identified by 'xxxxxxxx';
grant all privileges on airflow.* to 'airflow'@'%' identified by 'xxxxxxxx';
flush privileges;
select user,authentication_string,host from user;
3、安装及基本配置
#安装airflow,2.2.3
pip install apache-airflow
#配置个环境变量
vi ~/.bashrc
export AIRFLOW_HOME=/home/san/airflow
source ~/.bashrc
airflow version
#修改配置文件
vi /home/san/airflow/airflow.cfg
exe