1 安装pip

yum -y install epel-release
yum install python-pip

2 更新pip

pip install --upgrade pip
pip install --upgrade setuptools

3 安装各种开发库

yum install python-devel
yum install libevent-devel
yum install mysql-devel

4 安装Airflow

在此之前需要设定临时环境变量

export SLUGIFY_USES_TEXT_UNIDECODE=yes
pip install apache-airflow

遇到第一个问题

ERROR: Cannot uninstall 'enum34'. It is a distutils installed project and 
thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

解决

 pip install --ignore-installed enum34  

然后再重新执行命令

遇到第二个问题

ERROR: Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

解决

pip install --ignore-installed apache-airflow

5 初始化数据库 并 启动

airflow initdb
airflow webserver -p 8080

8 防止密码明文存储

pip install cryptography

9 替换数据库为mysql

pip install apache-airflow[mysql]

  

10 创建mysql用户

create database airflow;
create user 'testairflow'@'%' identified by '123123';
GRANT all privileges on airflow.* TO 'testairflow'@'%' IDENTIFIED BY '123123';
FLUSH PRIVILEGES;

  

11 修改Airflow配置文件,指向mysql用户

  

~/airflow/airflow.cfg 文件修改:sql_alchemy_conn = mysql://ct:152108@localhost/airflow

  

12 mysql配置更新

vim /etc/my.cnf
explicit_defaults_for_timestamp=1 // 添加此行
systemctl restart mysqld
airflow initdb

  

13 重启Airflow

airflow webserver -p 8080

  

  

  

  

  

  

最新文章

  1. ubuntu如何安装nodejs最新版 本
  2. 重置VS设置
  3. jquery本地上传预览扩展(隐藏上传控件单击图片上传支持ie!!)
  4. JMeter学习-012-JMeter 配置元件之-HTTP Cookie管理器-实现 Cookie 登录
  5. try、catch、finally的使用分析---与 return 相关
  6. 无题II hdu 2236(二分枚举区间)
  7. PHP面向对象编程学习之对象基础
  8. python-认识Socket[入门篇]
  9. HTML5 移动页面自适应手机屏幕四类方法
  10. C# const和readonly修饰符的区别
  11. ASP.NET 页面双向静态化
  12. css边框小结
  13. Android使用HttpClient以Post、Get请求服务器发送数据的方式(普通和json)
  14. ArcGIS 10.0发布缓存地图服务(详细版)
  15. Python脱产8期 Day05 2019/4/17
  16. java io系列24之 BufferedWriter(字符缓冲输出流)
  17. 初始nginx(启动运行) 使用nginx做一个简单的静态资源服务器
  18. zeromq学习记录(五)vc下多线程
  19. js精度误差
  20. ant+sonar+jacoco代码质量代码覆盖率扫描

热门文章

  1. es6 实现单链表
  2. Java日志体系(一)发展历程
  3. androidstudio出包问题--Warning: there were 1 unresolved references to classes or interfaces.
  4. NDK学习笔记-JNI开发流程
  5. JS、JQUERY 获取浏览器和屏幕各种高度宽度
  6. FTL-SLC&MTC&TLC
  7. Linux常用安装配置
  8. Redis(1.4)Redis的持久化
  9. idea的配置文件------application.properties和application.yml
  10. Kefa and Dishes(CodeForces580D)【状态压缩DP】