运行环境:
python 3.6.6
apache airflow 1.10.1
mysql 5.7.24
centos7:
--准备工作:
rpm -ivh https://centos7.iuscommunity.org/ius-release.rpm
yum install epel-release
或者
rpm -ivh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
--安装python36版本:
# yum -y install python36u-pip python36 python36-libs
-- 升级pip版本:
# pip3.6 install --upgrade pip
# pip --version
pip 18.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
# pip list
Package Version
---------- -------
pip 18.1
setuptools 39.0.1
--安装依赖的软件包:
# yum -y install gcc gcc-c++ cyrus-sasl cyrus-sasl-devel cyrus-sasl-lib
--安装mysql:
# wget https://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm
# rpm -ivh https://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm
# yum -y install mysql-community-server mysql-community-devel mysql-community-common
--配置文件:
#cat /etc/my.cnf
[mysqld]
datadir=/data/mysql
socket=/tmp/mysql.sock
default-storage-engine =InnoDB
character_set_server = utf8mb4
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect ='SET NAMES utf8mb4'
lower_case_table_names = 1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
#skip-grant-tables
plugin-load=validate_password.so
validate-password=OFF
log-error=/var/log/mysqld.log
pid-file=/tmp/mysqld.pid
explicit_defaults_for_timestamp=true
-- 登录数据库:
systemctl start mysqld
#mysql -p -S /tmp/mysql.sock
--安装完成之后创建库和用户密码:
mysql> alter user 运行环境:
python 3.6.6
apache airflow 1.10.1
mysql