-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #660 from jingjingxyk/experiment-quickstart
合并 主分支 待合并 变更
- Loading branch information
Showing
16 changed files
with
230 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# support extensions (x64) | ||
|
||
| extension name | linux6 | macos | windows(cygwin) | default enabled | | ||
|----------------|--------|-------|-----------------|-----------------| | ||
| curl | ✅ | ✅ | ✅ | ✅ | | ||
| iconv | ✅ | ✅ | ✅ | ✅ | | ||
| bcmath | ✅ | ✅ | ✅ | ✅ | | ||
| pcntl | ✅ | ✅ | ✅ | ✅ | | ||
| filter | ✅ | ✅ | ✅ | ✅ | | ||
| session | ✅ | ✅ | ✅ | ✅ | | ||
| tokenizer | ✅ | ✅ | ✅ | ✅ | | ||
| mbstring | ✅ | ✅ | ✅ | ✅ | | ||
| ctype | ✅ | ✅ | ✅ | ✅ | | ||
| zlib | ✅ | ✅ | ✅ | ✅ | | ||
| zip | ✅ | ✅ | ✅ | ✅ | | ||
| posix | ✅ | ✅ | ✅ | ✅ | | ||
| sockets | ✅ | ✅ | ✅ | ✅ | | ||
| pdo | ✅ | ✅ | ✅ | ✅ | | ||
| sqlite3 | ✅ | ✅ | ✅ | ✅ | | ||
| phar | ✅ | ✅ | ✅ | ✅ | | ||
| mysqlnd | ✅ | ✅ | ✅ | ✅ | | ||
| mysqli | ✅ | ✅ | ✅ | ✅ | | ||
| intl | ✅ | ✅ | ✅ | ✅ | | ||
| fileinfo | ✅ | ✅ | ✅ | ✅ | | ||
| pdo_mysql | ✅ | ✅ | ✅ | ✅ | | ||
| soap | ✅ | ✅ | ✅ | ✅ | | ||
| xsl | ✅ | ✅ | ✅ | ✅ | | ||
| gmp | ✅ | ✅ | ✅ | ✅ | | ||
| exif | ✅ | ✅ | ✅ | ✅ | | ||
| sodium | ✅ | ✅ | ✅ | ✅ | | ||
| openssl | ✅ | ✅ | ✅ | ✅ | | ||
| readline | ✅ | ✅ | ✅ | ✅ | | ||
| libxml | ✅ | ✅ | ✅ | ✅ | | ||
| xml | ✅ | ✅ | ✅ | ✅ | | ||
| xmlreader | ✅ | ✅ | ✅ | ✅ | | ||
| xmlwriter | ✅ | ✅ | ✅ | ✅ | | ||
| dom | ✅ | ✅ | ✅ | ✅ | | ||
| simplexml | ✅ | ✅ | ✅ | ✅ | | ||
| redis | ✅ | ✅ | ✅ | ✅ | | ||
| yaml | ✅ | ✅ | ✅ | ✅ | | ||
| imagick | ✅ | ✅ | ✅ | ✅ | | ||
| gd | ✅ | ✅ | ✅ | ✅ | | ||
| opcache | ✅ | ✅ | ✅ | ✅ | | ||
| swoole | ✅ | ✅ | ✅ | ✅ | | ||
| ssh2 | ✅ | ✅ | ❌ | ❌ | | ||
| apcu | ✅ | ✅ | ❌ | ❌ | | ||
| ds | ✅ | ✅ | ✅ | ❌ | | ||
| inotify | ✅ | ❌ | ❌ | ❌ | | ||
| protobuf | ❌ | ❌ | ❌ | ❌ | | ||
| uuid | ✅ | ✅ | ❌ | ❌ | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
set -exu | ||
__DIR__=$( | ||
cd "$(dirname "$0")" | ||
pwd | ||
) | ||
cd ${__DIR__} | ||
|
||
# use china mirror | ||
# sh sapi/quickstart/linux/alpine-init-mini.sh --mirror [ china | ustc | tuna | tencentyun | huaweicloud ] | ||
|
||
|
||
MIRROR='' | ||
while [ $# -gt 0 ]; do | ||
case "$1" in | ||
--mirror) | ||
MIRROR="$2" | ||
;; | ||
--*) | ||
echo "no found mirror option $1" | ||
;; | ||
esac | ||
shift $(($# > 0 ? 1 : 0)) | ||
done | ||
|
||
case "$MIRROR" in | ||
china | tuna | ustc) | ||
test -f /etc/apk/repositories.save || cp /etc/apk/repositories /etc/apk/repositories.save | ||
test "$MIRROR" = "china" && sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories | ||
test "$MIRROR" = "tuna" && sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories | ||
test "$MIRROR" = "ustc" && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories | ||
;; | ||
tencentyun | huaweicloud) # 云服务的内网镜像源 | ||
test -f /etc/apk/repositories.save || cp /etc/apk/repositories /etc/apk/repositories.save | ||
test "$MIRROR" = "tencentyun" && sed -i 's/dl-cdn.alpinelinux.org/mirrors.tencentyun.com/g' /etc/apk/repositories | ||
test "$MIRROR" = "huaweicloud" && sed -i 's/dl-cdn.alpinelinux.org/repo.huaweicloud.com/g' /etc/apk/repositories | ||
;; | ||
|
||
esac | ||
|
||
apk update | ||
|
||
apk add bash git curl wget xz zip unzip ca-certificates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#!/bin/bash | ||
|
||
set -exu | ||
__DIR__=$( | ||
cd "$(dirname "$0")" | ||
pwd | ||
) | ||
|
||
# use china mirror | ||
# bash sapi/quickstart/linux/debian-init-mini.sh --mirror [ china | ustc | tuna | aliyuncs | tencentyun | huaweicloud ] | ||
|
||
MIRROR='' | ||
while [ $# -gt 0 ]; do | ||
case "$1" in | ||
--mirror) | ||
case "$2" in | ||
china | ustc | tuna | aliyuncs | tencentyun | huaweicloud ) | ||
MIRROR="$2" | ||
;; | ||
esac | ||
;; | ||
--*) | ||
echo "Illegal option $1" | ||
;; | ||
esac | ||
shift $(($# > 0 ? 1 : 0)) | ||
done | ||
|
||
|
||
|
||
if test -n "$MIRROR" ; then | ||
{ | ||
OS_ID=$(cat /etc/os-release | grep '^ID=' | awk -F '=' '{print $2}') | ||
VERSION_ID=$(cat /etc/os-release | grep '^VERSION_ID=' | awk -F '=' '{print $2}' | sed "s/\"//g") | ||
case $OS_ID in | ||
debian) | ||
case $VERSION_ID in | ||
11 | 12 ) | ||
# debian 容器内和容器外 镜像源配置不一样 | ||
if [ -f /.dockerenv ] && [ "$VERSION_ID" = 12 ]; then | ||
test -f /etc/apt/sources.list.d/debian.sources.save || cp -f /etc/apt/sources.list.d/debian.sources /etc/apt/sources.list.d/debian.sources.save | ||
sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources | ||
sed -i 's/security.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources | ||
test "$MIRROR" = "tuna" && sed -i "[email protected]@mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list.d/debian.sources | ||
# 云服务内网镜像源 | ||
test "$MIRROR" = "aliyuncs" && sed -i "[email protected]@mirrors.cloud.aliyuncs.com@g" /etc/apt/sources.list.d/debian.sources | ||
test "$MIRROR" = "tencentyun" && sed -i "[email protected]@mirrors.tencentyun.com@g" /etc/apt/sources.list.d/debian.sources | ||
test "$MIRROR" = "huaweicloud" && sed -i "[email protected]@repo.huaweicloud.com@g" /etc/apt/sources.list.d/debian.sources | ||
else | ||
test -f /etc/apt/sources.list.save || cp /etc/apt/sources.list /etc/apt/sources.list.save | ||
sed -i "[email protected]@mirrors.ustc.edu.cn@g" /etc/apt/sources.list | ||
sed -i "[email protected]@mirrors.ustc.edu.cn@g" /etc/apt/sources.list | ||
test "$MIRROR" = "tuna" && sed -i "[email protected]@mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list | ||
test "$MIRROR" = "aliyuncs" && sed -i "[email protected]@mirrors.cloud.aliyuncs.com@g" /etc/apt/sources.list | ||
test "$MIRROR" = "tencentyun" && sed -i "[email protected]@mirrors.tencentyun.com@g" /etc/apt/sources.list | ||
test "$MIRROR" = "huaweicloud" && sed -i "[email protected]@repo.huaweicloud.com@g" /etc/apt/sources.list | ||
fi | ||
;; | ||
*) | ||
echo 'no match debian OS version' . $VERSION_ID | ||
;; | ||
esac | ||
;; | ||
ubuntu) | ||
case $VERSION_ID in | ||
20.04 | 22.04 | 22.10 | 23.04 | 23.10) | ||
test -f /etc/apt/sources.list.save || cp /etc/apt/sources.list /etc/apt/sources.list.save | ||
sed -i "[email protected]@mirrors.ustc.edu.cn@g" /etc/apt/sources.list | ||
sed -i "[email protected]@mirrors.ustc.edu.cn@g" /etc/apt/sources.list | ||
test "$MIRROR" = "tuna" && sed -i "[email protected]@mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list | ||
test "$MIRROR" = "aliyuncs" && sed -i "[email protected]@mirrors.cloud.aliyuncs.com@g" /etc/apt/sources.list | ||
test "$MIRROR" = "tencentyun" && sed -i "[email protected]@mirrors.tencentyun.com@g" /etc/apt/sources.list | ||
test "$MIRROR" = "huaweicloud" && sed -i "[email protected]@repo.huaweicloud.com@g" /etc/apt/sources.list | ||
;; | ||
*) | ||
echo 'no match ubuntu OS version' . $VERSION_ID | ||
;; | ||
esac | ||
;; | ||
*) | ||
echo 'NO SUPPORT LINUX OS' | ||
exit 0 | ||
;; | ||
esac | ||
} | ||
fi | ||
|
||
test -f /etc/apt/apt.conf.d/proxy.conf && rm -rf /etc/apt/apt.conf.d/proxy.conf | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
apt update -y | ||
|
||
apt install -y git curl wget ca-certificates xz-utils bzip2 p7zip lzip zip unzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters