3

1. Termux installation

【termux official website】
【ZeroTermux】
【ZeroTermux Android 5】

  • ZeroTermux source change (skipable)

     sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/termux-packages-24 stable main@' $PREFIX/etc/apt/sources.list && apt update && apt upgrade

    2. Install Linux distribution Alpine with termux

  • Install

     curl -LO https://raw.githubusercontents.com/Hax4us/TermuxAlpine/master/TermuxAlpine.sh
    bash TermuxAlpine.sh
  • start alpine

     startalpine

3. Install Qinglong on Alpine

Install the develop branch test here, you can change the following QL_BRANCH to the master branch to install the stable version

 set -x \
&& echo -e "\n\
export QL_DIR=/ql\n\
export QL_BRANCH=develop\n\
export LANG=zh_CN.UTF-8\n\
export TERMUX_APK_RELEASE=F-DROID\n\
export SHELL=/bin/bash\n\
export PNPM_HOME=~/.local/share/pnpm\n\
export PATH=$PATH:~/.local/share/pnpm:~/.local/share/pnpm/global/5/node_modules\n" \
>> /etc/profile.d/ql_env.sh \
&& source /etc/profile \
&& echo -e "nameserver 119.29.29.29\n\
nameserver 8.8.8.8" > /etc/resolv.conf \
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& apk update -f \
&& apk upgrade \
&& apk --no-cache add -f bash make nodejs npm \
coreutils moreutils git curl wget tzdata perl \
openssl nginx jq openssh python3 py3-pip \
&& rm -rf /var/cache/apk/* \
&& apk update \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& npm config set registry https://registry.npmmirror.com \
&& npm install -g pnpm \
&& pnpm add -g pm2 ts-node typescript tslib \
&& mkdir -p $QL_DIR \
&& git clone -b $QL_BRANCH https://hub.fastgit.xyz/whyour/qinglong.git $QL_DIR \
&& cd $QL_DIR \
&& cp -f .env.example .env \
&& chmod 777 $QL_DIR/shell/*.sh \
&& chmod 777 $QL_DIR/docker/*.sh \
&& pnpm install --production --loglevel error \
&& mkdir -p $QL_DIR/static \
&& git clone -b $QL_BRANCH https://hub.fastgit.xyz/whyour/qinglong-static.git $QL_DIR/static \
&& ln -s /ql/docker/docker-entrypoint.sh /usr/bin/qinglong \
&& qinglong

4. Start the Qinglong panel

It will start automatically after the first installation, if you want to start again after restarting the phone or exiting termux

  • start alpine

     startalpine
  • Start the Dragon Panel

     qinglong

report an error

  • If the alpine installation fails, clear the termux data (it is better to restart the phone), or it is more convenient to use zerotermux, just create a new container in the container switch, and then re-execute the installation alpine command
  • The reason for the failure of the sqlite3 installation is not clear. I solved it for a long time before, but I forgot it, but not all devices will report an error. Generally, reinstalling can solve the problem. Re-execute the installation command, that is, pnpm install --prod , and then execute all subsequent command, you can also directly copy the following paragraph

     pnpm install --production --loglevel error \
    && mkdir -p $QL_DIR/static \
    && git clone -b $QL_BRANCH https://hub.fastgit.xyz/whyour/qinglong-static.git $QL_DIR/static \
    && ln -s /ql/docker/docker-entrypoint.sh /usr/bin/qinglong \
    && qinglong
  • After the phone restarted, it failed to start the Qinglong panel again because the environment variable was invalid, which has been solved. If there is any more, it is not clear.

二毛erma0
52 声望56 粉丝

业余爱好


引用和评论

0 条评论