版本
Python-3.9.17
./configure --prefix=/usr/local/python3
make && make install
随后用ln -s短链接python3和pip3
版本2.7.1
export AIRFLOW_HOME=~/airflow
编写一个sh文件
AIRFLOW_VERSION=2.7.1
# Extract the version of Python you have installed. If you're currently using Python 3.11 you may want to set this manually as noted above, Python 3.11 is not yet supported.
PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)"
CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"
# For example this would install 2.7.1 with python 3.8: https://raw.githubusercontent.com/apache/airflow/constraints-2.7.1/constraints-3.8.txt
pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"
可以下载下来
pip3 install "apache-airflow==2.7.1" --constraint "/data/constraints-3.10.txt"
airflow standalone
报错sqlite c library too old
根据官网的指示更新sqllite
https://airflow.apache.org/docs/apache-airflow/stable/howto/set-up-database.html#
安装需要组件
yum -y install wget tar gzip gcc make expect
wget https://www.sqlite.org/src/tarball/sqlite.tar.gz
tar xzf sqlite.tar.gz
cd sqlite/
export CFLAGS="-DSQLITE_ENABLE_FTS3 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS5 \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_ENABLE_LOAD_EXTENSION \
-DSQLITE_ENABLE_RTREE \
-DSQLITE_ENABLE_STAT4 \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
-DSQLITE_SOUNDEX \
-DSQLITE_TEMP_STORE=3 \
-DSQLITE_USE_URI \
-O2 \
-fPIC"
export PREFIX="/usr/local"
LIBS="-lm" ./configure --disable-tcl --enable-shared --enable-tempstore=always --prefix="$PREFIX"
make
make install
Post install add /usr/local/lib to library path
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
然后再airflow standalone就能正常启动了,
启动时会提示登录的账号密码,默认端口8080