mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-26 05:02:48 +00:00
Compare commits
No commits in common. "master" and "snapshot-20200805" have entirely different histories.
master
...
snapshot-2
|
|
@ -8,9 +8,9 @@ root = true
|
|||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{html,md,js,vue,es6,json,css,scss}]
|
||||
[*.{html,md,js}]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
|
||||
# Matches the exact files either package.json or .travis.yml
|
||||
|
|
|
|||
|
|
@ -1,192 +0,0 @@
|
|||
name: docker-images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- docker-test
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- docker-test
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
multi:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') }}
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: true
|
||||
-
|
||||
name: Prevent from loading rubygems from TUNA
|
||||
run: |
|
||||
sed -i "/^source/c source 'https://rubygems.org'" Gemfile
|
||||
sed -i '/remote:/s@remote: .*$@remote: https://rubygems.org@' Gemfile.lock
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Cache Docker layers
|
||||
uses: actions/cache@v4
|
||||
if: github.event_name == 'push'
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ matrix.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ matrix.os }}-buildx-${{ matrix.os }}-
|
||||
${{ matrix.os }}-buildx-
|
||||
-
|
||||
name: Cache Docker layers
|
||||
uses: actions/cache@v4
|
||||
if: github.event_name == 'pull_request'
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ matrix.os }}-pr-${{ github.event.pull_request.head.user.login }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ matrix.os }}-pr-${{ github.event.pull_request.head.user.login }}-buildx-
|
||||
${{ matrix.os }}-buildx-
|
||||
${{ matrix.os }}-buildx-
|
||||
-
|
||||
name: Cache Docker layers
|
||||
if: github.event_name != 'push' && github.event_name != 'pull_request'
|
||||
run: |
|
||||
echo "I do not know how to setup cache"
|
||||
exit -1
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
if: github.event_name == 'push'
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build Test Docker Image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.build
|
||||
push: false
|
||||
tags: tunathu/mirror-web:localtest
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/local-test-build-cache
|
||||
load: true
|
||||
-
|
||||
name: Test Run Page Build
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v $PWD:/data \
|
||||
-v $PWD/_site:/data/_site \
|
||||
--tmpfs /data/.jekyll-cache \
|
||||
--tmpfs /data/node_modules:exec \
|
||||
--env VISUALIZER=1 \
|
||||
tunathu/mirror-web:localtest \
|
||||
bash -c "npm install rollup-plugin-visualizer && bundle exec jekyll build --future"
|
||||
-
|
||||
name: Upload Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: site-${{ matrix.os}}
|
||||
path: _site
|
||||
-
|
||||
name: Upload Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: stats.html-${{ matrix.os}}
|
||||
path: _stats.html
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
id: docker_build
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.build
|
||||
push: ${{ github.event_name == 'push' }}
|
||||
tags: tunathu/mirror-web
|
||||
cache-from: |
|
||||
type=local,src=/tmp/.buildx-cache
|
||||
type=local,src=/tmp/local-test-build-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
outputs: ${{ github.event_name == 'push' && 'type=image,push-by-digest=true,name-canonical=true,push=true' || 'type=image' }}
|
||||
-
|
||||
name: Export digest
|
||||
run: |
|
||||
mkdir -p ${{ runner.temp }}/digests/
|
||||
digest="${{ steps.docker_build.outputs.digest }}"
|
||||
touch "${{ runner.temp }}/digests/${digest#sha256:}"
|
||||
-
|
||||
name: Upload digest
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: digests-${{ runner.arch }}
|
||||
path: ${{ runner.temp }}/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- multi
|
||||
if: always() && github.event_name == 'push' && !contains(github.event.head_commit.message, '[ci skip]')
|
||||
steps:
|
||||
-
|
||||
name: Determine docker tag
|
||||
id: docker_tag
|
||||
env:
|
||||
TAG_NAME: ${{ github.ref }}
|
||||
run: |
|
||||
case "${TAG_NAME}" in
|
||||
refs/heads/master)
|
||||
tag=latest
|
||||
;;
|
||||
refs/tags/*)
|
||||
tag=${TAG_NAME#refs/tags/}
|
||||
;;
|
||||
refs/heads/*)
|
||||
tag=branch-${TAG_NAME#refs/heads/}
|
||||
;;
|
||||
*)
|
||||
tag="dummy"
|
||||
;;
|
||||
esac
|
||||
echo "docker_tag=${tag}" | tee -a $GITHUB_OUTPUT
|
||||
-
|
||||
name: Download digests
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: ${{ runner.temp }}/digests
|
||||
pattern: digests-*
|
||||
merge-multiple: true
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Create manifest list and push
|
||||
working-directory: ${{ runner.temp }}/digests
|
||||
run: |
|
||||
docker buildx imagetools create -t "tunathu/mirror-web:${{ steps.docker_tag.outputs.docker_tag }}" \
|
||||
$(printf "tunathu/mirror-web@sha256:%s " $(ls .))
|
||||
|
||||
- name: Inspect images
|
||||
working-directory: ${{ runner.temp }}/digests
|
||||
run: |
|
||||
DOCKER_IMG="tunathu/mirror-web:${{ steps.docker_tag.outputs.docker_tag }}"
|
||||
echo "## $DOCKER_IMG" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
docker buildx imagetools inspect "$DOCKER_IMG" | tee -a $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
name: 'Sync mirrorz-help-ng'
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
new_commit:
|
||||
description: 'New commit hash'
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
schedule:
|
||||
- cron: '33 22 * * *' # 06:33 AM in Asia/Shanghai (UTC+8)
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Sync submodule
|
||||
env:
|
||||
NEW_COMMIT: ${{ inputs.new_commit }}
|
||||
run: |
|
||||
transpiled_dir="help/_posts/mirrorz-help-ng-transpiled"
|
||||
track_branch="transpiled"
|
||||
if [ -n "$NEW_COMMIT" ]; then
|
||||
git -C "$transpiled_dir" fetch origin "+$NEW_COMMIT:refs/remotes/origin/incoming" --depth=1
|
||||
git -C "$transpiled_dir" checkout --force "$NEW_COMMIT"
|
||||
else
|
||||
git -C "$transpiled_dir" fetch origin "+refs/heads/${track_branch}:refs/remotes/origin/${track_branch}" --depth=1
|
||||
git -C "$transpiled_dir" checkout --force "origin/${track_branch}"
|
||||
NEW_COMMIT=$(git -C "$transpiled_dir" rev-parse HEAD)
|
||||
fi
|
||||
NEW_COMMIT_SHORT=$(echo "$NEW_COMMIT" | cut -c1-8)
|
||||
echo "NEW_COMMIT_SHORT=$NEW_COMMIT_SHORT" >> $GITHUB_ENV
|
||||
echo -n "Update submodules to tuna/mirrorz-help-ng@$NEW_COMMIT" > /tmp/pr_msg
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
title: 'helpz: sync mirrorz-help-ng@${{ env.NEW_COMMIT_SHORT }}'
|
||||
commit-message: 'helpz: sync tuna/mirrorz-help-ng@${{ env.NEW_COMMIT_SHORT }}'
|
||||
author: 'GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>'
|
||||
branch: helpz
|
||||
delete-branch: true
|
||||
body-path: /tmp/pr_msg
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
*.swp
|
||||
*~
|
||||
/Gemfile.lock
|
||||
/.jekyll-metadata
|
||||
/static/tunasync.json
|
||||
/static/status/
|
||||
|
|
@ -10,9 +11,6 @@
|
|||
/deploy.sh
|
||||
/.sass-cache/
|
||||
.bundle
|
||||
/vendor/
|
||||
vendor
|
||||
.vscode/
|
||||
.DS_Store
|
||||
/node_modules/
|
||||
/.jekyll-cache/
|
||||
_stats.html
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
[submodule "helpz"]
|
||||
path = help/_posts/mirrorz-help-ng-transpiled
|
||||
url = https://github.com/tuna/mirrorz-help-ng.git
|
||||
branch = transpiled
|
||||
[submodule "geninfo/z-geninfo"]
|
||||
path = geninfo/z-geninfo
|
||||
url = https://github.com/mirrorz-org/genisolist.git
|
||||
48
404.html
48
404.html
|
|
@ -1,11 +1,9 @@
|
|||
---
|
||||
permalink: /404.html
|
||||
jsEntry: notfound
|
||||
---
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{% capture metaDesc %}您访问的资源未能找到{% endcapture %}
|
||||
{% include head.html cattitle="404" metaDesc=metaDesc notArticle=true%}
|
||||
{% include head.html cattitle="404" %}
|
||||
<body>
|
||||
{% include nav.html %}
|
||||
<div id="mirrors">
|
||||
|
|
@ -13,35 +11,33 @@ jsEntry: notfound
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="not-found">
|
||||
{% if site.meow_404 %}
|
||||
<div class="not-found-bg"></div>
|
||||
{% endif %}
|
||||
{% if site.meow_404 %}
|
||||
<div class="not-found-bg"></div>
|
||||
{% endif %}
|
||||
<div class="not-found-hint">
|
||||
<div class="not-found-code">
|
||||
404 NOT FOUND
|
||||
</div>
|
||||
{% if site.meow_404 %}
|
||||
<span class="thuhidden">呜喵,金枪鱼</span>被吃掉了
|
||||
{% endif %}
|
||||
{% if site.meow_404 %}
|
||||
<span class="thuhidden">呜喵,金枪鱼</span>被吃掉了
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="not-found-text thuhidden">
|
||||
如果您认为这一定是出了什么问题,或者正在寻找暂未包含的镜像,欢迎您前往
|
||||
如果您认为这一定是出了什么问题,或者正在寻找暂未包含的镜像,欢迎您前往
|
||||
<a href="https://github.com/tuna/issues/issues/new/choose">
|
||||
{% fa_svg fab.fa-github %} tuna/issues
|
||||
<i class="fa fa-github"></i> tuna/issues
|
||||
</a>
|
||||
提交<a href="https://github.com/tuna/issues/issues/new?labels=Service+Issue,404&template=3-bug_report.yaml" id="new_issue_bug"><!--
|
||||
提交<a href="https://github.com/tuna/issues/issues/new?labels=Service+Issue,404&template=2-bug_report.md" id="new_issue_bug"><!--
|
||||
-->错误报告</a><!--
|
||||
-->或者<a href="https://github.com/tuna/issues/issues/new?labels=MirrorRequest&template=1-mirror_request.yaml" id="new_issue_mr"><!--
|
||||
-->镜像申请</a>。
|
||||
<br />
|
||||
请特别注意:如果您从任何大语言模型或者聊天助手获取了指向本镜像站的链接,则很可能此文件并不存在,请谨慎甄别。
|
||||
-->或者<a href="https://github.com/tuna/issues/issues/new?labels=MirrorRequest&template=1-mirror_request.md" id="new_issue_mr"><!--
|
||||
-->镜像申请</a>
|
||||
</div>
|
||||
<div class="not-found-links">
|
||||
<a class="not-found-link" href="javascript:history.back()">
|
||||
{% fa_svg fas.fa-arrow-left %} 返回上一页
|
||||
<i class="fa fa-arrow-left"></i> 返回上一页
|
||||
</a>
|
||||
<a class="not-found-link" href="/">
|
||||
镜像列表 {% fa_svg fas.fa-arrow-right %}
|
||||
镜像列表 <i class="fa fa-arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -49,8 +45,24 @@ jsEntry: notfound
|
|||
</div><!--/container -->
|
||||
</div><!--/mirrors -->
|
||||
{% include footer.html %}
|
||||
<script type="application/javascript">
|
||||
(function(){
|
||||
var tag = "[" + "{{ site.issue_tag }}" + "]";
|
||||
var bugLink = document.getElementById("new_issue_bug");
|
||||
var bugURL = new URL(bugLink.href);
|
||||
bugURL.searchParams.append("title", tag + "404 at " + location.pathname);
|
||||
bugLink.href = bugURL.href;
|
||||
|
||||
var mrLink = document.getElementById("new_issue_mr");
|
||||
var mrURL = new URL(mrLink.href);
|
||||
mrURL.searchParams.append("title", tag + "Mirror Request for new mirror " +
|
||||
location.pathname.split('/')[1]);
|
||||
mrLink.href = mrURL.href;
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<!--
|
||||
vim: ts=2 sts=2 sw=2 noexpandtab
|
||||
-->
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +1,18 @@
|
|||
FROM ruby:3.2
|
||||
LABEL maintainer="Miao Wang <shankerwangmiao@gmail.com>"
|
||||
FROM ruby:2.6
|
||||
|
||||
RUN mkdir /data
|
||||
WORKDIR /data
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install --no-install-recommends -y locales && \
|
||||
apt-get clean
|
||||
RUN curl -fsSL "https://cdn.jsdelivr.net/gh/tj/n/bin/n" | bash -s -- lts
|
||||
RUN apt-get update && apt-get -y install nodejs
|
||||
|
||||
COPY Gemfile Gemfile.lock package.json package-lock.json /data/
|
||||
COPY _node_module_patch /data/_node_module_patch
|
||||
COPY Gemfile /data/
|
||||
|
||||
RUN \
|
||||
gem install bundler -v "$(sed --silent -r '/BUNDLED WITH/,+1 {s/^[\t ]+//; p}' Gemfile.lock | tail -n +2)" && \
|
||||
bundle install --frozen && \
|
||||
NODE_ENV=production npm ci && \
|
||||
mv node_modules ../ && \
|
||||
rm -rf /data/*
|
||||
RUN gem install bundler
|
||||
RUN bundle install
|
||||
|
||||
ENV LANG=C.UTF-8
|
||||
ENV JEKYLL_ENV=production
|
||||
ENV VITE_RUBY_VITE_BIN_PATH=/node_modules/.bin/vite
|
||||
# Fix https://github.com/babel/ruby-babel-transpiler/issues/294
|
||||
RUN sed -i 's/@context ||= ExecJS.compile("var self = this; " + File.read(script_path))/@context ||= ExecJS.compile("var self = this; " + File.read(script_path, :encoding => "UTF-8"))/' /usr/local/bundle/gems/babel-transpiler-0.7.0/lib/babel/transpiler.rb
|
||||
|
||||
CMD ["bundle", "exec", "jekyll", "build"]
|
||||
ENV LANG en_US.UTF-8
|
||||
|
||||
CMD ["jekyll", "build"]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
FROM alpine:3.11
|
||||
MAINTAINER Xuanwo <xuanwo.cn@gmail.com>
|
||||
RUN apk add --update \
|
||||
nodejs ruby ruby-dev ruby-rdoc ruby-irb ruby-io-console ruby-nokogiri \
|
||||
gcc libc-dev libffi-dev zlib-dev libxml2-dev libxslt-dev build-base \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
RUN gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/
|
||||
RUN gem install bundler
|
||||
RUN bundle config build.nokogiri --use-system-libraries
|
||||
VOLUME /src
|
||||
WORKDIR /src
|
||||
EXPOSE 4000
|
||||
CMD bundle install && jekyll server -H 0.0.0.0
|
||||
|
||||
22
Gemfile
22
Gemfile
|
|
@ -1,21 +1,3 @@
|
|||
source 'https://mirrors.tuna.tsinghua.edu.cn/rubygems/'
|
||||
|
||||
gem 'jekyll', '~> 4.3', '>= 4.3.3'
|
||||
|
||||
group :jekyll_deps do
|
||||
gem 'bigdecimal', '~> 3.1', '>= 3.1.7'
|
||||
gem 'csv', '~> 3.3'
|
||||
gem 'base64', '~> 0.2.0'
|
||||
gem "webrick", "~> 1.8"
|
||||
end
|
||||
|
||||
group :jekyll_plugins do
|
||||
gem 'jekyll-paginate', '~> 1.1'
|
||||
gem 'jekyll-relative-links', '~> 0.7.0'
|
||||
gem 'jekyll-sitemap', '~> 1.4'
|
||||
gem 'jekyll-titles-from-headings', '~> 0.5.3'
|
||||
gem 'jekyll-fontawesome-svg', '~> 0.4.0'
|
||||
gem 'jekyll-minifier', '~> 0.1.10'
|
||||
end
|
||||
|
||||
gem 'vite_ruby', '~> 3.2'
|
||||
gem 'github-pages'
|
||||
gem 'jekyll-babel'
|
||||
|
|
|
|||
119
Gemfile.lock
119
Gemfile.lock
|
|
@ -1,119 +0,0 @@
|
|||
GEM
|
||||
remote: https://mirrors.tuna.tsinghua.edu.cn/rubygems/
|
||||
specs:
|
||||
addressable (2.8.6)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
base64 (0.2.0)
|
||||
bigdecimal (3.1.7)
|
||||
colorator (1.1.0)
|
||||
concurrent-ruby (1.2.3)
|
||||
cssminify2 (2.0.1)
|
||||
csv (3.3.0)
|
||||
dry-cli (0.7.0)
|
||||
em-websocket (0.5.3)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0)
|
||||
eventmachine (1.2.7)
|
||||
execjs (2.9.1)
|
||||
ffi (1.16.3)
|
||||
forwardable-extended (2.6.0)
|
||||
google-protobuf (3.25.5)
|
||||
htmlcompressor (0.4.0)
|
||||
http_parser.rb (0.8.0)
|
||||
i18n (1.14.4)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (4.3.3)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
em-websocket (~> 0.5)
|
||||
i18n (~> 1.0)
|
||||
jekyll-sass-converter (>= 2.0, < 4.0)
|
||||
jekyll-watch (~> 2.0)
|
||||
kramdown (~> 2.3, >= 2.3.1)
|
||||
kramdown-parser-gfm (~> 1.0)
|
||||
liquid (~> 4.0)
|
||||
mercenary (>= 0.3.6, < 0.5)
|
||||
pathutil (~> 0.9)
|
||||
rouge (>= 3.0, < 5.0)
|
||||
safe_yaml (~> 1.0)
|
||||
terminal-table (>= 1.8, < 4.0)
|
||||
webrick (~> 1.7)
|
||||
jekyll-fontawesome-svg (0.4.0)
|
||||
jekyll-minifier (0.1.10)
|
||||
cssminify2 (~> 2.0)
|
||||
htmlcompressor (~> 0.4)
|
||||
jekyll (>= 3.5)
|
||||
json-minify (~> 0.0.3)
|
||||
uglifier (~> 4.1)
|
||||
jekyll-paginate (1.1.0)
|
||||
jekyll-relative-links (0.7.0)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-sass-converter (3.0.0)
|
||||
sass-embedded (~> 1.54)
|
||||
jekyll-sitemap (1.4.0)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-titles-from-headings (0.5.3)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-watch (2.2.1)
|
||||
listen (~> 3.0)
|
||||
json (2.7.2)
|
||||
json-minify (0.0.3)
|
||||
json (> 0)
|
||||
kramdown (2.4.0)
|
||||
rexml
|
||||
kramdown-parser-gfm (1.1.0)
|
||||
kramdown (~> 2.0)
|
||||
liquid (4.0.4)
|
||||
listen (3.9.0)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.4.0)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (5.0.5)
|
||||
rack (3.0.10)
|
||||
rack-proxy (0.7.7)
|
||||
rack
|
||||
rake (13.2.1)
|
||||
rb-fsevent (0.11.2)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rexml (3.3.6)
|
||||
strscan
|
||||
rouge (3.30.0)
|
||||
safe_yaml (1.0.5)
|
||||
sass-embedded (1.58.3)
|
||||
google-protobuf (~> 3.21)
|
||||
rake (>= 10.0.0)
|
||||
strscan (3.1.0)
|
||||
terminal-table (3.0.2)
|
||||
unicode-display_width (>= 1.1.1, < 3)
|
||||
uglifier (4.2.0)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unicode-display_width (2.5.0)
|
||||
vite_ruby (3.5.0)
|
||||
dry-cli (>= 0.7, < 2)
|
||||
rack-proxy (~> 0.6, >= 0.6.1)
|
||||
zeitwerk (~> 2.2)
|
||||
webrick (1.8.1)
|
||||
zeitwerk (2.6.13)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
base64 (~> 0.2.0)
|
||||
bigdecimal (~> 3.1, >= 3.1.7)
|
||||
csv (~> 3.3)
|
||||
jekyll (~> 4.3, >= 4.3.3)
|
||||
jekyll-fontawesome-svg (~> 0.4.0)
|
||||
jekyll-minifier (~> 0.1.10)
|
||||
jekyll-paginate (~> 1.1)
|
||||
jekyll-relative-links (~> 0.7.0)
|
||||
jekyll-sitemap (~> 1.4)
|
||||
jekyll-titles-from-headings (~> 0.5.3)
|
||||
vite_ruby (~> 3.2)
|
||||
webrick (~> 1.8)
|
||||
|
||||
BUNDLED WITH
|
||||
2.4.22
|
||||
188
README.md
188
README.md
|
|
@ -1,160 +1,71 @@
|
|||
# TUNA 镜像站主页
|
||||
# TUNA mirrors 主页
|
||||
|
||||
注意:如果使用本项目搭建开源镜像站,**必须**:
|
||||
## 运行 Demo
|
||||
|
||||
* 移除所有与清华大学和 TUNA 相关的内容,包括且不限于站名、logo 和各种文档中出现的所有相关文本和图形;
|
||||
* 在网站首页恰当标注项目来源(`tuna/mirror-web`);
|
||||
* 遵循 GPLv2 协议开放修改后的源代码;
|
||||
### 直接编译
|
||||
|
||||
## 配置修改
|
||||
本站使用 Jekyll 编写,并使用 babel 编译 ECMAScript6,因此必须安装 ruby >= 2.0 和 nodejs.
|
||||
|
||||
除具体页面内容外,可修改的配置还包括:
|
||||
### For Centos
|
||||
1.安装 nodejs
|
||||
```
|
||||
yum install nodejs
|
||||
```
|
||||
2.安装 ruby 2.2.4 and rubygems
|
||||
|
||||
* `_config.yml`:Jekyll 配置文件,包括站点名称、描述、链接等;请不要轻易改动构建配置。
|
||||
* `_data/options.yml`:Jekyll 数据文件,主要包括各个镜像的简要描述和部分特殊镜像的配置。请仿照已有的配置进行修改。
|
||||
* `geninfo/genisolist.ini`:生成直接下载链接的配置文件。具体内容修改请提交到 [mirrorz-org/genisolist](https://github.com/mirrorz-org/genisolist)。
|
||||
Step 1: Install Required Packages
|
||||
```
|
||||
yum install gcc-c++ patch readline readline-devel zlib zlib-devel
|
||||
yum install libyaml-devel libffi-devel openssl-devel make
|
||||
yum install bzip2 autoconf automake libtool bison iconv-devel sqlite-devel
|
||||
```
|
||||
Step 2: Compile ruby 2.2.4 source code
|
||||
```
|
||||
wget -c https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.gz
|
||||
```
|
||||
Step 3: Install rubygems
|
||||
```
|
||||
wget -c https://rubygems.org/rubygems/rubygems-2.4.8.tgz
|
||||
ruby setup.rb
|
||||
```
|
||||
3. 安装 bundle 和 build
|
||||
```
|
||||
gem install bundle
|
||||
gem install build
|
||||
```
|
||||
4. Fork mirrors source code
|
||||
|
||||
## 编译方式
|
||||
```
|
||||
bundle install
|
||||
jekyll build
|
||||
```
|
||||
|
||||
本站使用 Jekyll 编写,并使用了 Vue、TypeScript、Vite 等前端框架开发。
|
||||
### Build In Docker
|
||||
```
|
||||
cd mirror-web
|
||||
docker build -t builden -f Dockerfile.build .
|
||||
docker run -it -v /path/to/mirror-web/:/data builden
|
||||
```
|
||||
|
||||
由于本站部分文档使用 submodule 方式嵌入仓库,clone 后构建前请运行 `git submodule update --init`。
|
||||
为正常运行,一些动态数据文件需要下载
|
||||
|
||||
### 本地开发
|
||||
|
||||
为正常运行,一些动态数据文件需要从镜像站下载:
|
||||
|
||||
```bash
|
||||
```
|
||||
wget https://mirrors.tuna.tsinghua.edu.cn/static/tunasync.json -O static/tunasync.json
|
||||
wget https://mirrors.tuna.tsinghua.edu.cn/static/tunet.json -O static/tunet.json
|
||||
mkdir -p static/status
|
||||
wget https://mirrors.tuna.tsinghua.edu.cn/static/status/isoinfo.json -O static/status/isoinfo.json
|
||||
```
|
||||
|
||||
编译前,先安装 Ruby (>= 3.0) 和 Node.js (>= 18),然后执行:
|
||||
|
||||
```bash
|
||||
bundle install --deployment
|
||||
npm install
|
||||
bundle exec jekyll build # 编译到 `_site/` 目录,或者
|
||||
bundle exec jekyll serve --livereload # 实时预览
|
||||
```
|
||||
|
||||
在编译时可选的环境变量:
|
||||
|
||||
* `JEKYLL_ENV=production`:编译生产版本(启用代码压缩),可能需要较长时间。
|
||||
* `VISUALIZER=true`:生成 Rollup 编译体积分析文件到 `_stats.html`。
|
||||
|
||||
### Docker 部署
|
||||
|
||||
仓库中的 `Dockerfile.build` 也可用于编译,推荐在生产环境部署时使用。
|
||||
|
||||
可用以下命令构建(如依赖无变化,镜像无需重复构建):
|
||||
|
||||
```bash
|
||||
docker build -t tunathu/mirror-web -f Dockerfile.build .
|
||||
docker pull tunathu/mirror-web # 或者直接拉取
|
||||
```
|
||||
|
||||
构建时,仅需将本地目录挂载到容器中:
|
||||
|
||||
```bash
|
||||
docker run --rm -v /path/to/mirror-web:/data tunathu/mirror-web
|
||||
```
|
||||
|
||||
即可在 `/path/to/mirror-web/_site` 中得到编译结果。
|
||||
|
||||
### 编译流程
|
||||
|
||||
本项目使用 Jekyll 作为唯一入口完成全部的构建流程。其具体流程是:
|
||||
|
||||
1. Jekyll 读取 `_config.yml` 和全部需要渲染的页面,并读取 `_data` 中的数据文件;
|
||||
2. Jekyll 调用 vite 的 Jekyll 插件,将所有的前端代码编译到 `_site/assets` 目录:
|
||||
1. 插件将需要传递给 vite 的数据编码为 JSON,并写入临时文件;
|
||||
2. 插件执行 vite 命令,根据 `_vite.config.mjs` 中的配置编译前端代码;
|
||||
1. `_vite.config.mjs` 读取临时文件,向 vite 流程中注册虚拟导入文件;
|
||||
2. vite 中注册的 `vite-plugin-ruby` 插件导入其配置文件;
|
||||
3. vite 加载 `_src/entrypoints` 中的代码,并生成依赖树;
|
||||
4. vite 中注册的 `vite-plugin-legacy` 插件增加一份输出版本,并增加 legacy 标志;
|
||||
5. vite 完成各代码的编译:
|
||||
- 对于 Vue 组件,调用 Vue 的 SFC 编译器完成编译;
|
||||
- 对于其中模板(`<template>`)使用 Liquid 语法的组件,调用 Liquid 编译器完成编译;
|
||||
- 对于 TypeScript 文件,调用 TypeScript 编译器完成编译;
|
||||
6. vite 完成代码各输出版本的后处理:
|
||||
- 对于 legacy 标志的输出版本,`vite-plugin-legacy` 使用 babel 转译,并记录所需的 polyfill;
|
||||
- 对于正常的输出版本,正常编译;
|
||||
7. vite 产生编译结果:
|
||||
1. `vite-plugin-legacy` 新建一个 vite 流水线,并将所需的 polyfill 作为入口,并将编译结果插入到 legacy 版本的输出中;
|
||||
2. 对上述 `vite-plugin-legacy` 产生的 polyfill 代码,再次使用 babel 转译;
|
||||
3. 新建一个 vite 流水线,并将 `_src/entrypoints-njs` 中的代码作为入口,编译结果插入到正常版本的输出中;
|
||||
- 其中,使用 babel 转译生成的 njs 代码,确保其可以在 NGINX 的 njs 模块中运行;
|
||||
4. `vite-plugin-ruby` 对所有输出的文件,生成一个 manifest 文件,用于 Jekyll 插件读取;
|
||||
8. vite 输出编译结果到 `.jekyll-cache/vite-dist` 下;
|
||||
3. 插件将 vite 的输出文件注册到 Jekyll 的静态文件列表中;
|
||||
4. 插件读入 vite 产生的 manifest 文件,备用;
|
||||
3. Jekyll 完成所有的页面渲染:
|
||||
- 对于静态文件,直接拷贝到 `_site` 目录;
|
||||
- 对于需要渲染的 html 文件,使用 Liquid 渲染引擎渲染;
|
||||
- 其中,需要调用 Jekyll 的 vite 插件注册的 Liquid 指令,生成前端代码的引用,后者根据已经加载的 manifest 文件,生成正确的引用指令。
|
||||
|
||||
### `fancy-index` 部署
|
||||
|
||||
本项目使用 NGINX 的 `fancy-index` 模块美化镜像站的文件列表展示。具体配置方法如下:
|
||||
|
||||
1. 确保 nginx 安装了 `ngx_http_fancyindex_module` 和 `ngx_http_js_module`,并确保后者的版本不低于 0.7.9;
|
||||
2. 在 `nginx.conf` 对应的 `server` 配置块中添加如下配置:
|
||||
|
||||
```nginx
|
||||
js_path /path/to/build_output/static/njs;
|
||||
|
||||
# 以下设定不能修改,以便与 mirror-web 的前端代码配合
|
||||
fancyindex_time_format "%d %b %Y %H:%M:%S +0000";
|
||||
fancyindex_show_path on;
|
||||
fancyindex_header /fancy-index/before;
|
||||
fancyindex_footer /fancy-index/after;
|
||||
|
||||
# 以下设定为推荐设置,fancyindex 的其它设定亦可按需修改
|
||||
fancyindex_exact_size off;
|
||||
fancyindex_name_length 256;
|
||||
|
||||
location /fancy-index {
|
||||
internal;
|
||||
root /path/to/build_output;
|
||||
subrequest_output_buffer_size 100k;
|
||||
js_import fancyIndexRender from fancy_index.njs;
|
||||
|
||||
location = /fancy-index/before {
|
||||
js_content fancyIndexRender.fancyIndexBeforeRender;
|
||||
}
|
||||
location = /fancy-index/after {
|
||||
js_content fancyIndexRender.fancyIndexAfterRender;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. 然后在需要开启目录浏览的 `location` 配置块中添加:
|
||||
|
||||
```nginx
|
||||
fancyindex on;
|
||||
```
|
||||
|
||||
### `genisolist` 部署
|
||||
|
||||
本项目使用 [`mirrorz-org/genisolist`](https://github.com/mirrorz-org/genisolist) 生成供前端渲染的 JSON 文件,请查看该项目的文档进行部署和修改。
|
||||
|
||||
如果增加了新的配置,不要忘记在 `geninfo/genisolist.ini` 中增加新的 `!include` 指令。
|
||||
之后 `jekyll serve` 即可运行 demo.
|
||||
|
||||
## 贡献文档
|
||||
|
||||
目前文档分为两部分维护,一部分是通用文档(`help/_posts/mirrorz-help-ng-transpiled` 目录),从 [mirrorz-org/mirrorz-docs](https://github.com/mirrorz-org/mirrorz-docs) 生成,在 TUNA 本地化维护在 [tuna/mirrorz-help-ng](https://github.com/tuna/mirrorz-help-ng) ,最终以 submodule 方式引入本仓库。如果您的改动是镜像站通用的,可以向前者贡献内容;如果是 TUNA 特有的,可以向后者 PR 。
|
||||
|
||||
另一部分维护在本仓库内(`help/_posts/` 目录),需要向本仓库进行 PR 。`mirror-web` 会逐渐迁移到使用通用文档。
|
||||
|
||||
### 基本步骤
|
||||
|
||||
1. Fork 本项目并 clone
|
||||
2. 创建分支 `git checkout -b foo-doc`
|
||||
3. 在 `help/_post` 中建立文档文件,文件名格式为 `年-月-日-名称.md`
|
||||
4. 用 Markdown 语法编写文档
|
||||
3. 在 `_posts/help` 中建立文档文件,文件名格式为 `年-月-日-名称.md`
|
||||
4. 用 markdown 语法编写文档
|
||||
5. 提交并推送代码
|
||||
6. 发送 Pull Request
|
||||
|
||||
|
|
@ -167,7 +78,4 @@ docker run --rm -v /path/to/mirror-web:/data tunathu/mirror-web
|
|||
### 特殊用法
|
||||
|
||||
#### 表单选择
|
||||
|
||||
该功能实现在 mirrorz-org/mirrorz-help 中,需要让相应文档迁移到使用通用文档以该功能。
|
||||
|
||||
即将推出(TODO):快速配置、拷贝命令、线路选择……
|
||||
例如 <http://mirrors.tuna.tsinghua.edu.cn/help/tensorflow/> 中,通过表单选择操作系统和版本号,建议直接使用 Vue.js
|
||||
|
|
|
|||
66
_config.yml
66
_config.yml
|
|
@ -1,13 +1,17 @@
|
|||
# Site settings
|
||||
# Welcome to Jekyll!
|
||||
#
|
||||
# This config file is meant for settings that affect your whole blog, values
|
||||
# which you are expected to set up once and rarely need to edit after that.
|
||||
# For technical reasons, this file is *NOT* reloaded automatically when you use
|
||||
# 'jekyll serve'. If you change this file, please restart the server process.
|
||||
|
||||
# Site settings
|
||||
title: 清华大学开源软件镜像站
|
||||
# title: 北京外国语大学开源软件镜像站
|
||||
school: 清华大学
|
||||
# school: 北京外国语大学
|
||||
brand: Tsinghua Open Source Mirror
|
||||
operator: 清华大学信息化技术中心
|
||||
author: Tsinghua University TUNA Association
|
||||
desc: 致力于为国内和校内用户提供高质量的开源软件镜像、Linux 镜像源服务,帮助用户更方便地获取开源软件。本镜像站由清华大学 TUNA 协会负责运行维护。
|
||||
# operator: 北外信息技术中心
|
||||
logo: true
|
||||
meow_404: true
|
||||
|
|
@ -20,68 +24,30 @@ urlv4: "https://mirrors4.tuna.tsinghua.edu.cn"
|
|||
urlv6: "https://mirrors6.tuna.tsinghua.edu.cn"
|
||||
aosp: "aosp.tuna.tsinghua.edu.cn"
|
||||
arch_archive: "arch-archive.tuna.tsinghua.edu.cn"
|
||||
aur: "aur.tuna.tsinghua.edu.cn"
|
||||
pypi: "pypi.tuna.tsinghua.edu.cn"
|
||||
homelink: "https://tuna.moe"
|
||||
hide_navbar: false
|
||||
hide_download: false
|
||||
hide_server_status: false
|
||||
|
||||
hide_mirrorz: false
|
||||
mirrorz_desc: 校园网联合镜像站
|
||||
mirrorz_link: "https://mirrors.cernet.edu.cn/list"
|
||||
mirrorz_help_link: "https://help.mirrors.cernet.edu.cn/"
|
||||
|
||||
sponsors:
|
||||
megvii:
|
||||
name: "旷视科技有限公司"
|
||||
link: "https://megvii.com/"
|
||||
short: "旷视"
|
||||
eng: "Megvii Technology Ltd."
|
||||
logo: "megvii-s"
|
||||
huawei:
|
||||
name: "华为技术有限公司"
|
||||
link: "https://huawei.com/"
|
||||
short: "华为"
|
||||
eng: "Huawei Technologies Co., Ltd."
|
||||
logo: "huawei"
|
||||
|
||||
poweredbys:
|
||||
kunpeng: "海思<sup>®</sup> Kunpeng<sup>®</sup> 920 处理器"
|
||||
|
||||
|
||||
# ==================================
|
||||
# Build settings below, DO NOT TOUCH
|
||||
# ==================================
|
||||
|
||||
# Build settings
|
||||
highlighter: rouge
|
||||
markdown: kramdown
|
||||
kramdown:
|
||||
input: GFM
|
||||
hard_wrap: false
|
||||
|
||||
vite:
|
||||
config_path: _src/vite.json
|
||||
viteConfig: _vite.config.mjs
|
||||
|
||||
plugins:
|
||||
- jekyll-relative-links
|
||||
sass:
|
||||
sass_dir: static/css
|
||||
|
||||
gems:
|
||||
- jekyll-babel
|
||||
- jekyll-sitemap
|
||||
- jekyll/fontawesome/svg
|
||||
- jekyll-minifier
|
||||
|
||||
jekyll-minifier:
|
||||
exclude: [ 'assets/*' ]
|
||||
babel_js_extensions: 'es6'
|
||||
|
||||
exclude: [gen_robot.sh, geninfo/, gen_desc.py]
|
||||
addition_exclude:
|
||||
- package.json
|
||||
- package-lock.json
|
||||
- node_modules/
|
||||
- Gemfile
|
||||
- Gemfile.lock
|
||||
- README.md
|
||||
- vendor/
|
||||
- Dockerfile*
|
||||
- LICENSE
|
||||
exclude: [Gemfile, Gemfile.lock, README.md, gen_robot.sh, vendor, geninfo/, gen_robot.sh, gen_desc.py, Dockerfile*]
|
||||
|
||||
# vim: ts=2 sts=2 sw=2 expandtab
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ mirror_desc:
|
|||
desc: Android 操作系统源代码
|
||||
- name: AdoptOpenJDK
|
||||
desc: 社区维护的 OpenJDK 二进制包
|
||||
- name: AUR
|
||||
desc: Arch Linux 用户软件库
|
||||
- name: Bananian
|
||||
desc: 为 Banana Pi 制作的,基于官方 Debian 仓库的发行版镜像和软件包仓库
|
||||
- name: CPAN
|
||||
|
|
@ -14,8 +16,12 @@ mirror_desc:
|
|||
desc: TeX 的各种发行版、软件包和文档
|
||||
- name: CocoaPods
|
||||
desc: Objective-C 和 Swift 的依赖管理器
|
||||
- name: ELK
|
||||
desc: 现已更名为 Elastic Stack,仅保留用作向后兼容
|
||||
- name: FreeCAD
|
||||
desc: 基于 Qt 的计算机辅助设计程序
|
||||
- name: HHVM
|
||||
desc: Facebook 开发的高性能 PHP 语言虚拟机
|
||||
- name: KaOS
|
||||
desc: 一个基于 KDE 的独立发行版
|
||||
- name: NetBSD
|
||||
|
|
@ -52,6 +58,8 @@ mirror_desc:
|
|||
desc: Artix Linux 的官方软件包仓库(基于 Arch Linux 的不使用 systemd 的发行版)
|
||||
- name: artixlinux-iso
|
||||
desc: Artix Linux 的安装镜像
|
||||
- name: bananian
|
||||
desc: 用于 Banana Pi 的 Debian 操作系统
|
||||
- name: binutils-gdb.git
|
||||
desc: Binutils 和 GDB 等开发工具的源码 Git 仓库
|
||||
- name: bioconductor
|
||||
|
|
@ -84,14 +92,10 @@ mirror_desc:
|
|||
desc: 用于联机分析(OLAP)的列式数据库管理系统
|
||||
- name: clojars
|
||||
desc: Clojure 语言的第三方软件包仓库
|
||||
- name: cmder
|
||||
desc: Windows 下的终端模拟器套件
|
||||
- name: crates.io-index
|
||||
desc: 面向 Rust 语言的软件包稀疏索引 crates.io
|
||||
- name: crates.io-index.git
|
||||
desc: 面向 Rust 语言的软件包索引 crates.io
|
||||
- name: ctex
|
||||
desc: CTEX 安装镜像存档
|
||||
desc: 旧版 CTEX 安装镜像存档
|
||||
- name: cygwin
|
||||
desc: Cygwin 官方软件包仓库
|
||||
- name: dart-pub
|
||||
|
|
@ -126,8 +130,6 @@ mirror_desc:
|
|||
desc: RHEL 及其变体的 RPM 软件包仓库
|
||||
- name: elvish
|
||||
desc: TUNA 前会长 xiaq 开发的革命性 Shell
|
||||
- name: entware
|
||||
desc: 适用于嵌入式系统的软件包库
|
||||
- name: epel
|
||||
desc: 企业版 Linux 附加软件包
|
||||
- name: erlang-solutions
|
||||
|
|
@ -146,8 +148,6 @@ mirror_desc:
|
|||
desc: Flutter 框架源码镜像
|
||||
- name: fzug
|
||||
desc: Fedora 中文用户组的软件包仓库
|
||||
- name: garuda-linux
|
||||
desc: Garuda Linux是基于Arch Linux操作系统的滚动式发行版
|
||||
- name: gcc.git
|
||||
desc: GCC 的源码仓库
|
||||
- name: gentoo
|
||||
|
|
@ -162,8 +162,6 @@ mirror_desc:
|
|||
desc: Git 工具的 Windows 系统版本
|
||||
- name: git-repo
|
||||
desc: Google 开发的项目依赖下载工具 repo 的镜像
|
||||
- name: github-raw
|
||||
desc: 一些 Github 项目的部分文件镜像(被其他镜像所使用)
|
||||
- name: github-release
|
||||
desc: 一些项目的 Github Release 镜像
|
||||
- name: gitlab-ce
|
||||
|
|
@ -176,8 +174,6 @@ mirror_desc:
|
|||
desc: GitLab 持续集成框架版本 10 及以上
|
||||
- name: glibc.git
|
||||
desc: GNU C Library 的源码 Git 仓库
|
||||
- name: googlefonts
|
||||
desc: Google 设计的 Noto 系列开源字体
|
||||
- name: gnu
|
||||
desc: GNU 项目的软件包(源代码、文档和部分平台的二进制文件)
|
||||
- name: gnu-alpha
|
||||
|
|
@ -190,8 +186,6 @@ mirror_desc:
|
|||
desc: Homebrew/Linuxbrew 的 taps(软件包描述文件 Git 仓库)
|
||||
- name: homebrew-bottles
|
||||
desc: 预编译的 Homebrew 软件包
|
||||
- name: hugging-face-models
|
||||
desc: Hugging Face Transformers 提供的预训练模型
|
||||
- name: iina
|
||||
desc: macOS 上的现代化开源视频播放器
|
||||
- name: infinality-bundle
|
||||
|
|
@ -242,20 +236,18 @@ mirror_desc:
|
|||
desc: Linux 内核源代码的 Git 仓库, 稳定版分支
|
||||
- name: linux.git
|
||||
desc: Linux 内核源代码的 Git 仓库
|
||||
- name: linuxlite-cd
|
||||
desc: 基于 Ubuntu 长期支持版本(LTS)的 Linux 发行版 Linux Lite 的安装镜像
|
||||
- name: linuxbrew-bottles
|
||||
desc: 预编译的 Linuxbrew 软件包
|
||||
- name: linuxmint
|
||||
desc: Linux Mint 的官方软件源
|
||||
- name: linuxmint-cd
|
||||
desc: Linux Mint 的安装镜像
|
||||
- name: llvm
|
||||
desc: LLVM 编译器套件的多个 git 源码仓库(已停止更新)
|
||||
desc: LLVM 编译器套件的多个 git repo 的镜像
|
||||
- name: llvm-apt
|
||||
desc: LLVM 编译器套件的 APT 安装源
|
||||
- name: llvm-binary
|
||||
desc: LLVM 编译器套件可执行文件
|
||||
- name: llvm-project.git
|
||||
desc: LLVM 编译器套件的新源码仓库(monorepo)
|
||||
- name: loongson
|
||||
desc: 用于龙芯电脑的软件包
|
||||
- name: lxc-images
|
||||
|
|
@ -278,12 +270,8 @@ mirror_desc:
|
|||
desc: 衍生于 MySQL 的开源关系数据库
|
||||
- name: miniforge
|
||||
desc: 适用于 conda-forge 的最小化 conda 安装器
|
||||
- name: minikube
|
||||
desc: 在本地运行的单节点 Kubernetes 集群安装工具
|
||||
- name: mongodb
|
||||
desc: 开源的跨平台 NoSQL 文档型数据库
|
||||
- name: mozilla
|
||||
desc: Mozilla APT 软件源
|
||||
- name: msys2
|
||||
desc: 用于编译原生 Windows 程序的类 Linux 开发环境
|
||||
- name: mxlinux
|
||||
|
|
@ -300,18 +288,10 @@ mirror_desc:
|
|||
desc: Nixpkgs 软件包发行版
|
||||
- name: nixos-images
|
||||
desc: NixOS 的安装镜像和虚拟机镜像
|
||||
- name: openbsd
|
||||
desc: OpenBSD 软件包镜像源
|
||||
- name: netbsd
|
||||
desc: NetBSD 系统镜像源
|
||||
- name: u.sb
|
||||
desc: 为 Debian / Ubuntu 编译的最新版 nginx
|
||||
- name: nodejs-release
|
||||
desc: 预编译的 Node.js 二进制程序
|
||||
- name: nodesource
|
||||
desc: 为 Debian, Ubuntu, Fedora, RHEL 等发行版提供预编译的 Node.js 和 npm 等软件包
|
||||
- name: obs-studio
|
||||
desc: 自由的流媒体与视频录制程序(Open Broadcast Software)
|
||||
- name: openeuler
|
||||
desc: 华为公司开源的服务器操作系统
|
||||
- name: OpenMediaVault
|
||||
|
|
@ -328,8 +308,6 @@ mirror_desc:
|
|||
desc: OpenWrt/LEDE 软件包镜像源
|
||||
- name: opnsense
|
||||
desc: OPNsense 是基于 FreeBSD 的防火墙和路由软件
|
||||
- name: orchestrator
|
||||
desc: MySQL 高可用与复制管理工具
|
||||
- name: osdn
|
||||
desc: OSDN 网站提供的开源软件下载
|
||||
- name: osmc
|
||||
|
|
@ -344,8 +322,6 @@ mirror_desc:
|
|||
desc: 开源的数据库解决方案,详见 http://www.percona.com
|
||||
- name: pkgsrc
|
||||
desc: NetBSD 的第三方软件源
|
||||
- name: pkgsrc.git
|
||||
desc: pkgsrc 的源码仓库
|
||||
- name: postgresql
|
||||
desc: 著名的开源关系型数据库 PostgreSQL 的镜像
|
||||
- name: prometheus
|
||||
|
|
@ -358,8 +334,6 @@ mirror_desc:
|
|||
desc: 为 GNU Radio 设计的编译管理系统
|
||||
- name: pypi
|
||||
desc: Python 软件包索引源
|
||||
- name: python
|
||||
desc: Python 官方源码、软件、文档仓库
|
||||
- name: qemu.git
|
||||
desc: 处理器模拟器 QEMU 的源码 Git 仓库
|
||||
- name: qubesos
|
||||
|
|
@ -370,8 +344,8 @@ mirror_desc:
|
|||
desc: Racket 语言环境安装包
|
||||
- name: raspberrypi
|
||||
desc: 一些专为树莓派提供的 Debian 软件包
|
||||
- name: raspbian
|
||||
desc: 为树莓派编译的 Debian 系统软件源
|
||||
- name: raspberry-pi-os
|
||||
desc: Raspberry Pi OS (原 Raspbian)系统软件源
|
||||
- name: raspberry-pi-os-images
|
||||
desc: Raspberry Pi OS (原 Raspbian)的安装镜像
|
||||
- name: redhat
|
||||
|
|
@ -381,21 +355,17 @@ mirror_desc:
|
|||
- name: repo-ck
|
||||
desc: repo-ck 是 Arch 的非官方仓库,内有包含 ck 补丁、BFS 调度器等
|
||||
- name: repoforge
|
||||
desc: Repoforge 是 RHEL 系统下的软件仓库,已长期无更新
|
||||
desc: Repoforge 是 RHEL 系统下的软件仓库,拥有 10000 多个软件包,被认为是最安全、最稳定的一个软件仓库
|
||||
- name: ros
|
||||
desc: ROS 提供一系列程序库和工具以帮助软件开发者创建机器人应用软件
|
||||
desc: ROS提供一系列程序库和工具以帮助软件开发者创建机器人应用软件
|
||||
- name: ros2
|
||||
desc: ROS (Robot Operating System) 2.0 版本
|
||||
- name: rosdistro
|
||||
desc: rosdep 所使用的依赖关系数据库
|
||||
- name: rpmfusion
|
||||
desc: RPM Fusion 提供了一些 Fedora Project 和 Red Hat 不包含的软件
|
||||
- name: rubygems
|
||||
desc: Ruby 的一个包管理器
|
||||
- name: rudder
|
||||
desc: 自动化 IT 基础设施配置与审计工具
|
||||
- name: rust-analyzer
|
||||
desc: Rust 语言的模块化编译器前端
|
||||
- name: rustup
|
||||
desc: Rust 的官方安装工具
|
||||
- name: sagemath
|
||||
|
|
@ -408,28 +378,18 @@ mirror_desc:
|
|||
desc: 用于 ARM 设备的 Slackware 发行版源代码和官方软件包仓库
|
||||
- name: solus
|
||||
desc: Solus 的软件仓库,致力于制作对新手友好的发行版
|
||||
- name: sourceware
|
||||
desc: sourceware 网站的项目
|
||||
- name: stackage
|
||||
desc: Haskell 项目管理器 stack 所需的元数据与 ghc 安装包的镜像
|
||||
- name: steamos
|
||||
desc: Valve 开发的基于 Debian 的操作系统,包含安装镜像和官方软件包仓库
|
||||
- name: stellarium
|
||||
desc: 自由的模拟天文台软件
|
||||
- name: tensorflow
|
||||
desc: 采用数据流图、用于数值计算的开源深度学习框架 TensorFlow
|
||||
- name: termux
|
||||
desc: 运行在 Android 上的终端模拟器 Termux 的官方软件包仓库
|
||||
- name: texstudio
|
||||
desc: 使用 Qt 编写的自由的 LaTeX 套件
|
||||
- name: thuthesis
|
||||
desc: 清华大学学位论文 LaTeX 模板
|
||||
- name: tinycorelinux
|
||||
desc: 为嵌入式开发的微型 Linux 发行版
|
||||
- name: tlpretest
|
||||
desc: TeX Live 测试版本的软件包仓库与安装镜像
|
||||
- name: tuna
|
||||
desc: TUNA 协会资料存档
|
||||
- name: ubuntu
|
||||
desc: 流行的 Linux 发行版 Ubuntu 的安装镜像和官方软件包仓库
|
||||
- name: ubuntu-cdimage
|
||||
|
|
@ -450,34 +410,41 @@ mirror_desc:
|
|||
desc: 基于 xbps 包管理器的独立 Linux 发行版
|
||||
- name: winehq
|
||||
desc: Wine (允许类 Unix 操作系统运行 Windows 程序)
|
||||
- name: wireshark
|
||||
desc: 一个免费开源的网络数据包分析软件
|
||||
- name: zabbix
|
||||
desc: 著名的网络监视、管理系统
|
||||
|
||||
new_mirrors:
|
||||
- python
|
||||
- chef
|
||||
- rudder
|
||||
- OpenMediaVault
|
||||
- kde
|
||||
- kde-application
|
||||
- kde-neon
|
||||
- gentoo-portage.git
|
||||
- KaOS
|
||||
- openeuler
|
||||
- opnsense
|
||||
- julia
|
||||
- julia-releases
|
||||
- julia-general.git
|
||||
- miniforge
|
||||
|
||||
unlisted_mirrors:
|
||||
- status: 'success'
|
||||
last_update: '-'
|
||||
name: "tuna"
|
||||
url: '/tuna/'
|
||||
upstream: 'cloud.tsinghua.edu.cn'
|
||||
name: "AUR"
|
||||
url: 'https://aur.tuna.tsinghua.edu.cn/'
|
||||
upstream: 'https://aur.archlinux.org/'
|
||||
is_master: true
|
||||
- link_to: 'sourceware'
|
||||
last_update: '-'
|
||||
name: "cygwin"
|
||||
url: '/cygwin/'
|
||||
- link_to: 'osdn'
|
||||
name: "manjaro-cd"
|
||||
url: '/osdn/storage/g/m/ma/manjaro/'
|
||||
- link_to: 'osdn'
|
||||
name: "manjaro-arm-cd"
|
||||
url: '/osdn/storage/g/m/ma/manjaro-arm/'
|
||||
- link_to: 'osdn'
|
||||
name: "mxlinux-isos"
|
||||
url: '/osdn/storage/g/m/mx/mx-linux/ISOs/'
|
||||
- link_to: 'osdn'
|
||||
name: "garuda-linux"
|
||||
url: '/osdn/storage/g/g/ga/garuda-linux/'
|
||||
- link_to: 'osdn'
|
||||
name: "linuxlite-cd"
|
||||
url: '/osdn/storage/g/l/li/linuxlite/'
|
||||
- link_to: 'github-release'
|
||||
name: "prometheus"
|
||||
url: '/github-release/prometheus/prometheus/'
|
||||
|
|
@ -499,35 +466,9 @@ unlisted_mirrors:
|
|||
- link_to: 'github-release'
|
||||
name: "miniforge"
|
||||
url: '/github-release/conda-forge/miniforge/'
|
||||
- link_to: 'github-release'
|
||||
name: "stellarium"
|
||||
url: '/github-release/Stellarium/stellarium/'
|
||||
- link_to: 'github-release'
|
||||
name: "cmder"
|
||||
url: '/github-release/cmderdev/cmder/'
|
||||
- link_to: 'github-release'
|
||||
name: "googlefonts"
|
||||
url: '/github-release/googlefonts/'
|
||||
- link_to: 'github-release'
|
||||
name: "minikube"
|
||||
url: '/github-release/kubernetes/minikube/'
|
||||
- link_to: 'github-release'
|
||||
name: "obs-studio"
|
||||
url: '/github-release/obsproject/obs-studio/'
|
||||
- link_to: 'github-release'
|
||||
name: "orchestrator"
|
||||
url: '/github-release/openark/orchestrator/'
|
||||
- link_to: 'github-release'
|
||||
name: "texstudio"
|
||||
url: '/github-release/texstudio-org/texstudio/'
|
||||
- link_to: 'github-release'
|
||||
name: "rust-analyzer"
|
||||
url: '/github-release/rust-analyzer/rust-analyzer/'
|
||||
- link_to: 'github-release'
|
||||
name: "thuthesis"
|
||||
url: '/github-release/tuna/thuthesis'
|
||||
|
||||
force_redirect_help_mirrors:
|
||||
|
||||
force_help_mirrors:
|
||||
- AOSP
|
||||
- lineageOS
|
||||
- homebrew
|
||||
|
|
@ -540,7 +481,6 @@ force_redirect_help_mirrors:
|
|||
- weave
|
||||
- CocoaPods
|
||||
- llvm
|
||||
- llvm-project.git
|
||||
- openthos-src
|
||||
- qemu.git
|
||||
- linux-firmware.git
|
||||
|
|
@ -549,14 +489,12 @@ force_redirect_help_mirrors:
|
|||
- binutils-gdb.git
|
||||
- glibc.git
|
||||
- flutter-sdk.git
|
||||
- pkgsrc.git
|
||||
- nixpkgs.git
|
||||
- ohmyzsh.git
|
||||
- julia-general.git
|
||||
|
||||
label_map:
|
||||
unknown: text-bg-dummy
|
||||
syncing: text-bg-info
|
||||
success: text-bg-success
|
||||
fail: text-bg-warning
|
||||
failed: text-bg-warning
|
||||
paused: text-bg-warning
|
||||
unknown: label-default
|
||||
syncing: label-info
|
||||
success: label-success
|
||||
fail: label-warning
|
||||
failed: label-warning
|
||||
paused: label-warning
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
<div class="flex-grow-1"></div>
|
||||
<div id="footerwrap" class="tuna-foot">
|
||||
{% for footer-i in (1..2) %}
|
||||
{% unless page.legacy and footer-i == 1 %}
|
||||
<div id="footerwrap" class="tuna-foot-{{ footer-i }}"{% if page.legacy %} style="visibility: visible;"{% endif %}>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-4 {% if page.legacy %}col-4{% else %}col-12{% endif %}">
|
||||
<div class="col-lg-4 col-md-4{% if page.legacy %} col-xs-4{% endif %}">
|
||||
<p class="thuhidden">本站{% if site.operator %}由{{ site.operator }}支持创办,{% endif %}由清华大学 TUNA 协会运行维护。</p>
|
||||
<p class="thuhidden">清华大学 TUNA 协会,全名清华大学学生网络与开源软件协会,是由清华大学热爱网络技术和开源软件的极客组成的学生技术社团。</p>
|
||||
<p>本站相关源码可在 <a href="https://github.com/tuna/tunasync"><em>这里(镜像管理器)</em></a> 和 <a href="https://github.com/tuna/mirror-web"><em>这里(镜像站网页)</em></a> 获取。</p>
|
||||
|
|
@ -11,49 +12,38 @@
|
|||
<p class="thuhidden">{{ site.footnote }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-lg-4 {% if page.legacy %}col-4{% else %}col-12{% endif %}">
|
||||
<h4 class="mt-0">Contact Us</h4>
|
||||
<div class="col-lg-4 col-md-4{% if page.legacy %} col-xs-4{% endif %}">
|
||||
<h4>Contact Us</h4>
|
||||
<div class="thuhidden">
|
||||
<ul class="social">
|
||||
<li>
|
||||
<a href="https://groups.google.com/forum/#!forum/tuna-general">{% fa_svg fas.fa-envelope %} Mailing List</a>
|
||||
<a href="https://groups.google.com/forum/#!forum/tuna-general"><i class="fa fa-envelope"></i> Mailing List</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://web.libera.chat/#tuna">{% fa_svg fas.fa-hashtag %} #tuna at Libera.Chat</a>
|
||||
IRC: <a href="https://webchat.freenode.net/?channels=%23tuna">#tuna at freenode</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/tuna/">{% fa_svg fab.fa-github %} GitHub </a>
|
||||
<a href="https://github.com/tuna/"><i class="fa fa-github"></i> GitHub </a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://weibo.com/u/5402274706">{% fa_svg fab.fa-weibo %} 新浪微博</a>
|
||||
<a href="http://weibo.com/u/5402274706"><i class="fa fa-weibo"></i> 新浪微博</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% if site.sponsor %}
|
||||
<h4>Sponsor</h4>
|
||||
<div class="img-responsive thuhidden">
|
||||
{% for sponsor in site.sponsor %}
|
||||
<img src="/static/img/{{ site.sponsors[sponsor].logo }}.png" srcset="/static/img/{{ site.sponsors[sponsor].logo }}.png 1x, /static/img/{{ site.sponsors[sponsor].logo }}@2x.png 2x, /static/img/{{ site.sponsors[sponsor].logo }}@3x.png 3x, /static/img/{{ site.sponsors[sponsor].logo }}@4x.png 4x" alt="{{ site.sponsors[sponsor].short }}" />
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% assign first_sponsor = site.sponsors[site.sponsor.first] %}
|
||||
<p class="thuhidden">本存储服务器由<a href="{{ first_sponsor.link }}">{{ first_sponsor.name }}</a>({{ first_sponsor.eng }})赞助{% if site.poweredby %},并由{{ site.poweredbys[site.poweredby] }}强力驱动{% endif %}。TUNA 感谢<!--
|
||||
{% for sponsor in site.sponsor %}
|
||||
-->{{ site.sponsors[sponsor].short }}<!--
|
||||
{% if forloop.rindex0 == 1 %}
|
||||
-->和<!--
|
||||
{% elsif forloop.rindex0 > 1 %}
|
||||
-->、<!--
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
-->对开源软件和社区的贡献。</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-lg-4 {% if page.legacy %}col-4{% else %}col-12{% endif %}">
|
||||
<div class="col-lg-4 col-md-4{% if page.legacy %} col-xs-4{% endif %}">
|
||||
<img class="img-responsive thuhidden center-block" style="margin-top:5%" src="/static/img/logo-white.png" srcset="/static/img/logo-white.png 1x, /static/img/logo-white@2x.png 2x, /static/img/logo-white@3x.png 3x, /static/img/logo-white@4x.png 4x" />
|
||||
</div>
|
||||
</div><!--/row -->
|
||||
</div><!--/container -->
|
||||
</div><!--/footerwrap -->
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
|
||||
{% fa_svg_generate %}
|
||||
<script>
|
||||
WebFont.load({
|
||||
custom: {
|
||||
families: ['Lato']
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -2,86 +2,26 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{% capture page_desc %}{% if include.metaDesc %}{{ include.metaDesc }} | {% if include.cattitle %}{{ include.cattitle }} | {% endif %}{% endif %}{{ site.title }},{{ site.desc }}{% endcapture %}
|
||||
{% capture page_title %}{% if page.mirrorid %} {{ page.mirrorid }} |{% elsif page.title %} {{ page.title }} |{% endif %}{% if include.cattitle %} {{ include.cattitle }} |{% endif %}{% if (page.title or include.cattitle) %}{{" "}}{% endif %}{{ site.title }}{% if site.brand %} | {{ site.brand }}{% endif %}{% endcapture %}
|
||||
|
||||
<meta name="description" content="{{ page_desc }}">
|
||||
<meta name="description" content="{{ site.title }},致力于为国内和校内用户提供高质量的开源软件镜像、Linux镜像源服务,帮助用户更方便地获取开源软件。本镜像站由清华大学TUNA团队负责维护。">
|
||||
<meta name="keywords" content="镜像站,镜像源,Linux,软件源,开源">
|
||||
<meta name="author" content="{{ site.author }}">
|
||||
<meta name="author" content="TUNA">
|
||||
<link rel="shortcut icon" href="/static/img/favicon.png">
|
||||
<link rel="alternate" type="application/rss+xml" title="镜像站新闻" href="/feed.xml">
|
||||
|
||||
<!-- Open Graph metadata -->
|
||||
<meta property="og:title" content="{{ page_title }}" />
|
||||
<meta property="og:description" content="{{ page_desc }}" />
|
||||
<meta property="og:image" content="{{ site.url }}{{ site.baseurl }}/static/img/logo-share.png" /> <!-- WeChat requires that thumbnail image is larger than 300x300 -->
|
||||
<meta property="og:url" content="{{ site.url }}{{ site.baseurl }}{{ page.url }}" />
|
||||
<meta property="og:locale" content="zh_CN" />
|
||||
{% if include.notArticle %}
|
||||
<meta property="og:type" content="website" />
|
||||
{% else %}
|
||||
<meta property="og:type" content="article" />
|
||||
{% if page.date %}
|
||||
<meta property="article:published_time" content="{{page.date | date_to_xmlschema}}"/>
|
||||
{% endif %}
|
||||
<meta property="article:author" content="{{ site.author }}"/>
|
||||
{% endif %}
|
||||
|
||||
<title>{{ page_title }}</title>
|
||||
{% unless include.nostyle %}
|
||||
{% include vite_script.html %}
|
||||
<link rel="stylesheet" id="style-polyfill-bs3" title="style-polyfill-bs3" href="{% vite_asset_path bs3-polyfill.scss %}" media="screen" integrity="sha256-OnlyforlegacybrowsersAAAAAAAAAAAAAAAAAAAAAA=" />
|
||||
<script>
|
||||
(function(){
|
||||
var s = document.getElementById('style-polyfill-bs3');
|
||||
if(s){
|
||||
/*
|
||||
We first test if the browser supports CSS variables. If it does, we
|
||||
remove the style tag. If it doesn't, or it dosn't support the
|
||||
CSS.supports at all, then ....
|
||||
*/
|
||||
try {
|
||||
if(!CSS.supports('color', 'var(--fake-var)')){
|
||||
throw false;
|
||||
}
|
||||
s.disabled = true;
|
||||
s.parentNode.removeChild(s);
|
||||
}catch(e){
|
||||
/*
|
||||
We detect if the polyfill css is loaded. It will not be loaded
|
||||
if the browser supports content integrity.
|
||||
*/
|
||||
var found = 0;
|
||||
for(var i = 0; i < document.styleSheets.length; i++){
|
||||
if(document.styleSheets[i].title === s.title){
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found){
|
||||
var s2 = s.cloneNode();
|
||||
s2.integrity = "";
|
||||
document.head.appendChild(s2);
|
||||
}
|
||||
}
|
||||
/*
|
||||
So the cases are:
|
||||
- Old browsers that cannot run the script before:
|
||||
- They will not support content integrity and will load the
|
||||
polyfill css.
|
||||
- Old browsers that can run the script before, but do not support
|
||||
content integrity:
|
||||
- They will load the polyfill css. and the script before do nothing
|
||||
- Old browsers that support content integrity but do not support
|
||||
CSS variables:
|
||||
- The before script will load the polyfill css.
|
||||
- Modern browers with script disabled:
|
||||
- Content integrity will prevent them from loading the polyfill.
|
||||
*/
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<title>{% if page.mirrorid %} {{ page.mirrorid }} |{% elsif page.title %} {{ page.title }} |{% endif %}{% if include.cattitle %} {{ include.cattitle }} |{% endif %}{% if (page.title || include.cattitle) %}{{" "}}{% endif %}{{ site.title }}{% if site.brand %} | {{ site.brand }}{% endif %}</title>
|
||||
<link rel="stylesheet" href="/static/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-select.min.css">
|
||||
<link rel="stylesheet" href="/static/css/font-awesome.min.css" >
|
||||
<link rel="stylesheet" href="/static/css/spinkit.css">
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
<script src="/static/js/jquery.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
<script src="/static/js/bootstrap-select.min.js"></script>
|
||||
{% unless page.legacy %}
|
||||
<script src="/static/js/vue.min.js"></script>
|
||||
<script src="/static/js/timeago.min.js"></script>
|
||||
{% endunless %}
|
||||
<script src="/static/js/markup.min.js"></script>
|
||||
<script src="/static/js/webfont.js"></script>
|
||||
<script src="/static/js/thuhidden.js"></script>
|
||||
{% if page.legacy %}
|
||||
<style>
|
||||
.container {
|
||||
|
|
@ -125,5 +65,4 @@ a.navbar-brand {
|
|||
<![endif]-->
|
||||
</style>
|
||||
{% endif %}
|
||||
{% endunless %}
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
{% raw %}
|
||||
<div id="upgrade-mask">
|
||||
<div style="position: fixed; background: white; width: 100%; height: 100%; z-index: 2000; padding-top: 40px; overflow: scroll;" data-bs-theme="light" class="container mw-100">
|
||||
<div class="card"><div class="card-body">
|
||||
<p lang="zh-Hans">尊敬的访问者,</p>
|
||||
<p lang="en">Dear visitor, </p>
|
||||
<p lang="fr">Chère cliente, </p>
|
||||
<p lang="ja">ご利用者様</p>
|
||||
<div v-if="false" id="upgrade-mask" style="position: fixed; background: white; width: 100%; height: 100%; z-index: 200; padding-top: 40px; overflow: scroll;" class="container">
|
||||
<div class="well">
|
||||
<p>尊敬的访问者,</p>
|
||||
<p>Dear visitor, </p>
|
||||
<p>Chère cliente, </p>
|
||||
<p>ご利用者様</p>
|
||||
<p> </p>
|
||||
<p lang="zh-Hans">您好!</p>
|
||||
<p lang="en">Hello! </p>
|
||||
<p lang="fr">Bonjour! </p>
|
||||
<p lang="ja">宜しくお願い致します。</p>
|
||||
<p>您好!</p>
|
||||
<p>Hello! </p>
|
||||
<p>Bonjour! </p>
|
||||
<p>宜しくお願い致します。</p>
|
||||
<p> </p>
|
||||
<p lang="zh-Hans">我们检测到您当前的浏览器不能正常显示我们的主页,请更新您的浏览器,并启用 Javascript,或者访问我们的<a href="/legacy_index">代用页面</a>。</p>
|
||||
<p lang="en">Your browser is not compatible with our website. Please upgrade and enable Javascript, or visit our <a href="/legacy_index">alternative page</a>.</p>
|
||||
<p lang="fr">Votre navigateur n'est pas compatible avec notre site web. Mettez à niveau et activez Javascript, ou visitez notre <a href="/legacy_index">page alternative</a>.</p>
|
||||
<p lang="ja">お使いのブラウザは当サイトとの互換性はありません。ブラウザを更新しJavaScriptを有効にするか、或いはこちらの<a href="/legacy_index">代用ページ</a>をご利用ください。</p>
|
||||
<p>我们检测到您当前的浏览器不能正常显示我们的主页,请更新您的浏览器,并启用 Javascript,或者访问我们的<a href="/legacy_index">代用页面</a>。</p>
|
||||
<p>Your browser is not compatible with our website. Please upgrade and enable Javascript, or visit our <a href="/legacy_index">alternative page</a>.</p>
|
||||
<p>Votre navigateur n'est pas compatible avec notre site web. Mettez à niveau et activez Javascript, ou visitez notre <a href="/legacy_index">page alternative</a>.</p>
|
||||
<p>お使いのブラウザは当サイトとの互換性はありません。ブラウザを更新しJavaScriptを有効にするか、或いはこちらの<a href="/legacy_index">代用ページ</a>をご利用ください。</p>
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
||||
{% endraw %}
|
||||
|
|
|
|||
|
|
@ -1,86 +0,0 @@
|
|||
<div class="flex-row d-flex">
|
||||
<h3 id="mirror-title" class="align-self-center">{% fa_svg fas.fa-cube %} 镜像列表 </h3>
|
||||
{% unless include.legacy %}
|
||||
<SearchBox v-model="filter" />
|
||||
{% endunless %}
|
||||
</div>
|
||||
<table class="table row table-hover" v-if="mirrorList.length">
|
||||
<thead>
|
||||
<tr class="row">
|
||||
<th class="col-8 col-lg-7 col-xl-8">Name</th>
|
||||
<th class="col-4 col-lg-5 col-xl-4">Last Update</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
{% if include.legacy %}{% raw %}
|
||||
{{mirs}}
|
||||
<tr class="row status-{{status}}">
|
||||
{% endraw %}{% else %}{% raw %}
|
||||
<tr v-for="mir in filteredMirrorList" :class="['row', 'status-'+mir.status]" :key="mir.name">
|
||||
{% endraw %}{% endif %}
|
||||
<td class="col-8 col-lg-7 col-xl-8">
|
||||
|
||||
<a class="mirror-item-label"
|
||||
{% if include.legacy %}{% raw %}
|
||||
href="{{url}}" title="{{description}}"
|
||||
{% endraw %}{% else %}{% raw %}
|
||||
data-bs-toggle="popover" data-bs-trigger="hover" data-bs-placement="right"
|
||||
:data-bs-content="mir.description" :href="mir.url" :aria-label="mir.name + (mir.description ? ', ' + mir.description : '')"
|
||||
v-with-popover
|
||||
{% endraw %}{% endif %}
|
||||
>
|
||||
{% if include.legacy %}{% raw %}
|
||||
{{name}}
|
||||
{% endraw %}{% else %}{% raw %}
|
||||
{{mir.name}}
|
||||
{% endraw %}{% endif %}
|
||||
</a>
|
||||
{% if include.legacy %}{% raw %}
|
||||
{{if is_new}}
|
||||
<span
|
||||
{% endraw %}{% else %}{% raw %}
|
||||
<span v-if='mir.is_new'
|
||||
{% endraw %}{% endif %}
|
||||
class="badge badge-new" >new</span>
|
||||
{% if include.legacy %}{% raw %}
|
||||
{{/if}}
|
||||
{% endraw %}{% endif %}
|
||||
{% if include.legacy %}{% raw %}
|
||||
{{if help_url}}
|
||||
<a href="{{help_url}}"
|
||||
{% endraw %}{% else %}{% raw %}
|
||||
<a v-if='mir.help_url' :href="mir.help_url"
|
||||
{% endraw %}{% endif %}
|
||||
><i aria-hidden="true" class="question-circle" title="Help">{% fa_svg fas.fa-circle-question %}</i><span class="visually-hidden">[Help]</span></a>
|
||||
{% if include.legacy %}{% raw %}
|
||||
{{/if}}
|
||||
{% endraw %}{% endif %}
|
||||
{% unless include.legacy %}{% raw %}
|
||||
<a v-if='mir.github_release' href="javascript:void(0)"><i aria-hidden="true" title="GitHub Release">{% endraw %}{% fa_svg fab.fa-github %}{% raw %}</i><span class="visually-hidden">[GitHub Release]</span></a>
|
||||
{% endraw %}{% endunless %}
|
||||
</td>
|
||||
<td class="col-4 col-lg-5 col-xl-4">
|
||||
{% if include.legacy %}{% raw %}
|
||||
{{last_update}}{{if show_status}}<span class="badge badge-status {{label}}">{{status}}</span>{{/if}}
|
||||
{% endraw %}{% else %}{% raw %}
|
||||
<UpdateField :mir="mir"></UpdateField>
|
||||
{% endraw %}{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% if include.legacy %}{% raw %}
|
||||
{{/mirs}}
|
||||
{% endraw %}{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% unless include.legacy %}
|
||||
<div v-else class="sk-wave">
|
||||
<div class="sk-rect sk-rect1"></div>
|
||||
<div class="sk-rect sk-rect2"></div>
|
||||
<div class="sk-rect sk-rect3"></div>
|
||||
<div class="sk-rect sk-rect4"></div>
|
||||
<div class="sk-rect sk-rect5"></div>
|
||||
</div>
|
||||
{% endunless %}
|
||||
<!--
|
||||
vim: ts=2 sts=2 sw=2 noexpandtab
|
||||
-->
|
||||
|
|
@ -1,51 +1,44 @@
|
|||
<div class="navbar navbar-expand-lg navbar-default mt-3" role="navigation">
|
||||
<div class="container-fluid container-xl">
|
||||
<div class="navbar navbar-default" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
{% unless page.legacy %}
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
{% endunless %}
|
||||
<a class="navbar-brand" href="/">
|
||||
<span class="thuhidden">
|
||||
{% if site.logo %}
|
||||
<picture>
|
||||
{% if site.issue %}
|
||||
<img
|
||||
{% else %}
|
||||
<source
|
||||
{% endif %}
|
||||
<source
|
||||
srcset="/static/img/logo-small-dark.png 1x,
|
||||
/static/img/logo-small-dark@2x.png 2x,
|
||||
/static/img/logo-small-dark@3x.png 3x,
|
||||
/static/img/logo-small-dark@4x.png 4x"
|
||||
{% if site.issue %}
|
||||
alt=""/>
|
||||
{% else %}
|
||||
media="(prefers-color-scheme: dark)"/>
|
||||
{% endif %}
|
||||
{% unless site.issue %}
|
||||
<img src="/static/img/logo-small.png"
|
||||
srcset="/static/img/logo-small.png 1x,
|
||||
/static/img/logo-small@2x.png 2x,
|
||||
/static/img/logo-small@3x.png 3x,
|
||||
/static/img/logo-small@4x.png 4x"
|
||||
<img src="/static/img/logo-small.png"
|
||||
srcset="/static/img/logo-small.png 1x,
|
||||
/static/img/logo-small@2x.png 2x,
|
||||
/static/img/logo-small@3x.png 3x,
|
||||
/static/img/logo-small@4x.png 4x"
|
||||
alt=""/>
|
||||
{% endunless %}
|
||||
</picture>
|
||||
{% endif %}
|
||||
{{ site.school }}</span>开源软件镜像站
|
||||
</a>
|
||||
</div>
|
||||
{% unless page.legacy %}
|
||||
<button type="button" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||
{% fa_svg fas.fa-bars %}
|
||||
</button>
|
||||
{% endunless %}
|
||||
<div class="{% unless page.legacy %}navbar-collapse collapse {% endunless %} justify-content-end" id="navbarNavDropdown">
|
||||
<div class="{% unless page.legacy %}navbar-collapse collapse {% endunless %}navbar-right">
|
||||
<ul class="nav navbar-nav" role="menubar">
|
||||
{% unless site.hide_navbar %}
|
||||
<li role="none" class="nav-item"><a role="menuitem" class="nav-link" href="{{ site.homelink }}">HOME</a></li>
|
||||
<li role="none" class="nav-item"><a role="menuitem" class="nav-link" href="https://tuna.moe/events/">EVENTS</a></li>
|
||||
<li role="none" class="nav-item"><a role="menuitem" class="nav-link" href="https://tuna.moe/blog/">BLOG</a></li>
|
||||
<li role="none" class="nav-item"><a role="menuitem" class="nav-link" href="https://tuna.moe/feed.xml">RSS</a></li>
|
||||
<li role="none" class="nav-item"><a role="menuitem" class="nav-link" href="https://podcast.tuna.moe/">PODCAST</a></li>
|
||||
<li role="none" class="nav-item"><a role="menuitem" class="nav-link active" aria-checked="true" href="{{ site.url }}">MIRRORS</a></li>
|
||||
<li role="none"><a role="menuitem" href="{{ site.homelink }}">HOME</a></li>
|
||||
<li role="none"><a role="menuitem" href="https://tuna.moe/events/">EVENTS</a></li>
|
||||
<li role="none"><a role="menuitem" href="https://tuna.moe/blog/">BLOG</a></li>
|
||||
<li role="none"><a role="menuitem" href="https://tuna.moe/feed.xml">RSS</a></li>
|
||||
<li role="none"><a role="menuitem" href="https://podcast.tuna.moe/">PODCAST</a></li>
|
||||
<li role="none" class="active"><a role="menuitem" aria-checked="true" href="{{ site.url }}">MIRRORS</a></li>
|
||||
{% endunless %}
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<div class="col-lg-6 col-12">
|
||||
<picture>
|
||||
<source
|
||||
<div class="col-md-6">
|
||||
<picture class="thumbnail">
|
||||
<source
|
||||
srcset="/static/status/{{include.name}}-day-dark.png 1x,
|
||||
/static/status/{{include.name}}-day-dark@2x.png 2x,
|
||||
/static/status/{{include.name}}-day-dark@3x.png 3x,
|
||||
/static/status/{{include.name}}-day-dark@4x.png 4x"
|
||||
media="(prefers-color-scheme: dark)" />
|
||||
<img class="img-thumbnail img-fluid w-100" src="/static/status/{{include.name}}-day.png"
|
||||
<img class="img-responsive" src="/static/status/{{include.name}}-day.png"
|
||||
srcset="/static/status/{{include.name}}-day.png 1x,
|
||||
/static/status/{{include.name}}-day@2x.png 2x,
|
||||
/static/status/{{include.name}}-day@3x.png 3x,
|
||||
|
|
|
|||
|
|
@ -1,66 +0,0 @@
|
|||
{% capture entry %}{% if page.layout and layout.jsEntry %}{{ layout.jsEntry }}{% elsif page.jsEntry %}{{ page.jsEntry }}{% else %}default{% endif %}{% endcapture %}
|
||||
{% vite_typescript_tag {{ entry }} %}
|
||||
<script nomodule>
|
||||
/*
|
||||
Workaround for Safari 10.1, which does not support the `nomodule` attribute.
|
||||
*/
|
||||
(function() {
|
||||
var check = document.createElement('script');
|
||||
if (!('noModule' in check) && 'onbeforeload' in check) {
|
||||
var support = false;
|
||||
document.addEventListener('beforeload', function(e) {
|
||||
if (e.target === check) {
|
||||
support = true;
|
||||
} else if (!e.target.hasAttribute('nomodule') || !support) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
}, true);
|
||||
|
||||
check.type = 'module';
|
||||
check.src = '.';
|
||||
document.head.appendChild(check);
|
||||
check.remove();
|
||||
}
|
||||
}());
|
||||
</script>
|
||||
<script src="{% vite_asset_path /vite/legacy-polyfills-legacy %}" crossorigin="anonymous" id="vite-legacy-polyfill" nomodule></script>
|
||||
{% capture legacyFile %}{% vite_asset_path {{ entry }}-legacy.ts %}{% endcapture %}
|
||||
<script nomodule defer>System.import({{ legacyFile | jsonify }});</script>
|
||||
<!--
|
||||
load moduleGuard.ts as a module, to detect whether the browser can correctly
|
||||
load the module.
|
||||
Sometimes if we are behind a proxy, the scripts may be wrapped in a function
|
||||
and the module may not be loaded correctly.
|
||||
In that case, we will load the legacy build.
|
||||
-->
|
||||
<script src="{% vite_asset_path moduleGuard.ts %}" crossorigin="anonymous" type="module"></script>
|
||||
<!--
|
||||
jekyll-minifier only minify scripts with type="application/javascript",
|
||||
here data-dummytype is added to trick jekyll-minifier to minify the script.
|
||||
-->
|
||||
<script data-dummytype="application/javascript" type="module">
|
||||
(function(){
|
||||
var loadLegacy = function() {
|
||||
var polyScript = document.getElementById("vite-legacy-polyfill");
|
||||
var newScript = document.createElement("script");
|
||||
newScript.src = polyScript.src;
|
||||
newScript.onload = function(){
|
||||
System.import({{ legacyFile | jsonify }});
|
||||
};
|
||||
document.body.appendChild(newScript);
|
||||
}
|
||||
try{
|
||||
new Function("m","return import(m)");
|
||||
document.addEventListener("DOMContentLoaded", function(){
|
||||
if(!document.documentElement.hasAttribute("data-module-loaded")){
|
||||
console.warn("vite: loading legacy build because esm module is not loaded");
|
||||
loadLegacy();
|
||||
}
|
||||
});
|
||||
}catch(e){
|
||||
console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");
|
||||
loadLegacy();
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -1,10 +1,6 @@
|
|||
---
|
||||
jsEntry: help
|
||||
---
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-Hans">
|
||||
{% capture metaDesc %}{{ page.mirrorid }} 使用帮助{% endcapture %}
|
||||
{% include head.html cattitle="镜像站使用帮助" metaDesc=metaDesc %}
|
||||
<html>
|
||||
{% include head.html cattitle="镜像站使用帮助" %}
|
||||
<body>
|
||||
{% include nav.html %}
|
||||
|
||||
|
|
@ -16,19 +12,23 @@ jsEntry: help
|
|||
</script>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
window.mirrorId = "{{page.mirrorid}}";
|
||||
</script>
|
||||
|
||||
{% assign help_pages = site.categories["help"] | sort: 'mirrorid' %}
|
||||
<div id="help-page">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="d-none d-md-block col-md-3">
|
||||
<ul class="nav nav-pills flex-column" id="help-nav">
|
||||
<div class="col-sm-2 hidden-xs">
|
||||
<ul class="nav nav-pills nav-stacked" id="help-nav">
|
||||
{% for h in help_pages %}
|
||||
<li class="nav-item" id="toc-{{h.mirrorid}}"><a href="{{h.url}}" class="nav-link{% if h.mirrorid == page.mirrorid or h.redirect_help_id == page.mirrorid %} active{%endif%}">{{h.mirrorid}}</a></li>
|
||||
<li{% if h.mirrorid == page.mirrorid or h.redirect_help_id == page.mirrorid %} class="active"{%endif%} id="toc-{{h.mirrorid}}"><a href="{{h.url}}">{{h.mirrorid}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div><!-- sidenave -->
|
||||
<div class="col-md-9">
|
||||
<div class="d-block d-md-none">
|
||||
<div class="col-sm-10">
|
||||
<div class="visible-xs">
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>选择帮助条目: </label>
|
||||
|
|
@ -50,9 +50,8 @@ jsEntry: help
|
|||
|
||||
{% include footer.html %}
|
||||
</body>
|
||||
<script type="text/x-tuna-help-mirrorid">
|
||||
{{page.mirrorid | jsonify}}
|
||||
</script>
|
||||
|
||||
<script src="/static/js/help.js"></script>
|
||||
|
||||
</html>
|
||||
<!--
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
layout: help
|
||||
jsEntry: helpz
|
||||
---
|
||||
{{ content }}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html {% if site.issue %}class="index-issue"{% endif %} lang="zh-Hans">
|
||||
{% include head.html notArticle=true %}
|
||||
<html>
|
||||
{% include head.html %}
|
||||
<body>
|
||||
{% unless page.legacy or site.issue %}
|
||||
{% unless page.legacy %}
|
||||
{% include legacy_notes.html %}
|
||||
{% endunless %}
|
||||
{% include nav.html %}
|
||||
|
|
@ -10,49 +10,86 @@
|
|||
<div class="spacing hidden-xs"></div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{% if site.issue %}
|
||||
<div class="col-{% if page.legacy %}xs{% else %}lg{% endif %}-12 table-responsive">
|
||||
<div class="alert text-center" id="cover-alert">
|
||||
<h1>{{ site.school }}开源软件镜像站</h1>
|
||||
<h3>暂时无法提供服务</h3>
|
||||
<div class="text-end">
|
||||
<img src="/static/img/candle.jpg"
|
||||
srcset="/static/img/candle.jpg 1x,
|
||||
/static/img/candle@2x.jpg 2x"
|
||||
/>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<p>{{ site.issue }}</p>
|
||||
{% if site.backtime %}
|
||||
<p>预计恢复时间: {{ site.backtime }}</p>
|
||||
{% endif %}
|
||||
<div class="col-{% if page.legacy %}xs{% else %}md{% endif %}-8 table-responsive" id="mirror-list">
|
||||
<div class="row">
|
||||
<h3 id="mirror-title"><span class="fa fa-cube"></span> 镜像列表 </h3>
|
||||
{% unless page.legacy %}
|
||||
<input type="search" v-model="filter" id="search" placeholder="搜索" autocomplete="off">
|
||||
{% endunless %}
|
||||
</div>
|
||||
<table class="table" v-if="mirrorList.length">
|
||||
<thead>
|
||||
<tr class="row">
|
||||
<th class="col-{% if page.legacy %}xs{% else %}sm{% endif %}-8">Name</th>
|
||||
<th class="col-{% if page.legacy %}xs{% else %}sm{% endif %}-4">Last Update</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if page.legacy %}
|
||||
{% raw %}
|
||||
{{mirs}}
|
||||
<tr class="row status-{{status}}">
|
||||
<td>
|
||||
<a class="mirror-item-label" href="{{url}}" title="{{description}}">
|
||||
{{name}}
|
||||
</a>
|
||||
{{if is_new}}
|
||||
<span class="label label-new">new</span>
|
||||
{{/if}}
|
||||
{{if help_url}}
|
||||
<a href="{{help_url}}"><i aria-hidden="true" class="fa fa-question-circle" title="Help"></i><span class="sr-only">[Help]</span></a>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
{{last_update}}{{if show_status}}<span class="label label-status {{label}}">{{status}}</span>{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/mirs}}
|
||||
{% endraw %}
|
||||
{% else %}
|
||||
{% raw %}
|
||||
<tr v-for="mir in filteredMirrorList" :class="['row', 'status-'+mir.status]" :key="mir.name">
|
||||
<td class="col-md-8">
|
||||
<a class="mirror-item-label" data-toggle="popover" data-trigger="hover" data-placement="right"
|
||||
:data-content="mir.description" :href="getURL(mir)" :aria-label="mir.name + ', ' + mir.description">
|
||||
{{mir.name}}
|
||||
<span class="label label-new" v-if='mir.is_new'>new</span>
|
||||
<a v-if='mir.help_url' :href="mir.help_url"><i aria-hidden="true" class="fa fa-question-circle" title="Help"></i><span class="sr-only">[Help]</span></a>
|
||||
</a>
|
||||
</td>
|
||||
<td class="col-md-4">
|
||||
{{mir.last_update}}<span v-if="mir.show_status" :class="['label', 'label-status', mir.label, 'hidden-xs']">{{mir.status}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endraw %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% unless page.legacy %}
|
||||
<div v-else class="sk-wave">
|
||||
<div class="sk-rect sk-rect1"></div>
|
||||
<div class="sk-rect sk-rect2"></div>
|
||||
<div class="sk-rect sk-rect3"></div>
|
||||
<div class="sk-rect sk-rect4"></div>
|
||||
<div class="sk-rect sk-rect5"></div>
|
||||
</div>
|
||||
{% endunless %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{% else %}
|
||||
<div id="mirror-list" class="col-lg-8 {% if include.legacy %}col-8{% else %}col-12{% endif %} table-responsive">
|
||||
{% if page.legacy %}
|
||||
{% include main-mirror-list.html legacy=true %}
|
||||
{% endif %}
|
||||
<!--{% fa_svg fas.fa-cube %}{% fa_svg fas.fa-circle-question %}{% fa_svg fab.fa-github %}-->
|
||||
</div>
|
||||
{% endif %}
|
||||
{% unless site.issue %}
|
||||
<div class="col-lg-4 {% if page.legacy %}col-4{% else %}col-12{% endif %}">
|
||||
<div class="spacing d-none d-lg-block"></div>
|
||||
{% endunless %}
|
||||
<div id="news" {%if site.issue%}class="col-lg-3"{%endif%}>
|
||||
<h4>{% fa_svg fas.fa-bullhorn %} 新闻公告 </h4>
|
||||
<div class="col-{% if page.legacy %}xs{% else %}md{% endif %}-4">
|
||||
<div class="spacing hidden-xs"></div>
|
||||
<div id="wizard">
|
||||
</div>
|
||||
<div id="news">
|
||||
<h4><span class="fa fa-bullhorn"></span> 新闻公告 </h4>
|
||||
<ul>
|
||||
{% for news in site.categories.news limit: 3%}
|
||||
<li><a href="/news/#{{news.slug}}"><strong>{{news.date | date: "%Y-%m-%d"}}</strong> {{news.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="text-end"><a href="/news/"> more {% fa_svg fas.fa-angles-right %} </a></div>
|
||||
<div class="text-right"><a href="/news/"> more <span class="fa fa-angle-double-right"></span> </a></div>
|
||||
</div>
|
||||
<div class="thuhidden {%if site.issue%}col-lg-4{%endif%}">
|
||||
<h4> {% fa_svg fas.fa-link %} 域名选择 </h4>
|
||||
<div class="thuhidden">
|
||||
<h4> <span class="fa fa-link"></span> 域名选择 </h4>
|
||||
<ul>
|
||||
<li><a href="{{ site.url }}">{{ site.url }}</a> 自动选择 </li>
|
||||
{% if site.urlv6 %}
|
||||
|
|
@ -63,60 +100,90 @@
|
|||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% unless page.legacy or site.hide_download or site.issue %}
|
||||
{% unless page.legacy or site.hide_download %}
|
||||
<div id="download-link">
|
||||
<h4>{% fa_svg far.fa-file-zipper %} 下载链接 </h4>
|
||||
<p>常用发行版 ISO 和应用软件安装包直接下载:</p>
|
||||
<div class="justify-content-center d-flex flex-row flex-grow-1 w-100">
|
||||
<button type="button" class="btn btn-info" data-bs-toggle="modal" data-bs-target="#isoModal">
|
||||
获取下载链接
|
||||
</button>
|
||||
</div>
|
||||
<h4><span class="fa fa-file-archive-o"></span> 下载链接 </h4>
|
||||
<p>常用发行版 iso 和应用工具安装包直接下载</p>
|
||||
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#isoModal">
|
||||
获取下载链接
|
||||
</button>
|
||||
</div>
|
||||
{% endunless %}
|
||||
<div class="thuhidden {%if site.issue%}col-lg-3{%endif%}">
|
||||
<h4> {% fa_svg far.fa-envelope %} 联系我们 </h4>
|
||||
<div class="thuhidden">
|
||||
<h4> <span class="fa fa-envelope-o"></span> 联系我们 </h4>
|
||||
<ul>
|
||||
<li><strong>意见反馈</strong> <br /> <a href="https://github.com/tuna/issues">https://github.com/tuna/issues</a></li>
|
||||
<li><strong>发送邮件</strong> <br /> <a class="eib1gieB"></a></li>
|
||||
<li><strong>在线交流</strong> <br /> <a href="https://web.libera.chat/#tuna"> #tuna at Libera.Chat </a></li>
|
||||
<li><strong>发送邮件</strong> <br /> <a id="eib1gieB"></a></li>
|
||||
<li><strong>在线交流</strong> <br /> <a href="https://fishroom.tuna.moe/log/tuna/today"> #tuna at freenode </a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div {%if site.issue%}class="col-lg-2"{%endif%}>
|
||||
<h4> {% fa_svg fas.fa-arrow-up-right-from-square %} 相关链接 </h4>
|
||||
<div>
|
||||
<h4> <span class="fa fa-external-link"></span> 相关链接 </h4>
|
||||
<ul>
|
||||
<li><a href="/help/">使用帮助</a></li>
|
||||
{% unless site.issue %}
|
||||
<li><a href="/status/#server-status">服务器状态</a></li>
|
||||
<li><a href="/status/#syncing-status">同步状态</a></li>
|
||||
{% endunless %}
|
||||
<li class="thuhidden"><a href="https://tuna.moe/">清华大学 TUNA 协会</a></li>
|
||||
<li><a href="https://github.com/tuna/tunasync">镜像管理器源码</a></li>
|
||||
<li><a href="https://github.com/tuna/tunasync-scripts">自定义镜像脚本</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% unless site.hide_mirrorz %}
|
||||
<div class="thuhidden {%if site.issue%}col-lg-2{%endif%}">
|
||||
<h4> {% fa_svg fas.fa-paperclip %} 友情链接 </h4>
|
||||
<ul>
|
||||
<li><a href="{{ site.mirrorz_link }}">{{ site.mirrorz_desc }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endunless %}
|
||||
{% unless site.issue %}
|
||||
</div>
|
||||
{% endunless %}
|
||||
</div>
|
||||
</div><!--/container -->
|
||||
</div><!--/mirrors -->
|
||||
{% include footer.html %}
|
||||
{% unless page.legacy or site.issue %}
|
||||
{% unless page.legacy %}
|
||||
<!-- iso download wizard modal -->
|
||||
<!-- Modal -->
|
||||
{% raw %}
|
||||
<div class="modal fade" id="isoModal" tabindex="-1" role="dialog" aria-labelledby="isoModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="isoModalLabel">获取安装镜像</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" :class="[curCategory === 'os' ? 'active' : '']" @click="switchCategory('os')"><a href="#">操作系统</a></li>
|
||||
<li role="presentation" :class="[curCategory === 'app' ? 'active' : '']" @click="switchCategory('app')"><a href="#">应用软件</a></li>
|
||||
<li role="presentation" :class="[curCategory === 'font' ? 'active' : '']" @click="switchCategory('font')"><a href="#">字体</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li v-for="distro in curDistroList" :class="[selected.distro == distro.distro ? 'active' : '']">
|
||||
<a href="#" @click="switchDistro(distro)">{{ distro.distro }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<h3>{{selected.distro}}</h3>
|
||||
<ul>
|
||||
<template v-for="url in selected.urls">
|
||||
<li><a :href="url.url">{{url.name}}</a></li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /iso download wizard modal -->
|
||||
{% endraw %}
|
||||
{% endunless %}
|
||||
</body>
|
||||
{% raw %}
|
||||
{% endraw %}
|
||||
{% unless page.legacy %}
|
||||
<script src="/static/js/index.js"></script>
|
||||
<script src="/static/js/browser-update.js"></script>
|
||||
{% endunless %}
|
||||
</html>
|
||||
<!--
|
||||
vim: ts=2 sts=2 sw=2 noexpandtab
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-Hans">
|
||||
{% capture metaDesc %}{{ page.title }}{% endcapture %}
|
||||
{% include head.html cattitle="镜像站新闻" metaDesc=metaDesc %}
|
||||
<html>
|
||||
{% include head.html cattitle="镜像站新闻"%}
|
||||
<body>
|
||||
{% include nav.html %}
|
||||
|
||||
|
|
@ -17,8 +16,8 @@
|
|||
<div class="head">
|
||||
<h3># {{page.title}}</h3>
|
||||
</div>
|
||||
<div class="text-secondary mb-2">
|
||||
{% fa_svg fas.fa-calendar %} {{page.date | date: "%Y-%m-%d"}} <span style="margin-left: 1em"> {% fa_svg fas.fa-user %} {{ page.author }}</span>
|
||||
<div class="meta">
|
||||
<span class="fa fa-calendar"></span> {{page.date | date: "%Y-%m-%d"}} <span class="fa fa-user" style="margin-left: 1em"> {{ page.author }}</span>
|
||||
</div>
|
||||
<div class="content">{{page.content | markdownify }}</div>
|
||||
</article>
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
diff --git a/node_modules/@webcomponents/template/template.js b/node_modules/@webcomponents/template/template.js
|
||||
index cebfac4..a2e534c 100644
|
||||
--- a/node_modules/@webcomponents/template/template.js
|
||||
+++ b/node_modules/@webcomponents/template/template.js
|
||||
@@ -41,7 +41,7 @@
|
||||
HTMLElement.prototype.querySelectorAll;
|
||||
DocumentFragment.prototype.querySelector =
|
||||
HTMLElement.prototype.querySelector;
|
||||
-
|
||||
+ try{
|
||||
Object.defineProperties(DocumentFragment.prototype, {
|
||||
'nodeType': {
|
||||
get: function () {
|
||||
@@ -64,6 +64,11 @@
|
||||
configurable: true,
|
||||
},
|
||||
});
|
||||
+ }catch(e){
|
||||
+ DocumentFragment.prototype.nodeType = Node.DOCUMENT_FRAGMENT_NODE;
|
||||
+ DocumentFragment.prototype.localName = undefined;
|
||||
+ DocumentFragment.prototype.nodeName = '#document-fragment';
|
||||
+ }
|
||||
|
||||
var origInsertBefore = Node.prototype.insertBefore;
|
||||
function insertBefore(newNode, refNode) {
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
diff --git a/node_modules/events-polyfill/src/ListenerOptions.js b/node_modules/events-polyfill/src/ListenerOptions.js
|
||||
index 7f61598..b775992 100644
|
||||
--- a/node_modules/events-polyfill/src/ListenerOptions.js
|
||||
+++ b/node_modules/events-polyfill/src/ListenerOptions.js
|
||||
@@ -15,20 +15,28 @@
|
||||
some: false
|
||||
};
|
||||
|
||||
- document.createDocumentFragment().addEventListener('test', function() {}, {
|
||||
- get once() {
|
||||
- _this.supportedOptions.once = true;
|
||||
- return false;
|
||||
- },
|
||||
- get passive() {
|
||||
- _this.supportedOptions.passive = true;
|
||||
- return false;
|
||||
- },
|
||||
- get capture() {
|
||||
- _this.supportedOptions.capture = true;
|
||||
- return false;
|
||||
- }
|
||||
- });
|
||||
+ try {
|
||||
+ var options = {};
|
||||
+ Object.defineProperty(options, 'once', {
|
||||
+ get: function() {
|
||||
+ _this.supportedOptions.once = true;
|
||||
+ return false;
|
||||
+ }
|
||||
+ });
|
||||
+ Object.defineProperty(options, 'passive', {
|
||||
+ get: function() {
|
||||
+ _this.supportedOptions.passive = true;
|
||||
+ return false;
|
||||
+ }
|
||||
+ });
|
||||
+ Object.defineProperty(options, 'capture', {
|
||||
+ get: function() {
|
||||
+ _this.supportedOptions.capture = true;
|
||||
+ return false;
|
||||
+ }
|
||||
+ });
|
||||
+ document.createDocumentFragment().addEventListener('test', function() {}, options);
|
||||
+ }catch(e) {}
|
||||
|
||||
// useful shortcuts to detect if options are all/some supported
|
||||
this.supportedOptions.all = this.supportedOptions.once && this.supportedOptions.passive && this.supportedOptions.capture;
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
Jekyll::Hooks.register(:site, :after_init) do |site|
|
||||
site.config['exclude'].push(*(site.config['addition_exclude'] || []))
|
||||
end
|
||||
|
|
@ -1,279 +0,0 @@
|
|||
require 'vite_ruby'
|
||||
require "jekyll/filters"
|
||||
require "ostruct"
|
||||
require 'tempfile'
|
||||
|
||||
module Jekyll::Vite
|
||||
end
|
||||
|
||||
class Jekyll::Vite::Generator < Jekyll::Generator
|
||||
safe true
|
||||
priority :highest
|
||||
|
||||
class ViteAssetFile < Jekyll::StaticFile
|
||||
# Override (4.2): Copy to the configured public_output_dir
|
||||
if method_defined?(:cleaned_relative_path)
|
||||
def cleaned_relative_path
|
||||
replace_build_path(super)
|
||||
end
|
||||
end
|
||||
|
||||
# Override: Copy to the configured public_output_dir
|
||||
def destination_rel_dir
|
||||
replace_build_path(super)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def replace_build_path(src)
|
||||
src.sub(
|
||||
@site.vite_ruby_instance.config.build_output_dir.relative_path_from(@site.source).to_s,
|
||||
@site.vite_ruby_instance.config.public_output_dir,
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
# Internal: Set the mode based on which command was run.
|
||||
# Builds assets with Vite only if `jekyll build` was run.
|
||||
def generate(site)
|
||||
cache_dir = site.config['cache_dir'] || '.jekyll-cache'
|
||||
vr = ViteRuby.new(
|
||||
mode: Jekyll.env,
|
||||
public_dir: File.join(cache_dir, 'vite-dist'),
|
||||
build_cache_dir: File.join(cache_dir, 'vite-build'),
|
||||
**(site.config['vite'].transform_keys(&:to_sym) || {})
|
||||
)
|
||||
site.reader.read_data
|
||||
exports = [
|
||||
{ :name => 'site_config', :data => site.config },
|
||||
{ :name => 'site_data', :data => site.data },
|
||||
{ :name => 'site_categories', :data => site.categories },
|
||||
]
|
||||
exports.each do |export|
|
||||
file = Tempfile.new()
|
||||
file.unlink
|
||||
file.write(Jekyll_Filters.new.jsonify(export[:data]))
|
||||
file.flush
|
||||
file.rewind
|
||||
file.close_on_exec = false
|
||||
vr.env[export[:name]] = "#{file.fileno}"
|
||||
export[:file] = file
|
||||
end
|
||||
vr.logger = Jekyll.logger
|
||||
|
||||
class << site
|
||||
def vite_ruby_instance
|
||||
@__vite_ruby_instance
|
||||
end
|
||||
def vite_ruby_instance=(vr)
|
||||
@__vite_ruby_instance = vr
|
||||
end
|
||||
end
|
||||
site.vite_ruby_instance = vr
|
||||
if Jekyll.env == 'production'
|
||||
vr.commands.clobber
|
||||
end
|
||||
generate_vite_build(site)
|
||||
exports.each do |export|
|
||||
export[:file].close
|
||||
end
|
||||
end
|
||||
|
||||
class Jekyll_Filters
|
||||
include Jekyll::Filters
|
||||
end
|
||||
|
||||
# Internal: Build all assets with Vite and add them to the site's static files.
|
||||
def generate_vite_build(site)
|
||||
args = []
|
||||
viteConfig = site.config['vite']&.fetch('viteConfig', "")
|
||||
if viteConfig != ""
|
||||
args += ["--config", viteConfig]
|
||||
end
|
||||
site.vite_ruby_instance.commands.build(*args) || raise("Vite build failed")
|
||||
add_static_files(site, site.vite_ruby_instance.config.build_output_dir)
|
||||
end
|
||||
|
||||
# Internal: Add generated assets to the site's static files.
|
||||
def add_static_files(site, assets_dir)
|
||||
relative_assets_dir = assets_dir.relative_path_from(site.source).to_s
|
||||
vite_static_files = Dir.chdir(assets_dir.to_s) {
|
||||
Dir.glob('**/*').select { |f| File.file?(f) }
|
||||
}.map { |file|
|
||||
ViteAssetFile.new(site, site.source, relative_assets_dir, file)
|
||||
}
|
||||
site.static_files.concat(vite_static_files)
|
||||
end
|
||||
end
|
||||
|
||||
class Jekyll::Vite::Tag < Jekyll::Tags::IncludeTag
|
||||
include Jekyll::Filters::URLFilters
|
||||
|
||||
# Override: Set the context to make the site available in the URLFilters.
|
||||
def render(context)
|
||||
@context = context
|
||||
params = @params.is_a?(String) ? parse_params(context).transform_keys(&:to_sym) : @params || {}
|
||||
if file = render_variable(@file)
|
||||
validate_file_name(file)
|
||||
track_file_dependency(file)
|
||||
end
|
||||
block_given? ? yield(file, params) : raise(NotImplementedError, "Implement render in #{ self.class.name }")
|
||||
end
|
||||
|
||||
# Override: Modified version that can resolve recursive references.
|
||||
def render_variable(variable)
|
||||
variable = Liquid::Template.parse(variable).render!(@context) while VARIABLE_SYNTAX =~ variable
|
||||
variable
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
# Internal: Resolves the path for the specified Vite asset.
|
||||
def vite_asset_path(name, **options)
|
||||
vite_manifest.path_for(name, **options)
|
||||
end
|
||||
|
||||
# Internal: Returns the current manifest loaded by Vite Ruby.
|
||||
def vite_manifest
|
||||
vite_ruby_instance.manifest
|
||||
end
|
||||
|
||||
def site
|
||||
@context.registers[:site]
|
||||
end
|
||||
|
||||
def vite_ruby_instance
|
||||
site.vite_ruby_instance
|
||||
end
|
||||
|
||||
# Internal: Renders HTML attributes inside a tag.
|
||||
def stringify_attrs(**attrs)
|
||||
attrs.map { |key, value| %(#{ key }#{ value && value != "" ? %(="#{value}") : "" }) }.join(' ')
|
||||
end
|
||||
|
||||
# Internal: Renders an HTML tag of the specified type.
|
||||
def tag(type, **attrs)
|
||||
self_closing = type != :script
|
||||
%i[href src].each { |key| attrs[key] = relative_url(attrs[key]) if attrs.key?(key) }
|
||||
["<#{ type } ", stringify_attrs(**attrs), self_closing ? '/>' : "></#{ type }>"].join
|
||||
end
|
||||
|
||||
# Internal: Renders HTML link tags.
|
||||
def link_tags(sources, **attrs)
|
||||
sources.map { |href| tag(:link, href: href, **attrs) }.join("\n")
|
||||
end
|
||||
|
||||
# Internal: Renders HTML script tags.
|
||||
def script_tags(sources, **attrs)
|
||||
sources.map { |src| tag(:script, src: src, **attrs) }.join("\n")
|
||||
end
|
||||
|
||||
# Internal: Adds entrypoint files managed by Vite as a dependency in the
|
||||
# renegerator in order to support --incremental mode.
|
||||
def track_file_dependency(name)
|
||||
path = site.in_source_dir(File.join(vite_ruby_instance.config.source_code_dir, vite_ruby_instance.config.entrypoints_dir, name))
|
||||
|
||||
['', '.css', '.js', '.ts'].each do |ext|
|
||||
if File.file?(asset_path = "#{ path }#{ ext }")
|
||||
return [asset_path, last_build_metadata_path].each do |filename|
|
||||
add_include_to_dependency(site, filename.to_s, @context)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Internal: Adding the last build metadata file as a dependency ensures
|
||||
# all pages using Vite assets are regenerated if a Vite build is triggered.
|
||||
def last_build_metadata_path
|
||||
vite_ruby_instance.builder.send(:last_build_path, ssr: false)
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Renders a path to a Vite asset.
|
||||
class Jekyll::Vite::AssetPathTag < Jekyll::Vite::Tag
|
||||
def render(context)
|
||||
super { |file, params| vite_asset_path(file, **params) }
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Renders the @vite/client script tag.
|
||||
class Jekyll::Vite::ClientTag < Jekyll::Vite::Tag
|
||||
def render(context)
|
||||
@context = context
|
||||
return unless src = vite_manifest.vite_client_src
|
||||
|
||||
super {
|
||||
tag :script, src: src, type: 'module'
|
||||
}
|
||||
end
|
||||
|
||||
def syntax_example
|
||||
"{% #{ @tag_name } %}"
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Renders a script tag to enable HMR with React Refresh.
|
||||
class Jekyll::Vite::ReactRefreshTag < Jekyll::Vite::Tag
|
||||
def render(_context)
|
||||
vite_manifest.react_refresh_preamble&.html_safe
|
||||
end
|
||||
|
||||
def syntax_example
|
||||
"{% #{ @tag_name } %}"
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Renders a <link> tag for the specified stylesheet.
|
||||
class Jekyll::Vite::StylesheetTag < Jekyll::Vite::Tag
|
||||
def render(context)
|
||||
super { |file, params|
|
||||
tag :link, **{
|
||||
rel: 'stylesheet',
|
||||
href: vite_asset_path(@file, type: :stylesheet),
|
||||
media: 'screen',
|
||||
}.merge(params)
|
||||
}
|
||||
end
|
||||
|
||||
def syntax_example
|
||||
"{% #{ @tag_name } application.scss media='screen, projection' %}"
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Renders a <script> tag for the specified file.
|
||||
class Jekyll::Vite::JavascriptTag < Jekyll::Vite::Tag
|
||||
def render(context)
|
||||
super { |file, params|
|
||||
media = params.delete(:media) || 'screen'
|
||||
crossorigin = params.delete(:crossorigin) || 'anonymous'
|
||||
type = params.delete(:type) || 'module'
|
||||
asset_type = @tag_name == 'vite_typescript_tag' ? :typescript : :javascript
|
||||
|
||||
entries = vite_manifest.resolve_entries(file, type: asset_type)
|
||||
|
||||
[
|
||||
script_tags(entries.fetch(:scripts), crossorigin: crossorigin, type: type, **params),
|
||||
link_tags(entries.fetch(:imports), rel: 'modulepreload', as: 'script', crossorigin: crossorigin, **params),
|
||||
link_tags(entries.fetch(:stylesheets), rel: 'stylesheet', media: media, crossorigin: crossorigin, **params),
|
||||
].join("\n")
|
||||
}
|
||||
end
|
||||
|
||||
def syntax_example
|
||||
"{% #{ @tag_name } application %}"
|
||||
end
|
||||
end
|
||||
|
||||
# Recreating tag helpers in Jekyll requires considerably more code than in web
|
||||
# frameworks, since Liquid does not provide HTML helpers and parsing parameters
|
||||
# is more complex than a Ruby method invocation.
|
||||
{
|
||||
'vite_asset_path' => Jekyll::Vite::AssetPathTag,
|
||||
'vite_client_tag' => Jekyll::Vite::ClientTag,
|
||||
'vite_javascript_tag' => Jekyll::Vite::JavascriptTag,
|
||||
'vite_typescript_tag' => Jekyll::Vite::JavascriptTag,
|
||||
'vite_stylesheet_tag' => Jekyll::Vite::StylesheetTag,
|
||||
'vite_react_refresh_tag' => Jekyll::Vite::ReactRefreshTag,
|
||||
}.each do |name, tag|
|
||||
Liquid::Template.register_tag(name, tag)
|
||||
end
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
mirrorid: AUR
|
||||
category: help
|
||||
layout: help
|
||||
---
|
||||
|
||||
# AUR 镜像使用帮助
|
||||
|
||||
## yaourt 用户
|
||||
|
||||
修改 `/etc/yaourtrc`,去掉 `# AURURL` 的注释,修改为
|
||||
|
||||
```
|
||||
AURURL="https://{{ site.aur }}"
|
||||
```
|
||||
|
||||
## yay 用户
|
||||
|
||||
执行以下命令修改 aururl :
|
||||
|
||||
```
|
||||
yay --aururl "https://{{ site.aur }}" --save
|
||||
```
|
||||
|
||||
修改的配置文件位于 `~/.config/yay/config.json` ,还可通过以下命令查看修改过的配置:
|
||||
|
||||
```
|
||||
yay -P -g
|
||||
```
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
layout: help
|
||||
category: help
|
||||
mirrorid: CocoaPods
|
||||
---
|
||||
|
||||
## CocoaPods 镜像使用帮助
|
||||
|
||||
CocoaPods 是一个 Cocoa 和 Cocoa Touch 框架的依赖管理器,具体原理和 Homebrew 有点类似,都是从 GitHub 下载索引,然后根据索引下载依赖的源代码。
|
||||
|
||||
对于旧版的 CocoaPods 可以使用如下方法使用 tuna 的镜像:
|
||||
|
||||
```
|
||||
$ pod repo remove master
|
||||
$ pod repo add master https://{{ site.hostname }}/git/CocoaPods/Specs.git
|
||||
$ pod repo update
|
||||
```
|
||||
|
||||
新版的 CocoaPods 不允许用`pod repo add`直接添加master库了,但是依然可以:
|
||||
|
||||
```
|
||||
$ cd ~/.cocoapods/repos
|
||||
$ pod repo remove master
|
||||
$ git clone https://{{ site.hostname }}/git/CocoaPods/Specs.git master
|
||||
```
|
||||
|
||||
最后进入自己的工程,在自己工程的`podFile`第一行加上:
|
||||
|
||||
```
|
||||
source 'https://{{ site.hostname }}/git/CocoaPods/Specs.git'
|
||||
```
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: AdoptOpenJDK
|
||||
---
|
||||
|
||||
## AdoptOpenJDK 镜像使用帮助
|
||||
|
||||
### Windows/macOS 用户
|
||||
|
||||
打开[下载页面](https://{{ site.hostname }}/AdoptOpenJDK/),选择所需的版本,下载独立安装包。
|
||||
|
||||
### Debian/Ubuntu 用户
|
||||
|
||||
首先信任 GPG 公钥:
|
||||
|
||||
```
|
||||
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
|
||||
```
|
||||
|
||||
再选择你的 Debian/Ubuntu 版本,文本框中内容写进 `/etc/apt/sources.list.d/AdoptOpenJDK.list`
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian/Ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="jessie">Debian 8 (Jessie)</option>
|
||||
<option data-os="debian" data-release="stretch">Debian 9 (Stretch)</option>
|
||||
<option data-os="debian" data-release="buster" selected>Debian 10 (Buster)</option>
|
||||
<option data-os="ubuntu" data-release="xenial">Ubuntu 16.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="bionic">Ubuntu 18.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="focal">Ubuntu 20.04 LTS</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
再执行
|
||||
|
||||
```
|
||||
sudo apt-get update
|
||||
```
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb {{if os_name|equals>ubuntu}}https{{else}}http{{/if}}://{%endraw%}{{ site.hostname }}{%raw%}/AdoptOpenJDK/deb {{release_name}} main
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
### CentOS/RHEL
|
||||
|
||||
新建 `/etc/yum.repos.d/AdoptOpenJDK.repo`,内容为
|
||||
|
||||
```
|
||||
[AdoptOpenJDK]
|
||||
name=AdoptOpenJDK
|
||||
baseurl=https://{{ site.hostname }}/AdoptOpenJDK/rpm/centos$releasever-$basearch/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public
|
||||
```
|
||||
|
||||
再执行
|
||||
|
||||
```
|
||||
sudo yum makecache
|
||||
```
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
layout: help
|
||||
category: help
|
||||
mirrorid: anaconda
|
||||
---
|
||||
|
||||
## Anaconda 镜像使用帮助
|
||||
|
||||
Anaconda 是一个用于科学计算的 Python 发行版,支持 Linux, Mac, Windows, 包含了众多流行的科学计算、数据分析的 Python 包。
|
||||
|
||||
Anaconda 安装包可以到 <{{ site.url }}/anaconda/archive/> 下载。
|
||||
|
||||
TUNA 还提供了 Anaconda 仓库与第三方源(conda-forge、msys2、pytorch等,[查看完整列表]({{ site.url }}/anaconda/cloud/))的镜像,各系统都可以通过修改用户目录下的 `.condarc` 文件。Windows 用户无法直接创建名为 `.condarc` 的文件,可先执行 `conda config --set show_channel_urls yes` 生成该文件之后再修改。
|
||||
|
||||
注:由于更新过快难以同步,我们不同步`pytorch-nightly`, `pytorch-nightly-cpu`, `ignite-nightly`这三个包。
|
||||
|
||||
```
|
||||
channels:
|
||||
- defaults
|
||||
show_channel_urls: true
|
||||
channel_alias: {{ site.url }}/anaconda
|
||||
default_channels:
|
||||
- {{ site.url }}/anaconda/pkgs/main
|
||||
- {{ site.url }}/anaconda/pkgs/free
|
||||
- {{ site.url }}/anaconda/pkgs/r
|
||||
- {{ site.url }}/anaconda/pkgs/pro
|
||||
- {{ site.url }}/anaconda/pkgs/msys2
|
||||
custom_channels:
|
||||
conda-forge: {{ site.url }}/anaconda/cloud
|
||||
msys2: {{ site.url }}/anaconda/cloud
|
||||
bioconda: {{ site.url }}/anaconda/cloud
|
||||
menpo: {{ site.url }}/anaconda/cloud
|
||||
pytorch: {{ site.url }}/anaconda/cloud
|
||||
simpleitk: {{ site.url }}/anaconda/cloud
|
||||
```
|
||||
|
||||
即可添加 Anaconda Python 免费仓库。
|
||||
|
||||
运行 `conda clean -i` 清除索引缓存,保证用的是镜像站提供的索引。
|
||||
|
||||
运行 `conda create -n myenv numpy` 测试一下吧。
|
||||
|
||||
## Miniconda 镜像使用帮助
|
||||
|
||||
Miniconda 是一个 Anaconda 的轻量级替代,默认只包含了 python 和 conda,但是可以通过 pip 和 conda 来安装所需要的包。
|
||||
|
||||
Miniconda 安装包可以到 <{{ site.url }}/anaconda/miniconda/> 下载。
|
||||
|
||||
### 其他三方源
|
||||
|
||||
对于conda的其他三方源,如有需要请修改[anaconda.py](https://github.com/tuna/tunasync-scripts/blob/master/anaconda.py)文件,并提交pull request,我们会综合考虑多方因素来酌情增减。
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
---
|
||||
layout: help
|
||||
category: help
|
||||
mirrorid: AOSP
|
||||
permalink: /help/AOSP/
|
||||
---
|
||||
|
||||
## Android 镜像使用帮助
|
||||
|
||||
**注意: 本镜像是 AOSP 镜像,Android SDK因版权原因,我们不能提供镜像服务。**
|
||||
|
||||
参考 Google 教程 <https://source.android.com/setup/build/downloading>,
|
||||
将 `https://android.googlesource.com/` 全部使用 `https://{{ site.hostname }}/git/AOSP/` 代替即可。
|
||||
|
||||
由于使用 HTTPS 协议更安全,并且更便于我们灵活处理,所以强烈推荐使用 HTTPS 协议同步 AOSP 镜像。
|
||||
|
||||
**由于 AOSP 镜像造成CPU/内存负载过重,我们限制了并发数量,因此建议:**
|
||||
1. sync的时候并发数不宜太高,否则会出现 503 错误,即`-j`后面的数字不能太大,建议选择4。
|
||||
2. 请尽量选择流量较小时错峰同步。
|
||||
|
||||
## 过程摘录
|
||||
|
||||
(参考 <https://lug.ustc.edu.cn/wiki/mirrors/help/aosp> 编写)
|
||||
|
||||
下载 repo 工具:
|
||||
|
||||
```bash
|
||||
mkdir ~/bin
|
||||
PATH=~/bin:$PATH
|
||||
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
|
||||
chmod a+x ~/bin/repo
|
||||
```
|
||||
|
||||
或者使用tuna的[git-repo镜像]({{ site.url }}/help/git-repo/)
|
||||
|
||||
#### 使用每月更新的初始化包
|
||||
|
||||
由于首次同步需要下载约 30GB 数据,过程中任何网络故障都可能造成同步失败,我们强烈建议您使用初始化包进行初始化。
|
||||
|
||||
下载 <{{ site.url }}/aosp-monthly/aosp-latest.tar>,下载完成后记得根据 checksum.txt 的内容校验一下。
|
||||
|
||||
由于所有代码都是从隐藏的 `.repo` 目录中 checkout 出来的,所以我们只保留了 `.repo` 目录,下载后解压
|
||||
再 `repo sync` 一遍即可得到完整的目录。
|
||||
|
||||
使用方法如下:
|
||||
|
||||
```bash
|
||||
wget -c {{ site.url }}/aosp-monthly/aosp-latest.tar # 下载初始化包
|
||||
tar xf aosp-latest.tar
|
||||
cd AOSP # 解压得到的 AOSP 工程目录
|
||||
# 这时 ls 的话什么也看不到,因为只有一个隐藏的 .repo 目录
|
||||
repo sync # 正常同步一遍即可得到完整目录
|
||||
# 或 repo sync -l 仅checkout代码
|
||||
```
|
||||
|
||||
此后,每次只需运行 `repo sync` 即可保持同步。
|
||||
**我们强烈建议您保持每天同步,并尽量选择凌晨等低峰时间**
|
||||
|
||||
|
||||
#### 传统初始化方法
|
||||
|
||||
建立工作目录:
|
||||
|
||||
```
|
||||
mkdir WORKING_DIRECTORY
|
||||
cd WORKING_DIRECTORY
|
||||
```
|
||||
|
||||
初始化仓库:
|
||||
|
||||
```
|
||||
repo init -u https://{{ site.hostname }}/git/AOSP/platform/manifest
|
||||
```
|
||||
|
||||
**如果提示无法连接到 gerrit.googlesource.com,请参照[git-repo的帮助页面](/help/git-repo)的更新一节。**
|
||||
|
||||
如果需要某个特定的 Android 版本([列表](https://source.android.com/setup/start/build-numbers#source-code-tags-and-builds)):
|
||||
|
||||
```
|
||||
repo init -u https://{{ site.hostname }}/git/AOSP/platform/manifest -b android-4.0.1_r1
|
||||
```
|
||||
|
||||
同步源码树(以后只需执行这条命令来同步):
|
||||
|
||||
```
|
||||
repo sync
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 建立次级镜像
|
||||
|
||||
由于 AOSP 镜像需求量巨大,且 Git 服务占资源较多,TUNA 服务器因 AOSP 产生的负载已经占主要部分。
|
||||
如果你是团队用户,我们强烈建议你通过 TUNA 建立次级镜像,再分享给团队内其他用户,减轻 TUNA 服务器压力。
|
||||
建立 AOSP 镜像需要占用约 164G 磁盘。
|
||||
|
||||
具体步骤为:
|
||||
|
||||
下载 `repo` 工具和建立工作目录(略)
|
||||
|
||||
初始化:
|
||||
|
||||
```
|
||||
repo init -u https://{{ site.hostname }}/git/AOSP/mirror/manifest --mirror
|
||||
```
|
||||
|
||||
最后同步源码树:
|
||||
|
||||
```
|
||||
repo sync
|
||||
```
|
||||
|
||||
同步完成后,运行 `git daemon --verbose --export-all --base-path=WORKING_DIR WORKING_DIR` (`WORKING_DIR`为代码树所在目录) 。
|
||||
|
||||
此后,其他用户使用 `git://ip.to.mirror/` 作为镜像即可。
|
||||
|
||||
### 替换已有的 AOSP 源代码的 remote
|
||||
|
||||
如果你之前已经通过某种途径获得了 AOSP 的源码(或者你只是 init 这一步完成后),
|
||||
你希望以后通过 TUNA 同步 AOSP 部分的代码,只需要将
|
||||
`.repo/manifest.xml` 把其中的 aosp 这个 remote 的 fetch 从
|
||||
`https://android.googlesource.com` 改为 `https://{{ site.hostname }}/git/AOSP`。
|
||||
|
||||
```diff
|
||||
<manifest>
|
||||
|
||||
<remote name="aosp"
|
||||
- fetch="https://android.googlesource.com"
|
||||
+ fetch="https://{{ site.hostname }}/git/AOSP"
|
||||
review="android-review.googlesource.com" />
|
||||
|
||||
<remote name="github"
|
||||
```
|
||||
|
||||
同时,修改 `.repo/manifests.git/config`,将
|
||||
|
||||
```
|
||||
url = https://android.googlesource.com/platform/manifest
|
||||
```
|
||||
|
||||
更改为
|
||||
|
||||
```
|
||||
url = https://{{ site.hostname }}/git/AOSP/platform/manifest
|
||||
```
|
||||
|
||||
### FAQ
|
||||
|
||||
1. 镜像的是什么?
|
||||
- AOSP 的 git 仓库
|
||||
2. 为何不能通过浏览器访问?
|
||||
- 暂时没有 gitweb, 而且反正是 git bare 仓库,没有可以直接看到的内容。
|
||||
3. 出现 `curl: (22) The requested URL returned error: 404 Not Found
|
||||
Server does not provide clone.bundle; ignoring.` 怎么办?
|
||||
- 无视即可。
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: archlinux
|
||||
---
|
||||
|
||||
## Arch Linux 软件仓库镜像使用帮助
|
||||
|
||||
编辑 /etc/pacman.d/mirrorlist, 在文件的最顶端添加:
|
||||
```
|
||||
Server = https://{{ site.hostname }}/archlinux/$repo/os/$arch
|
||||
```
|
||||
|
||||
更新软件包缓存:
|
||||
```
|
||||
sudo pacman -Syy
|
||||
```
|
||||
|
||||
## Arch Linux Rollback Machine使用帮助
|
||||
|
||||
因为 Arch Linux 的软件仓库和 iso 列表是不维护旧版本的,在少数情况下可能会需要安装旧版本的软件或系统,
|
||||
因此TUNA维护了一个[Arch Linux Rollback Machine](https://{{ site.arch_archive }}/)来满足这种情况。
|
||||
|
||||
Arch Linux Rollback Machine的使用方法请参照 [wiki](https://wiki.archlinux.org/index.php/Arch_Linux_Archive)。
|
||||
|
||||
**需要注意的是,TUNA的Rollback Machine的目录结构与wiki中的目录结构并不相同,配置时请自行替代。**
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: archlinuxcn
|
||||
---
|
||||
|
||||
## ArchlinuxCN 镜像使用帮助
|
||||
|
||||
Arch Linux 中文社区仓库 是由 Arch Linux
|
||||
中文社区驱动的非官方用户仓库。包含中文用户常用软件、工具、字体/美化包等。
|
||||
|
||||
完整的包信息列表(包名称/架构/维护者/状态)请
|
||||
[点击这里](https://github.com/archlinuxcn/repo) 查看。
|
||||
|
||||
* 官方仓库地址:<https://repo.archlinuxcn.org>
|
||||
* 镜像地址: <https://{{ site.hostname }}/archlinuxcn/>
|
||||
|
||||
使用方法:在 `/etc/pacman.conf` 文件末尾添加以下两行:
|
||||
|
||||
```
|
||||
[archlinuxcn]
|
||||
Server = https://{{ site.hostname }}/archlinuxcn/$arch
|
||||
```
|
||||
|
||||
之后安装 `archlinuxcn-keyring` 包导入 GPG key。
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: bananian
|
||||
---
|
||||
|
||||
## Bananian 镜像使用帮助
|
||||
|
||||
[Bananian](https://www.bananian.org/) 是为 [Banana Pi](http://www.banana-pi.org/) 制作的,基于官方 Debian 仓库的发行版,
|
||||
其内核和 bootloader 为 Banana Pi 做了定制化。
|
||||
|
||||
安装镜像可以到 <https://{{ site.hostname }}/bananian/releases/> 获取。
|
||||
|
||||
### 使用 TUNA 镜像作为软件仓库
|
||||
|
||||
首先需要信任 Bananian 的 GPG 公钥
|
||||
|
||||
```
|
||||
gpg --recv-keys 24BFF712
|
||||
gpg --armor --export 24BFF712 | sudo apt-key add -
|
||||
```
|
||||
|
||||
之后添加 Bananian 仓库,运行以下命令即可
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>选择你的 Bananian 版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-release="1604" data-opt='{"debian": "jessie"}' selected>16.04</option>
|
||||
<option data-release="jessie" data-opt='{"debian": "jessie"}'>15.08</option>
|
||||
<option data-release="wheezy" data-opt='{"debian": "wheezy"}'>15.04 或更早</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
# 激活 TUNA bananian 镜像
|
||||
sudo cat > /etc/apt/sources.list.d/bananian.list << EOF
|
||||
deb http://{%endraw%}{{ site.hostname }}{%raw%}/bananian/packages {{release_name}} main
|
||||
EOF
|
||||
|
||||
# 激活 TUNA debian 镜像
|
||||
sudo cat > /etc/apt/sources.list << EOF
|
||||
deb http://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{debian}} main contrib non-free
|
||||
deb http://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{debian}}-backports main contrib non-free
|
||||
deb http://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{debian}}-updates main contrib non-free
|
||||
deb http://{%endraw%}{{ site.hostname }}{%raw%}/debian-security/ {{debian}}/updates main contrib non-free
|
||||
deb-src http://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{debian}} main contrib non-free
|
||||
deb-src http://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{debian}}-backports main contrib non-free
|
||||
deb-src http://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{debian}}-updates main contrib non-free
|
||||
deb-src http://{%endraw%}{{ site.hostname }}{%raw%}/debian-security/ {{debian}}/updates main contrib non-free
|
||||
EOF
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
更新软件包缓存
|
||||
|
||||
```
|
||||
sudo apt-get update
|
||||
```
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: binutils-gdb.git
|
||||
---
|
||||
|
||||
## GNU Binutils 和 GDB 等项目 Git 镜像使用帮助
|
||||
|
||||
如需克隆 Binutils 等项目的代码,使用
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/binutils-gdb.git
|
||||
```
|
||||
|
||||
若要将 tuna mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/binutils-gdb.git
|
||||
```
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/binutils-gdb.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: centos
|
||||
---
|
||||
|
||||
## CentOS 镜像使用帮助
|
||||
|
||||
建议先备份 CentOS-Base.repo
|
||||
|
||||
```
|
||||
sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
|
||||
```
|
||||
|
||||
然后编辑 /etc/yum.repos.d/CentOS-Base.repo 文件,在 `mirrorlist=` 开头行前面加 `#` 注释掉;并将 `baseurl=` 开头行取消注释(如果被注释的话),把该行内的域名(例如`mirror.centos.org`)替换为 `{{ site.hostname }}`。
|
||||
|
||||
或者,你也可以直接使用如下内容覆盖掉 /etc/yum.repos.d/CentOS-Base.repo 文件:(未经充分测试)
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>选择你的 CentOS 版本: </label>
|
||||
<select class="form-control release-select" data-template="#repo-template" data-target="#repo-content">
|
||||
<option data-os="" data-security="RPM-GPG-KEY-5" data-release="5">CentOS 5</option>
|
||||
<option data-os="" data-security="RPM-GPG-KEY-6" data-release="6">CentOS 6</option>
|
||||
<option data-os="" data-security="RPM-GPG-KEY-7" data-release="7" selected>CentOS 7</option>
|
||||
<option data-os="os/" data-security="RPM-GPG-KEY-centosofficial" data-release="8">CentOS 8</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% raw %}
|
||||
<script id="repo-template" type="x-tmpl-markup">
|
||||
# CentOS-Base.repo
|
||||
#
|
||||
# The mirror system uses the connecting IP address of the client and the
|
||||
# update status of each mirror to pick mirrors that are updated to and
|
||||
# geographically close to the client. You should use this for CentOS updates
|
||||
# unless you are manually picking other mirrors.
|
||||
#
|
||||
# If the mirrorlist= does not work for you, as a fall back you can try the
|
||||
# remarked out baseurl= line instead.
|
||||
#
|
||||
#
|
||||
|
||||
{{if release_name|between>5>7}}
|
||||
[base]
|
||||
name=CentOS-$releasever - Base
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/centos/$releasever/os/$basearch/
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/{{release_security}}
|
||||
|
||||
#released updates
|
||||
[updates]
|
||||
name=CentOS-$releasever - Updates
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/centos/$releasever/updates/$basearch/
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/{{release_security}}
|
||||
{{/if}}
|
||||
{{if release_name|equals>8}}
|
||||
[BaseOS]
|
||||
name=CentOS-$releasever - Base
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/centos/$releasever/BaseOS/$basearch/os/
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/{{release_security}}
|
||||
|
||||
[AppStream]
|
||||
name=CentOS-$releasever - AppStream
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/centos/$releasever/AppStream/$basearch/os/
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/{{release_security}}
|
||||
|
||||
[PowerTools]
|
||||
name=CentOS-$releasever - PowerTools
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/centos/$releasever/PowerTools/$basearch/os/
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra
|
||||
enabled=0
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/{{release_security}}
|
||||
{{/if}}
|
||||
|
||||
#additional packages that may be useful
|
||||
[extras]
|
||||
name=CentOS-$releasever - Extras
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/centos/$releasever/extras/$basearch/{{os_name}}
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/{{release_security}}
|
||||
|
||||
{{if release_name|equals>5}}
|
||||
#packages used/produced in the build but not released
|
||||
[addons]
|
||||
name=CentOS-$releasever - Addons
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/centos/$releasever/addons/$basearch/
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/{{release_security}}
|
||||
{{/if}}
|
||||
|
||||
#additional packages that extend functionality of existing packages
|
||||
[centosplus]
|
||||
name=CentOS-$releasever - Plus
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/centos/$releasever/centosplus/$basearch/{{os_name}}
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/{{release_security}}
|
||||
|
||||
{{if release_name|between>5>6}}
|
||||
#contrib - packages by Centos Users
|
||||
[contrib]
|
||||
name=CentOS-$releasever - Contrib
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/centos/$releasever/contrib/$basearch/
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/{{release_security}}
|
||||
{{/if}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="repo-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
最后,更新软件包缓存
|
||||
|
||||
```
|
||||
sudo yum makecache
|
||||
```
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: chef
|
||||
---
|
||||
|
||||
## Chef APT/YUM 镜像使用帮助
|
||||
|
||||
Chef 是一套自动化运维工具。
|
||||
|
||||
### Debian/Ubuntu 用户
|
||||
|
||||
再选择你的 Debian/Ubuntu 版本,文本框中内容写进 `/etc/apt/sources.list.d/chef.list`
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian/Ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="jessie">Debian 8 (Jessie)</option>
|
||||
<option data-os="debian" data-release="stretch">Debian 9 (Stretch)</option>
|
||||
<option data-os="debian" data-release="buster" selected>Debian 10 (Buster)</option>
|
||||
<option data-os="ubuntu" data-release="trusty">Ubuntu 14.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="xenial">Ubuntu 16.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="bionic">Ubuntu 18.04 LTS</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/chef/apt/stable {{release_name}} main
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
|
||||
### RHEL/CentOS 用户
|
||||
|
||||
新建 `/etc/yum.repos.d/chef.repo`,内容为:
|
||||
|
||||
```
|
||||
[chef-stable]
|
||||
name=chef-stable
|
||||
baseurl=https://{{ site.hostname }}/chef/yum/stable/stable-el$releasever-x86_64/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://packages.chef.io/chef.asc
|
||||
```
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
layout: help
|
||||
category: help
|
||||
mirrorid: chromiumos
|
||||
permalink: /help/chromiumos/
|
||||
---
|
||||
|
||||
## Chromium OS 镜像使用帮助
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: crates.io-index.git
|
||||
---
|
||||
|
||||
## Rust crates.io 索引镜像使用帮助
|
||||
|
||||
编辑 `~/.cargo/config` 文件,添加以下内容:
|
||||
|
||||
```
|
||||
[source.crates-io]
|
||||
replace-with = 'tuna'
|
||||
|
||||
[source.tuna]
|
||||
registry = "https://{{ site.hostname }}/git/crates.io-index.git"
|
||||
```
|
||||
|
||||
该镜像可加快 cargo 读取软件包索引的速度。
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: cygwin
|
||||
---
|
||||
|
||||
Cygwin 镜像使用帮助
|
||||
==================
|
||||
|
||||
从 <https://cygwin.com> 上下载 [setup-x86.exe](https://cygwin.com/setup-x86.exe) 或 [setup-x86_64.exe](https://cygwin.com/setup-x86_64.exe)。
|
||||
|
||||
选择`Install from Internet`, 在"User URL"处输入以下地址:
|
||||
|
||||
```
|
||||
https://{{ site.hostname }}/cygwin/
|
||||
```
|
||||
|
||||
点击"Add"按钮, 然后选中"https://{{ site.hostname }}", 点击"下一步"进行安装。
|
||||
|
||||
注意,该列表为可多选列表,注意把上面不需要的镜像点掉。
|
||||
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: debian
|
||||
---
|
||||
|
||||
Debian 镜像使用帮助
|
||||
===================
|
||||
|
||||
Debian 的软件源配置文件是
|
||||
`/etc/apt/sources.list`。将系统自带的该文件做个备份,将该文件替换为下面内容,即可使用
|
||||
TUNA 的软件源镜像。
|
||||
|
||||
如果遇到无法拉取 https 源的情况,请先使用 http 源并安装:
|
||||
|
||||
```
|
||||
$ sudo apt install apt-transport-https ca-certificates
|
||||
```
|
||||
|
||||
再使用 TUNA 的软件源镜像。
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>选择你的 Debian 版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-release="sid" data-security="-security">sid</option>
|
||||
<option data-release="testing" data-security="-security">testing</option>
|
||||
<option data-release="bullseye" data-security="-security">bullseye</option>
|
||||
<option data-release="buster" data-security="/updates" selected>buster</option>
|
||||
<option data-release="stretch" data-security="/updates">stretch</option>
|
||||
<option data-release="jessie" data-security="/updates">jessie</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{release_name}} main contrib non-free
|
||||
# deb-src https://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{release_name}} main contrib non-free{{if release_name|notequals>sid}}
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{release_name}}-updates main contrib non-free
|
||||
# deb-src https://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{release_name}}-updates main contrib non-free
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{release_name}}-backports main contrib non-free
|
||||
# deb-src https://{%endraw%}{{ site.hostname }}{%raw%}/debian/ {{release_name}}-backports main contrib non-free
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/debian-security {{release_name}}{{release_security}} main contrib non-free
|
||||
# deb-src https://{%endraw%}{{ site.hostname }}{%raw%}/debian-security {{release_name}}{{release_security}} main contrib non-free
|
||||
{{/if}}
|
||||
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
---
|
||||
mirrorid: docker-ce
|
||||
layout: help
|
||||
category: help
|
||||
---
|
||||
|
||||
## Docker Community Edition 镜像使用帮助
|
||||
|
||||
**注意: 本镜像只提供 Debian/Ubuntu/Fedora/CentOS/RHEL 的 docker 软件包,非 dockerhub**
|
||||
|
||||
|
||||
### Debian/Ubuntu 用户
|
||||
|
||||
以下内容根据 [官方文档](https://docs.docker.com/engine/installation/linux/docker-ce/debian/) 修改而来。
|
||||
|
||||
如果你过去安装过 docker,先删掉:
|
||||
|
||||
```bash
|
||||
sudo apt-get remove docker docker-engine docker.io
|
||||
```
|
||||
|
||||
首先安装依赖:
|
||||
|
||||
```bash
|
||||
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
|
||||
```
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>根据你的发行版,下面的内容有所不同。你使用的发行版: </label>
|
||||
<select class="form-control" v-model="deb_release">
|
||||
<option value="debian" selected>Debian</option>
|
||||
<option value="ubuntu">Ubuntu</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
信任 Docker 的 GPG 公钥:
|
||||
|
||||
{% raw %}
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="deb-gpg-content">curl -fsSL https://download.docker.com/linux/{{ deb_release }}/gpg | sudo apt-key add -</code>
|
||||
</pre>
|
||||
{% endraw %}
|
||||
|
||||
|
||||
对于 amd64 架构的计算机,添加软件仓库:
|
||||
|
||||
{% raw %}
|
||||
<p></p>
|
||||
<pre>
|
||||
<code class="language-bash" id="deb-amd64-content">sudo add-apt-repository \
|
||||
"deb [arch=amd64] https://{%endraw%}{{ site.hostname }}{%raw%}/docker-ce/linux/{{deb_release}} \
|
||||
$(lsb_release -cs) \
|
||||
stable"</code>
|
||||
</pre>
|
||||
{% endraw %}
|
||||
|
||||
|
||||
如果你是树莓派或其它ARM架构计算机,请运行:
|
||||
|
||||
{% raw %}
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="deb-arm-content">echo "deb [arch=armhf] https://{%endraw%}{{ site.hostname }}{%raw%}/docker-ce/linux/{{deb_release}} \
|
||||
$(lsb_release -cs) stable" | \
|
||||
sudo tee /etc/apt/sources.list.d/docker.list</code>
|
||||
</pre>
|
||||
{% endraw %}
|
||||
|
||||
最后安装
|
||||
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install docker-ce
|
||||
```
|
||||
|
||||
### Fedora/CentOS/RHEL
|
||||
|
||||
以下内容根据 [官方文档](https://docs.docker.com/engine/installation/linux/docker-ce/centos/) 修改而来。
|
||||
|
||||
如果你之前安装过 docker,请先删掉
|
||||
|
||||
```bash
|
||||
sudo yum remove docker docker-common docker-selinux docker-engine
|
||||
```
|
||||
|
||||
安装一些依赖
|
||||
|
||||
```bash
|
||||
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
|
||||
```
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>根据你的发行版下载repo文件: </label>
|
||||
<select class="form-control" v-model="yum_release">
|
||||
<option value="centos" selected>CentOS/RHEL</option>
|
||||
<option value="fedora">Fedora</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% raw %}
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="yum-content">wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/{{ yum_release }}/docker-ce.repo</code>
|
||||
</pre>
|
||||
{% endraw %}
|
||||
|
||||
把软件仓库地址替换为 TUNA:
|
||||
|
||||
```bash
|
||||
sudo sed -i 's+download.docker.com+{{ site.hostname }}/docker-ce+' /etc/yum.repos.d/docker-ce.repo
|
||||
```
|
||||
|
||||
最后安装:
|
||||
|
||||
```bash
|
||||
sudo yum makecache fast
|
||||
sudo yum install docker-ce
|
||||
```
|
||||
|
||||
{% raw %}
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: "#help-content",
|
||||
data: {
|
||||
deb_release: 'debian',
|
||||
yum_release: 'centos'
|
||||
},
|
||||
computed: {
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: elpa
|
||||
---
|
||||
|
||||
ELPA 镜像使用帮助
|
||||
==================
|
||||
|
||||
ELPA 是 Emacs 内建包管理器 `package.el` 的软件源,本镜像支持了常见的 ELPA。
|
||||
|
||||
| ELPA | 镜像地址 |
|
||||
|-------------------|---------------------------------------------|
|
||||
| [GNU ELPA](http://elpa.gnu.org/) | http://{{ site.hostname }}/elpa/gnu/ |
|
||||
| [MELPA](https://melpa.org/) | http://{{ site.hostname }}/elpa/melpa/ |
|
||||
| [MELPA Stable](http://stable.melpa.org/#/) | http://{{ site.hostname }}/elpa/melpa-stable/ |
|
||||
| [Marmalade](https://marmalade-repo.org/) | http://{{ site.hostname }}/elpa/marmalade/ |
|
||||
| [Org](http://orgmode.org/elpa.html) | http://{{ site.hostname }}/elpa/org/ |
|
||||
|
||||
|
||||
根据你的需求,设置 package-archives ,比如用 GNU ELPA 和 MELPA:
|
||||
|
||||
```lisp
|
||||
(setq package-archives '(("gnu" . "http://{{ site.hostname }}/elpa/gnu/")
|
||||
("melpa" . "http://{{ site.hostname }}/elpa/melpa/")))
|
||||
(package-initialize) ;; You might already have this line
|
||||
```
|
||||
|
||||
|
||||
Spacemacs 用户
|
||||
--------------
|
||||
|
||||
### master 分支
|
||||
|
||||
添加下面的代码到`.spacemacs`的`dotspacemacs/user-init()`
|
||||
|
||||
```lisp
|
||||
(setq configuration-layer--elpa-archives
|
||||
'(("melpa-cn" . "http://{{ site.hostname }}/elpa/melpa/")
|
||||
("org-cn" . "http://{{ site.hostname }}/elpa/org/")
|
||||
("gnu-cn" . "http://{{ site.hostname }}/elpa/gnu/")))
|
||||
```
|
||||
### develop 分支
|
||||
|
||||
使用 `configuration-layer-elpa-archives` 代替原来的 `configuration-layer--elpa-archives` ( `--` 换成 `-` )
|
||||
|
||||
```lisp
|
||||
(setq configuration-layer-elpa-archives
|
||||
'(("melpa-cn" . "http://{{ site.hostname }}/elpa/melpa/")
|
||||
("org-cn" . "http://{{ site.hostname }}/elpa/org/")
|
||||
("gnu-cn" . "http://{{ site.hostname }}/elpa/gnu/")))
|
||||
```
|
||||
|
||||
Cask 用户
|
||||
---------
|
||||
|
||||
[Cask](https://github.com/cask/cask) 是一个 Emacs Lisp 的项目管理工具。这里还是以 GNU ELPA 和 MELPA 为例,在添加下面的代码到 Cask
|
||||
|
||||
```lisp
|
||||
(source "gnu" "http://{{ site.hostname }}/elpa/gnu/")
|
||||
(source "melpa" "http://{{ site.hostname }}/elpa/melpa/")
|
||||
```
|
||||
|
||||
关于 ELPA 的选择
|
||||
----------------
|
||||
|
||||
(来自[@xuchunyang](https://github.com/xuchunyang))
|
||||
|
||||
假如不清楚需要用哪些 ELPA 的话
|
||||
|
||||
- `gnu` 一般是必备的,其它的 elpa 中的包会依赖 `gnu` 中的包
|
||||
- `melpa` 滚动升级,收录了的包的数量最大
|
||||
- `melpa-stable` 依据源码的 Tag (Git)升级,数量比 `melpa` 少,因为很多包作者根本不打 Tag
|
||||
- `org` 仅仅为了 `org-plus-contrib` 这一个包,org 重度用户使用
|
||||
- `marmalade` 似乎已经不维护了,个人不推荐
|
||||
|
||||
上游
|
||||
====
|
||||
|
||||
本镜像的上游为 <http://elpa.emacs-china.org/>,本文档也参考了emacs-china提供的帮助。
|
||||
|
||||
URL Bug
|
||||
=======
|
||||
|
||||
各个仓库的URL末尾一定要加`/`,否则会无法拉取,提示`Failed to download melpa archive`。
|
||||
|
||||
事实上,末尾没有`/`的话,emacs会去尝试取以下链接:
|
||||
|
||||
- <http://{{ site.hostname }}/elpa/melpaarchive-contents>
|
||||
|
||||
而正常的链接应该是
|
||||
|
||||
- <http://{{ site.hostname }}/elpa/melpa/archive-contents>
|
||||
|
||||
这个是emacs自己的bug。在 <https://github.com/melpa/melpa/issues/2139> 中有描述。
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
layout: help
|
||||
category: help
|
||||
mirrorid: epel
|
||||
---
|
||||
|
||||
## EPEL 镜像使用帮助
|
||||
|
||||
EPEL(Extra Packages for Enterprise Linux)是由Fedora Special Interest Group维护的Enterprise Linux(RHEL、CentOS)中经
|
||||
常用到的包。
|
||||
|
||||
|
||||
下面以CentOS 7为例讲解如何使用tuna的epel镜像。
|
||||
|
||||
首先从CentOS Extras这个源([tuna](https://{{ site.hostname }}/help/centos)也有镜像)里安装epel-release:
|
||||
|
||||
```
|
||||
yum install epel-release
|
||||
```
|
||||
|
||||
当前tuna已经在epel的官方镜像列表里,所以不需要其他配置,mirrorlist机制就能让你的服务器就近使用tuna的镜像。如果你想强制
|
||||
你的服务器使用tuna的镜像,可以修改`/etc/yum.repos.d/epel.repo`,将`mirrorlist`和`metalink`开头的行注释掉。
|
||||
|
||||
接下来,取消注释这个文件里`baseurl`开头的行,并将其中的`http://download.fedoraproject.org/pub`替换成`https://{{ site.hostname }}`。
|
||||
|
||||
可以用如下命令自动替换:(来自 https://github.com/tuna/issues/issues/687)
|
||||
|
||||
```
|
||||
sed -e 's!^metalink=!#metalink=!g' \
|
||||
-e 's!^#baseurl=!baseurl=!g' \
|
||||
-e 's!//download\.fedoraproject\.org/pub!//{{ site.hostname }}!g' \
|
||||
-e 's!http://mirrors\.tuna!https://mirrors.tuna!g' \
|
||||
-i /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel-testing.repo
|
||||
```
|
||||
|
||||
修改结果如下:(仅供参考,不同版本可能不同)
|
||||
|
||||
```
|
||||
[epel]
|
||||
name=Extra Packages for Enterprise Linux 7 - $basearch
|
||||
baseurl=https://{{ site.hostname }}/epel/7/$basearch
|
||||
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
|
||||
failovermethod=priority
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
|
||||
|
||||
[epel-debuginfo]
|
||||
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
|
||||
baseurl=https://{{ site.hostname }}/epel/7/$basearch/debug
|
||||
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
|
||||
failovermethod=priority
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
|
||||
gpgcheck=1
|
||||
|
||||
[epel-source]
|
||||
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
|
||||
baseurl=https://{{ site.hostname }}/epel/7/SRPMS
|
||||
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
|
||||
failovermethod=priority
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
|
||||
gpgcheck=1
|
||||
```
|
||||
|
||||
运行 `yum update` 测试一下吧。
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: fdroid
|
||||
---
|
||||
|
||||
## F-Droid 镜像使用帮助
|
||||
|
||||
用 F-Droid 客户端打开此链接:
|
||||
|
||||
https://{{ site.hostname }}/fdroid/repo/?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB
|
||||
|
||||
或复制此链接后在客户端中添加存储库,可以将此镜像添加为用户镜像。
|
||||
|
||||
如果需要添加 Archive 库,可以使用如下链接:
|
||||
|
||||
https://{{ site.hostname }}/fdroid/archive?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: fedora
|
||||
---
|
||||
|
||||
Fedora 镜像使用帮助
|
||||
===================
|
||||
|
||||
Fedora 默认使用 [Metalink](https://zh.fedoracommunity.org/2018/04/05/fedora-secures-package-delivery.html) 给出推荐的镜像列表,保证用户使用的镜像仓库足够新,并且能够尽快拿到安全更新,从而提供更好的安全性。所以通常情况下使用默认配置即可,无需更改配置文件。
|
||||
|
||||
由于 Metalink 需要从国外的 Fedora 项目服务器上获取元信息,所以对于校园内网、无国外访问等特殊情况,metalink 并不适用,此时可以如下修改配置文件。
|
||||
|
||||
Fedora 的软件源配置文件可以有多个,其中:
|
||||
系统默认的 `fedora` 仓库配置文件为 `/etc/yum.repos.d/fedora.repo`,系统默认的 `updates` 仓库配置文件为 `/etc/yum.repos.d/fedora-updates.repo` 。将上述两个文件先做个备份,根据 Fedora 系统版本分别替换为下面内容,之后通过 `sudo dnf makecache` 命令更新本地缓存,即可使用 TUNA 的软件源镜像。
|
||||
|
||||
## Fedora 29 或更旧版本
|
||||
|
||||
Fedora 29 及更旧版本已不再受官方支持,Fedora 官方已将 Fedora 29 及更旧版本的软件仓库从主镜像中移除,并转移至了 archive 镜像中。故Fedora 29 及更旧版本无法使用 TUNA 的镜像。请使用默认配置文件,以使 `yum` / `dnf` 自动获取可用的镜像源。
|
||||
|
||||
## Fedora 30 或更新版本
|
||||
|
||||
**`fedora` 仓库 (/etc/yum.repos.d/fedora.repo)**
|
||||
|
||||
```
|
||||
[fedora]
|
||||
name=Fedora $releasever - $basearch
|
||||
failovermethod=priority
|
||||
baseurl=https://{{ site.hostname }}/fedora/releases/$releasever/Everything/$basearch/os/
|
||||
metadata_expire=28d
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||
skip_if_unavailable=False
|
||||
```
|
||||
|
||||
**`updates` 仓库 (/etc/yum.repos.d/fedora-updates.repo)**
|
||||
|
||||
```
|
||||
[updates]
|
||||
name=Fedora $releasever - $basearch - Updates
|
||||
failovermethod=priority
|
||||
baseurl=https://{{ site.hostname }}/fedora/updates/$releasever/Everything/$basearch/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
metadata_expire=6h
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||
skip_if_unavailable=False
|
||||
```
|
||||
|
||||
**`fedora-modular` 仓库 (/etc/yum.repos.d/fedora-modular.repo)**
|
||||
|
||||
```
|
||||
[fedora-modular]
|
||||
name=Fedora Modular $releasever - $basearch
|
||||
failovermethod=priority
|
||||
baseurl=https://{{ site.hostname }}/fedora/releases/$releasever/Modular/$basearch/os/
|
||||
enabled=1
|
||||
metadata_expire=7d
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||
skip_if_unavailable=False
|
||||
```
|
||||
|
||||
**`updates-modular` 仓库 (/etc/yum.repos.d/fedora-updates-modular.repo)**
|
||||
|
||||
```
|
||||
[updates-modular]
|
||||
name=Fedora Modular $releasever - $basearch - Updates
|
||||
failovermethod=priority
|
||||
baseurl=https://{{ site.hostname }}/fedora/updates/$releasever/Modular/$basearch/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
metadata_expire=6h
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||
skip_if_unavailable=False
|
||||
```
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: flutter-sdk.git
|
||||
---
|
||||
|
||||
## Flutter SDK 源码镜像使用帮助
|
||||
|
||||
Flutter SDK 默认从 Github 获取更新,如您访问 Github 速度慢,可以在 Flutter 目录下运行命令:
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/flutter-sdk.git
|
||||
```
|
||||
|
||||
将上游设置为 TUNA 镜像。
|
||||
|
||||
或者通过下面的命令,直接从 Master 构建渠道检出 Flutter 的 SDK:
|
||||
|
||||
```
|
||||
git clone -b master https://{{ site.hostname }}/git/flutter-sdk.git
|
||||
./flutter-sdk/bin/flutter --version
|
||||
```
|
||||
|
||||
Flutter 镜像使用方法参见 [Flutter 镜像安装帮助](../flutter)。
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: gcc.git
|
||||
---
|
||||
|
||||
## GCC Git 镜像使用帮助
|
||||
|
||||
如需克隆 GCC 代码,使用
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/gcc.git
|
||||
```
|
||||
|
||||
若要将 tuna mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/gcc.git
|
||||
```
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/gcc.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: git-repo
|
||||
---
|
||||
|
||||
## Git Repo 镜像使用帮助
|
||||
|
||||
> Repo is a tool that we built on top of Git. Repo helps us manage the many Git repositories, does the uploads to our revision control system, and automates parts of the Android development workflow. Repo is not meant to replace Git, only to make it easier to work with Git in the context of Android. The repo command is an executable Python script that you can put anywhere in your path.
|
||||
|
||||
当前repo主要用于同步AOSP、chromium及chromium OS。
|
||||
|
||||
### 下载
|
||||
|
||||
```
|
||||
curl https://{{ site.hostname }}/git/git-repo -o repo
|
||||
chmod +x repo
|
||||
```
|
||||
|
||||
为了方便可以将其拷贝到你的`PATH`里。
|
||||
|
||||
### 更新
|
||||
|
||||
repo的运行过程中会尝试访问官方的git源更新自己,如果想使用tuna的镜像源进行更新,可以将如下内容复制到你的`~/.bashrc`里
|
||||
|
||||
```
|
||||
export REPO_URL='https://{{ site.hostname }}/git/git-repo'
|
||||
```
|
||||
|
||||
并重启终端模拟器。
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: gitlab-ce
|
||||
---
|
||||
|
||||
## Gitlab Community Edition 镜像使用帮助
|
||||
|
||||
**注意: gitlab-ce 镜像仅支持 x86-64 架构**
|
||||
|
||||
### Debian/Ubuntu 用户
|
||||
|
||||
首先信任 GitLab 的 GPG 公钥:
|
||||
|
||||
```
|
||||
curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null
|
||||
```
|
||||
|
||||
再选择你的 Debian/Ubuntu 版本,文本框中内容写进 `/etc/apt/sources.list.d/gitlab-ce.list`
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian/Ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="jessie">Debian 8 (Jessie)</option>
|
||||
<option data-os="debian" data-release="stretch">Debian 9 (Stretch)</option>
|
||||
<option data-os="debian" data-release="buster" selected>Debian 10 (Buster)</option>
|
||||
<option data-os="ubuntu" data-release="trusty">Ubuntu 14.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="xenial">Ubuntu 16.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="bionic">Ubuntu 18.04 LTS</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
安装 gitlab-ce:
|
||||
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install gitlab-ce
|
||||
```
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb {{if os_name|equals>ubuntu}}https{{else}}http{{/if}}://{%endraw%}{{ site.hostname }}{%raw%}/gitlab-ce/{{os_name}} {{release_name}} main
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
|
||||
### RHEL/CentOS 用户
|
||||
|
||||
|
||||
新建 `/etc/yum.repos.d/gitlab-ce.repo`,内容为
|
||||
|
||||
```
|
||||
[gitlab-ce]
|
||||
name=Gitlab CE Repository
|
||||
baseurl=https://{{ site.hostname }}/gitlab-ce/yum/el$releasever/
|
||||
gpgcheck=0
|
||||
enabled=1
|
||||
```
|
||||
|
||||
再执行
|
||||
|
||||
```
|
||||
sudo yum makecache
|
||||
sudo yum install gitlab-ce
|
||||
```
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: gitlab-ci-multi-runner
|
||||
---
|
||||
|
||||
## Gitlab CI Multi Runner 镜像使用帮助
|
||||
|
||||
**注意: gitlab-ci-multi-runner 已停止更新。** 如果你需要安装版本 10 及以上的
|
||||
Runner,由于官方名称发生变化,请前往 [gitlab-runner帮助页面](https://{{ site.hostname }}/help/gitlab-runner/)。
|
||||
|
||||
|
||||
### Debian/Ubuntu 用户
|
||||
|
||||
本镜像仅支持 i386 和 amd64 架构。
|
||||
|
||||
首先信任 GitLab 的 GPG 公钥:
|
||||
|
||||
```
|
||||
curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null
|
||||
```
|
||||
|
||||
再选择你的 Debian/Ubuntu 版本,文本框中内容写进 `/etc/apt/sources.list.d/gitlab-ci-multi-runner.list`
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian/Ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="jessie">Debian 8 (Jessie)</option>
|
||||
<option data-os="debian" data-release="stretch" selected>Debian 9 (Stretch)</option>
|
||||
<option data-os="ubuntu" data-release="trusty">Ubuntu 14.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="xenial">Ubuntu 16.04 LTS</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
安装 gitlab-ci-multi-runner:
|
||||
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install gitlab-ci-multi-runner
|
||||
```
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb {{if os_name|equals>ubuntu}}https{{else}}http{{/if}}://{%endraw%}{{ site.hostname }}{%raw%}/gitlab-ci-multi-runner/{{os_name}} {{release_name}} main
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
### CentOS/RHEL
|
||||
|
||||
本镜像仅支持 x86-64 架构。
|
||||
|
||||
新建 `/etc/yum.repos.d/gitlab-ci-multi-runner.repo`,内容为
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的CentOS/RHEL版本: </label>
|
||||
<select class="form-control release-select" data-template="#yum-template" data-target="#yum-content">
|
||||
<option data-release="el6">CentOS 6</option>
|
||||
<option data-release="el7" selected>CentOS 7</option>
|
||||
<option data-release="el6">RHEL 6</option>
|
||||
<option data-release="el7">RHEL 7</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="yum-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
再执行
|
||||
|
||||
```
|
||||
sudo yum makecache
|
||||
sudo yum install gitlab-ci-multi-runner
|
||||
```
|
||||
|
||||
{% raw %}
|
||||
<script id="yum-template" type="x-tmpl-markup">
|
||||
[gitlab-ci-multi-runner]
|
||||
name=gitlab-ci-multi-runner
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/gitlab-ci-multi-runner/yum/{{release_name}}
|
||||
repo_gpgcheck=0
|
||||
gpgcheck=0
|
||||
enabled=1
|
||||
gpgkey=https://packages.gitlab.com/gpg.key
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: gitlab-runner
|
||||
---
|
||||
|
||||
## Gitlab Runner 镜像使用帮助
|
||||
|
||||
**注意: gitlab-runner 镜像支持 x86-64 和 ARM64(aarch64) 架构**
|
||||
|
||||
### Debian/Ubuntu 用户
|
||||
|
||||
首先信任 GitLab 的 GPG 公钥:
|
||||
|
||||
```
|
||||
curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null
|
||||
```
|
||||
|
||||
再选择你的 Debian/Ubuntu 版本,文本框中内容写进 `/etc/apt/sources.list.d/gitlab-runner.list`
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian/Ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="jessie">Debian 8 (Jessie)</option>
|
||||
<option data-os="debian" data-release="stretch">Debian 9 (Stretch)</option>
|
||||
<option data-os="debian" data-release="buster" selected>Debian 10 (Buster)</option>
|
||||
<option data-os="ubuntu" data-release="xenial">Ubuntu 16.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="bionic">Ubuntu 18.04 LTS</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
安装 gitlab-runner:
|
||||
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install gitlab-runner
|
||||
```
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb {{if os_name|equals>ubuntu}}https{{else}}http{{/if}}://{%endraw%}{{ site.hostname }}{%raw%}/gitlab-runner/{{os_name}} {{release_name}} main
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
### CentOS/RHEL
|
||||
|
||||
新建 `/etc/yum.repos.d/gitlab-runner.repo`,内容为
|
||||
|
||||
```
|
||||
[gitlab-runner]
|
||||
name=gitlab-runner
|
||||
baseurl=https://{{ site.hostname }}/gitlab-runner/yum/el$releasever-$basearch/
|
||||
repo_gpgcheck=0
|
||||
gpgcheck=0
|
||||
enabled=1
|
||||
gpgkey=https://packages.gitlab.com/gpg.key
|
||||
```
|
||||
|
||||
再执行
|
||||
|
||||
```
|
||||
sudo yum makecache
|
||||
sudo yum install gitlab-runner
|
||||
```
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: glibc.git
|
||||
---
|
||||
|
||||
## GNU C Library Git 镜像使用帮助
|
||||
|
||||
如需克隆 GNU C Library 代码,使用
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/glibc.git
|
||||
```
|
||||
|
||||
若要将 tuna mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/glibc.git
|
||||
```
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/glibc.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: hackage
|
||||
---
|
||||
|
||||
# hackage 镜像使用帮助
|
||||
|
||||
## 在`cabal`中初次使用
|
||||
|
||||
先执行
|
||||
|
||||
```
|
||||
cabal update
|
||||
```
|
||||
|
||||
待生成`~/.cabal/config`配置文件之后`Ctrl+C`, 然后进行下一步。(注:在 Windows 平台上的配置文件是 `%APPDATA%\cabal\config`)
|
||||
|
||||
### Cabal ≥ 1.2.4 (GHC 8.0)
|
||||
|
||||
修改 `~/.cabal/config`,加入
|
||||
|
||||
```
|
||||
repository {{ site.hostname }}
|
||||
url: http://{{ site.hostname }}/hackage
|
||||
```
|
||||
|
||||
为了访问速度,可以选择把官方仓库注释掉:
|
||||
|
||||
```
|
||||
repository hackage.haskell.org
|
||||
url: http://hackage.haskell.org/
|
||||
-- secure: False
|
||||
-- root-keys:
|
||||
-- key-threshold:
|
||||
```
|
||||
|
||||
### Cabal < 1.2.4
|
||||
|
||||
修改`~/.cabal/config`, 将此行
|
||||
|
||||
```
|
||||
remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
|
||||
```
|
||||
注释掉,改为
|
||||
|
||||
```
|
||||
remote-repo: {{ site.hostname }}:http://{{ site.hostname }}/hackage
|
||||
-- remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
|
||||
```
|
||||
|
||||
注意,此处的注释是两条短线`--`.
|
||||
|
||||
再执行`cabal update`, 即可使用`cabal`安装包了。
|
||||
|
||||
## 在 [`stack`](https://github.com/commercialhaskell/stack) 中使用
|
||||
|
||||
### stack >= v2.1.1
|
||||
|
||||
修改`~/.stack/config.yaml`, 加上:
|
||||
|
||||
```yaml
|
||||
package-indices:
|
||||
- download-prefix: http://{{ site.hostname }}/hackage/
|
||||
hackage-security:
|
||||
keyids:
|
||||
- 0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d
|
||||
- 1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42
|
||||
- 280b10153a522681163658cb49f632cde3f38d768b736ddbc901d99a1a772833
|
||||
- 2a96b1889dc221c17296fcc2bb34b908ca9734376f0f361660200935916ef201
|
||||
- 2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3
|
||||
- 51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921
|
||||
- 772e9f4c7db33d251d5c6e357199c819e569d130857dc225549b40845ff0890d
|
||||
- aa315286e6ad281ad61182235533c41e806e5a787e0b6d1e7eef3f09d137d2e9
|
||||
- fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0
|
||||
key-threshold: 3 # number of keys required
|
||||
|
||||
# ignore expiration date, see https://github.com/commercialhaskell/stack/pull/4614
|
||||
ignore-expiry: no
|
||||
```
|
||||
|
||||
### stack < v2.1.1
|
||||
|
||||
修改`~/.stack/config.yaml`, 加上:
|
||||
|
||||
```yaml
|
||||
package-indices:
|
||||
- name: Tsinghua
|
||||
download-prefix: http://{{ site.hostname }}/hackage/package/
|
||||
http: http://{{ site.hostname }}/hackage/00-index.tar.gz
|
||||
```
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: homebrew-bottles
|
||||
---
|
||||
|
||||
## Homebrew-bottles 镜像使用帮助
|
||||
|
||||
**注:该镜像是 Homebrew 二进制预编译包的镜像。本镜像站同时提供 Homebrew 的 formula 索引的镜像(即 `brew update` 时所更新内容),请参考 [Homebrew 镜像使用帮助](https://{{ site.hostname }}/help/homebrew/)。**
|
||||
|
||||
### 临时替换
|
||||
```bash
|
||||
export HOMEBREW_BOTTLE_DOMAIN=https://{{ site.hostname }}/homebrew-bottles
|
||||
```
|
||||
|
||||
### 长期替换
|
||||
```bash
|
||||
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://{{ site.hostname }}/homebrew-bottles' >> ~/.bash_profile
|
||||
source ~/.bash_profile
|
||||
```
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: homebrew
|
||||
---
|
||||
|
||||
## Homebrew/Linuxbrew 镜像使用帮助
|
||||
|
||||
**注:该镜像是 Homebrew/Linuxbrew 的 formula 索引的镜像(即 `brew update` 时所更新内容)。本镜像站同时提供相应的二进制预编译包的镜像,请参考 [Homebrew bottles 镜像使用帮助](https://{{ site.hostname }}/help/homebrew-bottles/) 和 [Linuxbrew bottles 镜像使用帮助](https://{{ site.hostname }}/help/linuxbrew-bottles/)。**
|
||||
|
||||
### 替换现有上游
|
||||
|
||||
```
|
||||
# brew 程序本身,Homebrew/Linuxbrew 相同
|
||||
git -C "$(brew --repo)" remote set-url origin https://{{ site.hostname }}/git/homebrew/brew.git
|
||||
|
||||
# 以下针对 mac OS 系统上的 Homebrew
|
||||
git -C "$(brew --repo homebrew/core)" remote set-url origin https://{{ site.hostname }}/git/homebrew/homebrew-core.git
|
||||
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://{{ site.hostname }}/git/homebrew/homebrew-cask.git
|
||||
git -C "$(brew --repo homebrew/cask-fonts)" remote set-url origin https://{{ site.hostname }}/git/homebrew/homebrew-cask-fonts.git
|
||||
git -C "$(brew --repo homebrew/cask-drivers)" remote set-url origin https://{{ site.hostname }}/git/homebrew/homebrew-cask-drivers.git
|
||||
|
||||
# 以下针对 Linux 系统上的 Linuxbrew
|
||||
git -C "$(brew --repo homebrew/core)" remote set-url origin https://{{ site.hostname }}/git/homebrew/linuxbrew-core.git
|
||||
|
||||
# 更换后测试工作是否正常
|
||||
brew update
|
||||
```
|
||||
|
||||
### 复原
|
||||
|
||||
_(感谢Snowonion Lee提供说明)_
|
||||
|
||||
```
|
||||
# brew 程序本身,Homebrew/Linuxbrew 相同
|
||||
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
|
||||
|
||||
# 以下针对 mac OS 系统上的 Homebrew
|
||||
git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git
|
||||
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git
|
||||
git -C "$(brew --repo homebrew/cask-fonts)" remote set-url origin https://github.com/Homebrew/homebrew-cask-fonts.git
|
||||
git -C "$(brew --repo homebrew/cask-drivers)" remote set-url origin https://github.com/Homebrew/homebrew-cask-drivers.git
|
||||
|
||||
# 以下针对 Linux 系统上的 Linuxbrew
|
||||
git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/linuxbrew-core.git
|
||||
|
||||
# 更换后测试工作是否正常
|
||||
brew update
|
||||
```
|
||||
|
||||
### 安装 Linuxbrew 时使用 tuna 镜像 (可用 `sudo`)
|
||||
|
||||
```
|
||||
0. 安装 git
|
||||
1. 下载 https://raw.githubusercontent.com/Linuxbrew/install/master/install-ruby
|
||||
2. 将其中 https://homebrew.bintray.com/bottles-portable-ruby/ 换为 https://{{ site.hostname }}/homebrew-bottles/bottles-portable-ruby/
|
||||
3. 运行 ./install-ruby 安装 portable ruby
|
||||
4. export PATH=/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/current/bin:$PATH # ==> Add Ruby to your PATH
|
||||
5. 下载 https://raw.githubusercontent.com/Linuxbrew/install/master/install
|
||||
6. 将其中 https://github.com/Homebrew/brew 换为 https://{{ site.hostname }}/git/homebrew/brew.git
|
||||
7. 运行 ./install 安装 brew
|
||||
8. 执行到 “==> Tapping homebrew/core” 时 Ctrl-C
|
||||
9. export PATH=/home/linuxbrew/.linuxbrew/Homebrew/bin:$PATH # 将 brew 添加到 PATH
|
||||
10. git clone https://{{ site.hostname }}/git/homebrew/linuxbrew-core.git "$(brew --repo homebrew/core)"
|
||||
11. 再次运行 ./install 即可到达安装成功结果
|
||||
```
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: kubernetes
|
||||
---
|
||||
|
||||
## Kubernetes 镜像使用帮助
|
||||
|
||||
Kubernetes 是用于自动部署,扩展和管理容器化应用程序的开源系统。详情可见 [官方介绍](https://kubernetes.io/zh/)。
|
||||
|
||||
**硬件架构: `x86_64`, `armhfp`, `aarch64`**
|
||||
|
||||
### Debian/Ubuntu 用户
|
||||
|
||||
首先导入 gpg key:
|
||||
|
||||
```shell
|
||||
$ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
|
||||
```
|
||||
|
||||
|
||||
新建 `/etc/apt/sources.list.d/kubernetes.list`,内容为
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="ubuntu" data-release="trusty">Ubuntu 14.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="xenial">Ubuntu 16.04 LTS</option>
|
||||
<option data-os="debian" data-release="jessie">Debian 8 (Jessie)</option>
|
||||
<option data-os="debian" data-release="stretch" selected>Debian 9 (Stretch)</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/kubernetes/apt kubernetes-{{release_name}} main
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
|
||||
### RHEL/CentOS 用户
|
||||
|
||||
新建 `/etc/yum.repos.d/kubernetes.repo`,内容为:
|
||||
|
||||
```
|
||||
[kubernetes]
|
||||
name=kubernetes
|
||||
baseurl=https://{{ site.hostname }}/kubernetes/yum/repos/kubernetes-el7-$basearch
|
||||
enabled=1
|
||||
```
|
||||
|
||||
### Minikube
|
||||
|
||||
请到 [minikube 镜像](https://{{ site.hostname }}/github-release/kubernetes/minikube/LatestRelease/) 下载。
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
layout: help
|
||||
category: help
|
||||
mirrorid: lineage-rom
|
||||
permalink: /help/lineage-rom/
|
||||
---
|
||||
|
||||
## Lineage 介绍
|
||||
|
||||
Lineage OS 是全球最大的 Android 发行版之一,前身是 Cyanogenmod。
|
||||
|
||||
## Lineage rom 镜像使用帮助
|
||||
|
||||
正常情况下,Lineage会根据你的地址来定向请求到最近的镜像站,因此通常情况下不需要手动选择镜像站进行下载,直接前往官方的下载网站下载即可。
|
||||
|
||||
但是如果你是校内的同学,或者因为其他原因希望一定从tuna下载Lineage的rom,可以直接访问 <https://{{ site.hostname }}/lineage-rom/full/> 选择设备代码及时间进行下载,或者在镜像站的主页右边或下方找到"获取下载链接",在 操作系统 -> LineageOS 下找到最新的 rom 进行下载。
|
||||
|
||||
zip文件的使用方式请参考lineage的官方文档或自行Google。
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
---
|
||||
layout: help
|
||||
category: help
|
||||
mirrorid: lineageOS
|
||||
permalink: /help/lineageOS/
|
||||
---
|
||||
|
||||
## lineageOS 源代码镜像使用帮助
|
||||
|
||||
**注意: 本镜像是 lineageOS 源代码的镜像,如果是希望下载lineage的rom,请访问 <https://{{ site.hostname }}/help/lineage-rom/>。**
|
||||
|
||||
### 过程摘录
|
||||
|
||||
下载 repo 工具:
|
||||
|
||||
```bash
|
||||
mkdir ~/bin
|
||||
PATH=~/bin:$PATH
|
||||
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
|
||||
chmod a+x ~/bin/repo
|
||||
```
|
||||
|
||||
或者使用tuna的[git-repo镜像](https://{{ site.hostname }}/help/git-repo/)
|
||||
|
||||
建立工作目录:
|
||||
|
||||
```
|
||||
mkdir WORKING_DIRECTORY
|
||||
cd WORKING_DIRECTORY
|
||||
```
|
||||
|
||||
初始化仓库:
|
||||
|
||||
```
|
||||
repo init -u https://{{ site.hostname }}/git/lineageOS/LineageOS/android.git -b cm-14.1
|
||||
```
|
||||
|
||||
(如果已经有从github同步的lineageOS源代码,可以从这里直接开始)
|
||||
|
||||
打开`.repo/manifest.xml`,将
|
||||
|
||||
```xml
|
||||
<remote name="github"
|
||||
fetch=".."
|
||||
review="review.lineageos.org" />
|
||||
|
||||
```
|
||||
|
||||
改成
|
||||
|
||||
```xml
|
||||
<remote name="github"
|
||||
fetch="https://github.com/" />
|
||||
|
||||
<remote name="lineage"
|
||||
fetch="https://{{ site.hostname }}/git/lineageOS/"
|
||||
review="review.lineageos.org" />
|
||||
```
|
||||
|
||||
将
|
||||
|
||||
```xml
|
||||
<remote name="aosp"
|
||||
fetch="https://android.googlesource.com"
|
||||
```
|
||||
|
||||
改成
|
||||
|
||||
```xml
|
||||
<remote name="aosp"
|
||||
fetch="https://{{ site.aosp }}"
|
||||
```
|
||||
|
||||
将
|
||||
|
||||
```xml
|
||||
<default revision="..."
|
||||
remote="github"
|
||||
```
|
||||
|
||||
改成
|
||||
|
||||
```xml
|
||||
<default revision="..."
|
||||
remote="lineage"
|
||||
```
|
||||
|
||||
同步源码树(以后只需执行这条命令来同步):
|
||||
|
||||
```
|
||||
repo sync
|
||||
```
|
||||
|
||||
### 异常处理
|
||||
|
||||
1. 部分仓库例如`Lineage_framework_base`同步的时候会出现bundle错误,这时候可以使用命令`repo sync --no-clone-bundle`进行同步就没有问题了
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: linux-firmware.git
|
||||
---
|
||||
|
||||
## Linux 固件仓库 Git 镜像使用帮助
|
||||
|
||||
如需克隆 Linux 固件仓库,使用
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/linux-firmware.git
|
||||
```
|
||||
|
||||
若要将 tuna mirror 加入已有仓库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/linux-firmware.git
|
||||
```
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/linux-firmware.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像。
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: linux-next.git
|
||||
redirect_help_id: linux.git
|
||||
---
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: linux-stable.git
|
||||
redirect_help_id: linux.git
|
||||
---
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: linux.git
|
||||
---
|
||||
|
||||
## Linux Kernel Git 镜像使用帮助
|
||||
|
||||
本项目包含三个镜像:`linux.git`, `linux-next.git`, `linux-stable.git`,分别是主分支、稳定版分支和开发分支。在使用时,请自行更改路径中相应的仓库名称。
|
||||
|
||||
如需克隆主线 linux 代码,使用
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/linux.git
|
||||
```
|
||||
|
||||
若要将 tuna mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/linux.git
|
||||
```
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/linux.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像
|
||||
|
||||
### 增量下载
|
||||
|
||||
如果需要其它 linux 分支的代码(如树莓派内核代码),可以在 clone 本项目基础上增量下载分支的代码,从而加速下载
|
||||
|
||||
以树莓派为例,具体操作为
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/linux.git
|
||||
git remote add rasp https://github.com/raspberrypi/linux.git
|
||||
git fetch rasp
|
||||
```
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: linuxbrew-bottles
|
||||
---
|
||||
|
||||
## Linuxbrew-bottles 镜像使用帮助
|
||||
|
||||
**注:该镜像是 Linuxbrew 二进制预编译包的镜像。本镜像站同时提供 Linuxbrew 的 formula 索引的镜像(即 `brew update` 时所更新内容),请参考 [Linuxbrew 镜像使用帮助](https://{{ site.hostname }}/help/homebrew/)。**
|
||||
|
||||
### 临时替换
|
||||
```bash
|
||||
export HOMEBREW_BOTTLE_DOMAIN=https://{{ site.hostname }}/linuxbrew-bottles
|
||||
```
|
||||
|
||||
### 长期替换
|
||||
```bash
|
||||
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://{{ site.hostname }}/linuxbrew-bottles' >> ~/.bash_profile
|
||||
source ~/.bash_profile
|
||||
```
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: lxc-images
|
||||
---
|
||||
|
||||
## LXC Images 镜像帮助
|
||||
|
||||
LXC 1.0 以上版本增加了 `download` 模版,支持下载定义好的系统镜像。
|
||||
|
||||
欲使用 TUNA 镜像进行下载加速,可以在 `lxc-create -t download` 的选项部分,
|
||||
增加 `--server {{ site.hostname }}/lxc-images` 即可,例如:
|
||||
|
||||
```
|
||||
# lxc-create -t download -n my-container -- --server {{ site.hostname }}/lxc-images
|
||||
```
|
||||
|
||||
**LXD/LXC 2.0使用镜像加速的方法**:
|
||||
|
||||
创建一个remote链接,指向镜像站即可,或替换掉默认的images链接。
|
||||
|
||||
```
|
||||
# lxc remote add tuna-images https://{{ site.hostname }}/lxc-images/ --protocol=simplestreams --public
|
||||
# lxc image list tuna-images:
|
||||
```
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: mariadb
|
||||
---
|
||||
|
||||
## MariaDB 镜像使用帮助
|
||||
|
||||
由于 MariaDB 版本较多,建议在[官方页面](https://downloads.mariadb.org/mariadb/repositories)上生成配置文件内容。
|
||||
|
||||
### Debian/Ubuntu 等基于 apt 的系统
|
||||
|
||||
|
||||
新建 `/etc/apt/sources.list.d/MariaDB.list`,填入工具生成的配置内容,并将其中的地址部分,例如:
|
||||
|
||||
```
|
||||
https://apt.mariadb.org/mariadb/repo
|
||||
```
|
||||
|
||||
换为
|
||||
|
||||
```
|
||||
https://{{ site.hostname }}/mariadb/repo
|
||||
```
|
||||
|
||||
### RHEL/CentOS 等基于 yum 的系统
|
||||
|
||||
新建 `/etc/yum.repos.d/MariaDB.repo`,填入工具生成的配置内容,并将`baseurl=`后的地址部分,例如:
|
||||
|
||||
```
|
||||
http://yum.mariadb.org
|
||||
```
|
||||
|
||||
换为
|
||||
|
||||
```
|
||||
https://{{ site.hostname }}/mariadb/yum
|
||||
```
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: mongodb
|
||||
---
|
||||
|
||||
## MongoDB 镜像使用帮助
|
||||
|
||||
MongoDB 镜像自 mongodb [官方仓库](https://repo.mongodb.org/), 目前有 RHEL/CentOS, Ubuntu, Debian 的镜像,仅支持 x86-64 架构。
|
||||
更详细内容,可以参考 [官方文档](https://docs.mongodb.org/master/administration/install-on-linux/)
|
||||
|
||||
### Debian/Ubuntu 用户
|
||||
|
||||
首先信任 MongoDB 的 GPG 公钥:
|
||||
|
||||
```
|
||||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
|
||||
```
|
||||
|
||||
再选择你的 Debian/Ubuntu 版本,文本框中内容写进 `/etc/apt/sources.list.d/mongodb.list`
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian/Ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="jessie" data-opt='{"repo-name": "main"}'>Debian 8 (Jessie)</option>
|
||||
<option data-os="debian" data-release="stretch" data-opt='{"repo-name": "main"}'>Debian 9 (Stretch)</option>
|
||||
<option data-os="debian" data-release="buster" data-opt='{"repo-name": "main"}'>Debian 10 (Buster)</option>
|
||||
<option data-os="ubuntu" data-release="trusty" data-opt='{"repo-name": "multiverse"}' >Ubuntu 14.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="xenial" data-opt='{"repo-name": "multiverse"}'>Ubuntu 16.04 LTS</option>
|
||||
<option selected data-os="ubuntu" data-release="bionic" data-opt='{"repo-name": "multiverse"}'>Ubuntu 18.04 LTS</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb {{if os_name|equals>ubuntu}}https{{else}}http{{/if}}://{%endraw%}{{ site.hostname }}{%raw%}/mongodb/apt/{{os_name}} {{release_name}}/mongodb-org/stable {{repo-name}}
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
安装 `mongodb-org` 即可
|
||||
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y mongodb-org
|
||||
```
|
||||
|
||||
### RHEL/CentOS 用户
|
||||
|
||||
|
||||
新建 `/etc/yum.repos.d/mongodb.repo`,内容为
|
||||
|
||||
```
|
||||
[mongodb-org]
|
||||
name=MongoDB Repository
|
||||
baseurl=https://{{ site.hostname }}/mongodb/yum/el$releasever/
|
||||
gpgcheck=0
|
||||
enabled=1
|
||||
```
|
||||
|
||||
刷新缓存并安装 `mongodb-org` 即可。
|
||||
|
||||
```
|
||||
sudo yum makecache
|
||||
sudo yum install mongodb-org
|
||||
```
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: msys2
|
||||
---
|
||||
|
||||
MSYS2 镜像使用帮助
|
||||
==================
|
||||
|
||||
收录架构
|
||||
--------
|
||||
|
||||
* MINGW: i686, x86_64
|
||||
* MSYS: i686, x86_64
|
||||
|
||||
安装
|
||||
--------------
|
||||
|
||||
请访问该镜像目录下的 `distrib/` 目录([x86_64](https://{{ site.hostname }}/msys2/distrib/x86_64) 、[i686](https://{{ site.hostname }}/msys2/distrib/i686/)),找到名为 `msys2-<架构>-<日期>.exe` 的文件(如 `msys2-x86_64-20141113.exe`),下载安装即可。
|
||||
|
||||
pacman 的配置
|
||||
-------------
|
||||
|
||||
编辑 `/etc/pacman.d/mirrorlist.mingw32` ,在文件开头添加:
|
||||
|
||||
```bash
|
||||
Server = https://{{ site.hostname }}/msys2/mingw/i686
|
||||
```
|
||||
|
||||
编辑 `/etc/pacman.d/mirrorlist.mingw64` ,在文件开头添加:
|
||||
|
||||
```bash
|
||||
Server = https://{{ site.hostname }}/msys2/mingw/x86_64
|
||||
```
|
||||
|
||||
编辑 `/etc/pacman.d/mirrorlist.msys` ,在文件开头添加:
|
||||
|
||||
```bash
|
||||
Server = https://{{ site.hostname }}/msys2/msys/$arch
|
||||
```
|
||||
|
||||
然后执行 `pacman -Sy` 刷新软件包数据即可。
|
||||
|
||||
|
||||
注: 本Help参考自[USTC镜像](https://lug.ustc.edu.cn/wiki/mirrors/help/msys2)
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: mysql
|
||||
---
|
||||
|
||||
## Mysql Community Edition 镜像使用帮助
|
||||
|
||||
|
||||
### Debian/Ubuntu 用户
|
||||
|
||||
|
||||
再选择你的 Debian/Ubuntu 版本,文本框中内容写进 `/etc/apt/sources.list.d/mysql-community.list`
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian/Ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="jessie">Debian 8 (Jessie)</option>
|
||||
<option data-os="debian" data-release="stretch">Debian 9 (Stretch)</option>
|
||||
<option data-os="debian" data-release="buster" selected>Debian 10 (Buster)</option>
|
||||
<option data-os="ubuntu" data-release="trusty">Ubuntu 14.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="xenial">Ubuntu 16.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="bionic">Ubuntu 18.04 LTS</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
参考文档:[https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/](https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/)
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/mysql/apt/{{os_name}} {{release_name}} mysql-5.6 mysql-5.7 mysql-8.0 mysql-tools
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
|
||||
### RHEL/CentOS 用户
|
||||
|
||||
新建 `/etc/yum.repos.d/mysql-community.repo`,内容如下:
|
||||
|
||||
注:`mysql-8.0`, `mysql-connectors`和`mysql-tools`在RHEL 7/8上还提供了`aarch64`版本。
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的CentOS/RHEL版本: </label>
|
||||
<select class="form-control release-select" data-template="#yum-template" data-target="#yum-content">
|
||||
<option data-release="el6">CentOS/RHEL 6</option>
|
||||
<option data-release="el7" selected>CentOS/RHEL 7</option>
|
||||
<option data-release="el8">CentOS/RHEL 8</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="yum-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
参考文档:[https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/](https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/)
|
||||
|
||||
{% raw %}
|
||||
<script id="yum-template" type="x-tmpl-markup">
|
||||
[mysql-connectors-community]
|
||||
name=MySQL Connectors Community
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/mysql/yum/mysql-connectors-community-{{release_name}}-$basearch/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql
|
||||
|
||||
[mysql-tools-community]
|
||||
name=MySQL Tools Community
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/mysql/yum/mysql-tools-community-{{release_name}}-$basearch/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql
|
||||
{{if release_name|notequals>el8}}
|
||||
[mysql-5.6-community]
|
||||
name=MySQL 5.6 Community Server
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/mysql/yum/mysql-5.6-community-{{release_name}}-$basearch/
|
||||
enabled=0
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql
|
||||
|
||||
[mysql-5.7-community]
|
||||
name=MySQL 5.7 Community Server
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/mysql/yum/mysql-5.7-community-{{release_name}}-$basearch/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql
|
||||
{{/if}}
|
||||
[mysql-8.0-community]
|
||||
name=MySQL 8.0 Community Server
|
||||
baseurl=https://{%endraw%}{{ site.hostname }}{%raw%}/mysql/yum/mysql-8.0-community-{{release_name}}-$basearch/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: nodejs-release
|
||||
---
|
||||
|
||||
## Nodejs Release 镜像使用帮助
|
||||
|
||||
Nodejs Release 为各平台提供预编译的 nodejs 和 npm 等二进制文件,是
|
||||
[https://nodejs.org/dist/](https://nodejs.org/dist/) 的镜像。
|
||||
|
||||
### 使用方法
|
||||
|
||||
可以手工选择下载所需的版本,也可以搭配 `n` 使用,方法如下:
|
||||
|
||||
```
|
||||
# 设定环境变量
|
||||
|
||||
export NODE_MIRROR=https://{{ site.hostname }}/nodejs-release/
|
||||
|
||||
# 然后正常使用 n 即可
|
||||
|
||||
sudo n stable
|
||||
```
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: nodesource
|
||||
---
|
||||
|
||||
## Nodesource 镜像使用帮助
|
||||
|
||||
Nodesource 为 debian, ubuntu, fedora, RHEL 等发行版提供预编译的 nodejs
|
||||
和 npm 等软件包。
|
||||
|
||||
### debian/ubuntu 使用方法
|
||||
|
||||
运行
|
||||
|
||||
```bash
|
||||
curl -sL https://deb.nodesource.com/setup | sudo bash - # or
|
||||
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash - # or
|
||||
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
|
||||
```
|
||||
|
||||
编辑 `/etc/apt/sources.list.d/nodesource.list`,把
|
||||
`https://deb.nodesource.com/node/` 替换为
|
||||
`https://{{ site.hostname }}/nodesource/deb/` 即可。
|
||||
|
||||
如果是 `https://deb.nodesource.com/node_10.x/` ,则改为 `https://{{ site.hostname }}/nodesource/deb_10.x/` 。
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: openwrt
|
||||
---
|
||||
|
||||
## OpenWRT (LEDE) 镜像使用帮助
|
||||
|
||||
OpenWRT(曾用名 LEDE)是一款广泛应用于路由器的嵌入式操作系统。本站提供 OpenWRT 的包管理器 `opkg` 的镜像,以加快国内访问速度。
|
||||
|
||||
### 手工替换
|
||||
|
||||
登录到路由器,并编辑 `/etc/opkg/distfeeds.conf` 文件,将其中的 `downloads.openwrt.org` 替换为 `{{ site.hostname }}/openwrt` 即可。
|
||||
|
||||
### 自动替换
|
||||
|
||||
执行如下命令自动替换
|
||||
|
||||
```
|
||||
sed -i 's_downloads.openwrt.org_{{ site.hostname }}/openwrt_' /etc/opkg/distfeeds.conf
|
||||
```
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: packagist
|
||||
---
|
||||
|
||||
## PHP 包仓库 Packagist 索引镜像使用帮助
|
||||
|
||||
执行以下命令即可将 Composer 默认仓库设置为本站:
|
||||
|
||||
```
|
||||
composer config -g repos.packagist composer https://{{ site.hostname }}/packagist/index
|
||||
```
|
||||
|
||||
该镜像只包含包索引,不含包的内容,主要目的是加快 composer 读取软件包索引的速度。
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: proxmox
|
||||
---
|
||||
|
||||
## Proxmox 镜像使用帮助
|
||||
|
||||
新建 `/etc/apt/sources.list.d/pve-no-subscription.list`,内容为:
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="jessie">Debian 8 (Jessie)</option>
|
||||
<option data-os="debian" data-release="stretch">Debian 9 (Stretch)</option>
|
||||
<option data-os="debian" data-release="buster" selected>Debian 10 (Buster)</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/proxmox/{{os_name}} {{release_name}} pve-no-subscription
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
ISO安装文件下载:[https://{{ site.hostname }}/proxmox/iso/](https://{{ site.hostname }}/proxmox/iso/)
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: pybombs
|
||||
---
|
||||
|
||||
PyBOMBS 镜像使用帮助
|
||||
===================
|
||||
|
||||
|
||||
[PyBOMBS](http://gnuradio.org/redmine/projects/pybombs/wiki) (Python Build Overlay Managed Bundle System) 是 [GNU Radio](http://gnuradio.org/) 的包管理系统。
|
||||
|
||||
从头开始一键安装GNU Radio在Thinkpad X230上实测大约只需要40分钟,下载非常快,主要的时间就剩编译了。 而且安装的都是最新的版本。
|
||||
|
||||
另外,PyBOMBS会帮你解决依赖的问题,省得每次敲一堆make cmake命令了。
|
||||
|
||||
以前自己拖代码回来经常会被重置,而且耗时要几个小时。
|
||||
|
||||
|
||||
**使用示例**
|
||||
|
||||
```bash
|
||||
sudo pip install pybombs
|
||||
rm -rf ~/.pybombs
|
||||
pybombs recipes add gr-recipes git+https://{{ site.hostname }}/pybombs/recipes/gr-recipes.git
|
||||
pybombs recipes add gr-etcetera git+https://{{ site.hostname }}/pybombs/recipes/gr-etcetera.git
|
||||
mkdir gnuradio-prefix
|
||||
cd gnuradio-prefix
|
||||
pybombs prefix init
|
||||
pybombs install gnuradio
|
||||
. ./setup_env.sh
|
||||
gnuradio-companion
|
||||
|
||||
pybombs install rtl-sdr hackrf bladeRF gr-osmosdr gr-bluetooth gr-ieee-80211
|
||||
```
|
||||
|
||||
**更新**
|
||||
|
||||
由于 PyBOMBS 的 recipes 只能通过 git 仓库进行发布。而我们暂时不想维护一个复杂的 git 分支合并历史。所以更新时,需要将 recipe 仓库删除,然后再重新添加回来。(见[讨论](http://lists.gnu.org/archive/html/discuss-gnuradio/2016-06/msg00170.html))
|
||||
|
||||
```bash
|
||||
pybombs recipes remove gr-recipes
|
||||
pybombs recipes remove gr-etcetera
|
||||
pybombs recipes add gr-recipes git+https://{{ site.hostname }}/pybombs/recipes/gr-recipes.git
|
||||
pybombs recipes add gr-etcetera git+https://{{ site.hostname }}/pybombs/recipes/gr-etcetera.git
|
||||
```
|
||||
|
||||
- 本镜像使用 <http://github.com/scateu/pybombs-mirror> 脚本进行构建。
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: pypi
|
||||
---
|
||||
|
||||
## pypi 镜像使用帮助
|
||||
|
||||
pypi 镜像每 5 分钟同步一次。
|
||||
|
||||
### 临时使用
|
||||
|
||||
```
|
||||
pip install -i https://{{ site.pypi }}/simple some-package
|
||||
```
|
||||
|
||||
注意,`simple` 不能少, 是 `https` 而不是 `http`
|
||||
|
||||
### 设为默认
|
||||
|
||||
升级 pip 到最新的版本 (>=10.0.0) 后进行配置:
|
||||
|
||||
```
|
||||
pip install pip -U
|
||||
pip config set global.index-url https://{{ site.pypi }}/simple
|
||||
```
|
||||
|
||||
如果您到 pip 默认源的网络连接较差,临时使用本镜像站来升级 pip:
|
||||
|
||||
```
|
||||
pip install -i https://{{ site.pypi }}/simple pip -U
|
||||
```
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: qemu.git
|
||||
---
|
||||
|
||||
## QEMU Git 镜像使用帮助
|
||||
|
||||
如需克隆 QEMU 代码,使用
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/qemu.git
|
||||
```
|
||||
|
||||
若要将 tuna mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/qemu.git
|
||||
```
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/qemu.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: raspberry-pi-os
|
||||
---
|
||||
|
||||
## Raspberry Pi OS 镜像使用帮助
|
||||
|
||||
### Raspberry Pi OS 简介
|
||||
|
||||
Raspberry Pi OS (原 Raspbian) 是专门用于 ARM 卡片式计算机 Raspberry Pi® “树莓派”的操作系统,
|
||||
其基于 Debian 开发,针对 Raspberry Pi 硬件优化。
|
||||
|
||||
Raspberry Pi OS 由树莓派的开发与维护机构 The Raspberry Pi Foundation
|
||||
“树莓派基金会” 官方支持,并推荐用作树莓派的首选系统。
|
||||
|
||||
### 系统架构与版本
|
||||
|
||||
架构:
|
||||
|
||||
* arm64
|
||||
* armhf
|
||||
|
||||
版本:
|
||||
|
||||
* wheezy
|
||||
* jessie
|
||||
* stretch
|
||||
* buster
|
||||
|
||||
注:Raspberry Pi OS 系统由于从诞生开始就基于(为了armhf,也必须基于)当时还是
|
||||
testing 版本的 7.0/wheezy,所以 Raspberry Pi OS 不倾向于使用 stable/testing
|
||||
表示版本。
|
||||
|
||||
### 使用说明
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>选择你的 Raspberry Pi OS 对应的 Debian 版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-release="wheezy">Debian 7 (wheezy)</option>
|
||||
<option data-release="jessie">Debian 8 (jessie)</option>
|
||||
<option data-release="stretch">Debian 9 (stretch)</option>
|
||||
<option data-release="buster" selected>Debian 10 (buster)</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
# 编辑 `/etc/apt/sources.list` 文件,删除原文件所有内容,用以下内容取代:
|
||||
deb http://{%endraw%}{{ site.hostname }}{%raw%}/raspberry-pi-os/raspbian/ {{release_name}} main non-free contrib rpi
|
||||
deb-src http://{%endraw%}{{ site.hostname }}{%raw%}/raspberry-pi-os/raspbian/ {{release_name}} main non-free contrib rpi
|
||||
|
||||
# 编辑 `/etc/apt/sources.list.d/raspi.list` 文件,删除原文件所有内容,用以下内容取代:
|
||||
deb http://{%endraw%}{{ site.hostname }}{%raw%}/raspberrypi/ {{release_name}} main ui
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
编辑镜像站后,请使用`sudo apt-get update`命令,更新软件源列表,同时检查您的编辑是否正确。
|
||||
|
||||
|
||||
### 相关链接
|
||||
|
||||
#### Raspberry Pi OS 链接
|
||||
|
||||
* Raspberry Pi OS 主页: [https://www.raspberrypi.org/downloads/raspberry-pi-os/](https://www.raspberrypi.org/downloads/raspberry-pi-os/)
|
||||
* 文档:[https://www.raspberrypi.org/documentation/raspbian/](https://www.raspberrypi.org/documentation/raspbian/)
|
||||
* Bug 反馈:[https://www.raspberrypi.org/forums/viewtopic.php?t=243717](https://www.raspberrypi.org/forums/viewtopic.php?t=243717)
|
||||
* 镜像列表: [http://www.raspbian.org/RaspbianMirrors](http://www.raspbian.org/RaspbianMirrors)
|
||||
|
||||
#### 树莓派链接
|
||||
|
||||
* 树莓派基金会主页: [https://www.raspberrypi.org/](https://www.raspberrypi.org/)
|
||||
* 树莓派基金会论坛 Raspberry Pi OS 版块: [https://raspberrypi.org/forums/viewforum.php?f=66](https://raspberrypi.org/forums/viewforum.php?f=66)
|
||||
|
||||
### 关于本文档
|
||||
|
||||
本文档内容的原始版本由 Raspberry Pi
|
||||
中文社区“树莓爱好者论坛”提供。按照[知识共享署名-非商业性使用
|
||||
3.0
|
||||
中国大陆许可协议](http://creativecommons.org/licenses/by-nc/3.0/cn/)授权清华大学镜像站使用。
|
||||
|
||||
TUNA 提供的修改版本同样使用[知识共享署名-非商业性使用
|
||||
3.0
|
||||
中国大陆许可协议](http://creativecommons.org/licenses/by-nc/3.0/cn/)。
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: repo-ck
|
||||
---
|
||||
|
||||
## Archlinux repo-ck 镜像使用帮助
|
||||
|
||||
[repo-ck](http://repo-ck.com/) 是
|
||||
[Arch](https://archlinux.org/) 的非官方仓库,内有包含 ck
|
||||
补丁、BFS
|
||||
调度器等,通用或为特定CPU架构优化过的内核,以及内核相关的软件包,是居家旅行,优化折腾的必备良药。更多内容,参考
|
||||
[ArchWiki](https://wiki.archlinux.org/index.php/repo-ck)。
|
||||
|
||||
### 食用方法
|
||||
|
||||
在 `/etc/pacman.conf` 里添加
|
||||
|
||||
```
|
||||
[repo-ck]
|
||||
Server = https://{{ site.hostname }}/repo-ck/$arch
|
||||
```
|
||||
|
||||
再增加 GPG 信任:
|
||||
|
||||
```
|
||||
pacman-key -r 5EE46C4C && pacman-key --lsign-key 5EE46C4C
|
||||
```
|
||||
|
||||
之后 `pacman -Sy` 即可。
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: ros
|
||||
---
|
||||
|
||||
## ROS 镜像使用帮助
|
||||
|
||||
|
||||
新建 `/etc/apt/sources.list.d/ros-latest.list`,内容为:
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian/Ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="jessie">Debian 8 (Jessie)</option>
|
||||
<option data-os="debian" data-release="stretch">Debian 9 (Stretch)</option>
|
||||
<option data-os="ubuntu" data-release="trusty">Ubuntu 14.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="xenial">Ubuntu 16.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="bionic" selected>Ubuntu 18.04 LTS</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/ros/ubuntu/ {{release_name}} main
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
然后再输入如下命令,信任ROS的GPG Key,并更新索引:
|
||||
|
||||
```
|
||||
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
|
||||
sudo apt update
|
||||
```
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: ros2
|
||||
---
|
||||
|
||||
## ROS2 镜像使用帮助
|
||||
|
||||
|
||||
新建 `/etc/apt/sources.list.d/ros2-latest.list`,内容为:
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian/Ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="stretch">Debian 9 (Stretch)</option>
|
||||
<option data-os="debian" data-release="buster">Debian 10 (Buster)</option>
|
||||
<option data-os="ubuntu" data-release="xenial">Ubuntu 16.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="bionic" selected>Ubuntu 18.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="focal">Ubuntu 20.04 LTS</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/ros2/ubuntu/ {{release_name}} main
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
然后再输入如下命令,信任 ROS 的 GPG Key,并更新索引:
|
||||
|
||||
```
|
||||
sudo apt install curl gnupg2
|
||||
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
Reference: https://index.ros.org/doc/ros2/Installation/Crystal/Linux-Install-Binary/
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: rpmfusion
|
||||
---
|
||||
|
||||
## RPMFusion 镜像使用帮助
|
||||
|
||||
### 安装基础包
|
||||
|
||||
首先安装提供基础配置文件和 GPG 密钥的 `rpmfusion-*.rpm`。Fedora 用户可使用如下命令:
|
||||
|
||||
```
|
||||
sudo yum install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
||||
```
|
||||
|
||||
或者如下直接用 TUNA 镜像中的 rpm 包:
|
||||
|
||||
```
|
||||
sudo yum install --nogpgcheck https://{{ site.hostname }}/rpmfusion/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://{{ site.hostname }}/rpmfusion/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
||||
```
|
||||
|
||||
注意:没有将当前用户设为管理员的用户,需要将 `sudo CMD` 替换为 `su -c 'CMD'`,并输入 root 密码。
|
||||
|
||||
### 修改链接指向 TUNA 镜像
|
||||
|
||||
安装成功后,修改 `/etc/yum.repos.d/` 目录下以 `rpmfusion` 开头,以 `.repo` 结尾的文件。具体而言,需要将文件中的 `baseurl=` 开头的行等号后面链接中的 `http://download1.rpmfusion.org/` 替换为 `https://{{ site.hostname }}/rpmfusion/`,替换后的文件类似如下:
|
||||
|
||||
```
|
||||
[rpmfusion-free]
|
||||
name=RPM Fusion for Fedora $releasever - Free
|
||||
baseurl=https://{{ site.hostname }}/rpmfusion/free/fedora/releases/$releasever/Everything/$basearch/os/
|
||||
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-$releasever&arch=$basearch
|
||||
enabled=1
|
||||
metadata_expire=7d
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever-$basearch
|
||||
|
||||
[rpmfusion-free-debuginfo]
|
||||
name=RPM Fusion for Fedora $releasever - Free - Debug
|
||||
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-debug-$releasever&arch=$basearch
|
||||
enabled=0
|
||||
metadata_expire=7d
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever-$basearch
|
||||
|
||||
[rpmfusion-free-source]
|
||||
name=RPM Fusion for Fedora $releasever - Free - Source
|
||||
baseurl=https://{{ site.hostname }}/rpmfusion/free/fedora/releases/$releasever/Everything/source/SRPMS/
|
||||
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-source-$releasever&arch=$basearch
|
||||
enabled=0
|
||||
metadata_expire=7d
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever-$basearch
|
||||
```
|
||||
|
||||
### 更多
|
||||
|
||||
RHEL/CentOS 用户请参考 [RPMFusion 官方指南][rpmfusion]。
|
||||
|
||||
[rpmfusion]: http://rpmfusion.org/Configuration
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: rudder
|
||||
---
|
||||
|
||||
## Rudder APT/YUM 镜像使用帮助
|
||||
|
||||
|
||||
### Debian/Ubuntu 用户
|
||||
|
||||
|
||||
再选择你的 Debian/Ubuntu 版本,文本框中内容写进 `/etc/apt/sources.list.d/rudder.list`
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian/Ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="jessie">Debian 8 (Jessie)</option>
|
||||
<option data-os="debian" data-release="stretch">Debian 9 (Stretch)</option>
|
||||
<option data-os="debian" data-release="buster" selected>Debian 10 (Buster)</option>
|
||||
<option data-os="ubuntu" data-release="trusty">Ubuntu 14.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="xenial">Ubuntu 16.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="bionic">Ubuntu 18.04 LTS</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/rudder/apt/6.0 {{release_name}} main
|
||||
</script>
|
||||
{%endraw%}
|
||||
|
||||
|
||||
### RHEL/CentOS 用户
|
||||
|
||||
新建 `/etc/yum.repos.d/rudder.repo`,内容为:
|
||||
|
||||
```
|
||||
[Rudder_6.0]
|
||||
name=Rudder 6.0
|
||||
baseurl=https://{{ site.hostname }}/rudder/rpm/rudder6.0-RHEL_$releasever/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://repository.rudder.io/rpm/rudder_rpm_key.pub
|
||||
```
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: stackage
|
||||
---
|
||||
|
||||
## stackage 镜像使用帮助
|
||||
|
||||
本镜像推荐与 TUNA 的 [Hackage 镜像](https://{{ site.hostname }}/help/hackage/)配合使用。
|
||||
|
||||
### stack >= v2.3.1
|
||||
|
||||
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`), 加上:
|
||||
|
||||
```yaml
|
||||
setup-info-locations: ["http://{{ site.hostname }}/stackage/stack-setup.yaml"]
|
||||
urls:
|
||||
latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json
|
||||
```
|
||||
|
||||
### stack >= v2.1.1
|
||||
|
||||
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`), 加上:
|
||||
|
||||
```yaml
|
||||
setup-info: "http://{{ site.hostname }}/stackage/stack-setup.yaml"
|
||||
urls:
|
||||
latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json
|
||||
```
|
||||
|
||||
### stack < v2.1.1
|
||||
|
||||
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`), 加上:
|
||||
|
||||
```yaml
|
||||
setup-info: "http://{{ site.hostname }}/stackage/stack-setup.yaml"
|
||||
urls:
|
||||
latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json
|
||||
lts-build-plans: http://{{ site.hostname }}/stackage/lts-haskell/
|
||||
nightly-build-plans: http://{{ site.hostname }}/stackage/stackage-nightly/
|
||||
```
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: tensorflow
|
||||
---
|
||||
|
||||
# TensorFlow 镜像使用帮助
|
||||
|
||||
请通过 pypi 安装 TensorFlow。当前 tensorflow 这个仓库已经不再更新,保留下来仅仅是历史原因。
|
||||
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: termux
|
||||
---
|
||||
|
||||
Termux 镜像使用帮助
|
||||
===================
|
||||
|
||||
Termux 是什么
|
||||
-------------
|
||||
|
||||
> Termux is a terminal emulator and Linux environment bringing powerful terminal access to Android.
|
||||
|
||||
Termux 是运行在 Android 上的 terminal。不需要root,运行于内部存储(不在SD卡上)。
|
||||
|
||||
自带了一个包管理器,可以安装许多现代化的开发和系统维护工具。比如:
|
||||
|
||||
* neovim
|
||||
* tmux
|
||||
* zsh
|
||||
* clang
|
||||
* gcc
|
||||
* weechat
|
||||
* irssi
|
||||
* ...
|
||||
|
||||
如何使用 Termux 镜像
|
||||
------------------
|
||||
|
||||
### 自动替换
|
||||
|
||||
使用如下命令自动替换官方源为 TUNA 镜像源
|
||||
|
||||
``` bash
|
||||
sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://{{ site.hostname }}/termux/termux-packages-24 stable main@' $PREFIX/etc/apt/sources.list
|
||||
sed -i 's@^\(deb.*games stable\)$@#\1\ndeb https://{{ site.hostname }}/termux/game-packages-24 games stable@' $PREFIX/etc/apt/sources.list.d/game.list
|
||||
sed -i 's@^\(deb.*science stable\)$@#\1\ndeb https://{{ site.hostname }}/termux/science-packages-24 science stable@' $PREFIX/etc/apt/sources.list.d/science.list
|
||||
apt update && apt upgrade
|
||||
```
|
||||
|
||||
### 手动修改
|
||||
|
||||
编辑 `$PREFIX/etc/apt/sources.list` 修改为如下内容
|
||||
|
||||
```
|
||||
# The termux repository mirror from TUNA:
|
||||
deb https://{{ site.hostname }}/termux/termux-packages-24 stable main
|
||||
```
|
||||
|
||||
编辑 `$PREFIX/etc/apt/sources.list.d/science.list` 修改为如下内容
|
||||
|
||||
```
|
||||
# The termux repository mirror from TUNA:
|
||||
deb https://{{ site.hostname }}/termux/science-packages-24 science stable
|
||||
```
|
||||
|
||||
编辑 `$PREFIX/etc/apt/sources.list.d/game.list` 修改为如下内容
|
||||
|
||||
```
|
||||
# The termux repository mirror from TUNA:
|
||||
deb https://{{ site.hostname }}/termux/game-packages-24 games stable
|
||||
```
|
||||
请使用内置或安装在 Termux 里的文本编辑器,例如 `vi` / `vim` / `nano` 等,**不要使用 RE 管理器等其他具有 ROOT 权限的外部 APP** 来修改 Termux 的文件
|
||||
|
||||
### 社区源
|
||||
|
||||
镜像站还提供了如下社区维护的源,如需使用请自行添加:
|
||||
|
||||
- https://{{ site.hostname }}/termux/x11-packages
|
||||
- https://{{ site.hostname }}/termux/unstable-packages
|
||||
- https://{{ site.hostname }}/termux/termux-root-packages-24
|
||||
|
||||
### 警告
|
||||
|
||||
镜像仅适用于 Android 7.0 (API 24) 及以上版本,旧版本系统使用本镜像可能导致程序错误。
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: ubuntu
|
||||
---
|
||||
|
||||
Ubuntu 镜像使用帮助
|
||||
===================
|
||||
|
||||
Ubuntu 的软件源配置文件是
|
||||
`/etc/apt/sources.list`。将系统自带的该文件做个备份,将该文件替换为下面内容,即可使用
|
||||
TUNA 的软件源镜像。
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>选择你的ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-release="precise">12.04 LTS</option>
|
||||
<option data-release="trusty">14.04 LTS</option>
|
||||
<option data-release="xenial">16.04 LTS</option>
|
||||
<option data-release="bionic">18.04 LTS</option>
|
||||
<option data-release="focal" selected>20.04 LTS</option>
|
||||
<option data-release="disco">19.04</option>
|
||||
<option data-release="eoan">19.10</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/ubuntu/ {{release_name}} main restricted universe multiverse
|
||||
# deb-src https://{%endraw%}{{ site.hostname }}{%raw%}/ubuntu/ {{release_name}} main restricted universe multiverse
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/ubuntu/ {{release_name}}-updates main restricted universe multiverse
|
||||
# deb-src https://{%endraw%}{{ site.hostname }}{%raw%}/ubuntu/ {{release_name}}-updates main restricted universe multiverse
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/ubuntu/ {{release_name}}-backports main restricted universe multiverse
|
||||
# deb-src https://{%endraw%}{{ site.hostname }}{%raw%}/ubuntu/ {{release_name}}-backports main restricted universe multiverse
|
||||
deb https://{%endraw%}{{ site.hostname }}{%raw%}/ubuntu/ {{release_name}}-security main restricted universe multiverse
|
||||
# deb-src https://{%endraw%}{{ site.hostname }}{%raw%}/ubuntu/ {{release_name}}-security main restricted universe multiverse
|
||||
|
||||
# 预发布软件源,不建议启用
|
||||
# deb https://{%endraw%}{{ site.hostname }}{%raw%}/ubuntu/ {{release_name}}-proposed main restricted universe multiverse
|
||||
# deb-src https://{%endraw%}{{ site.hostname }}{%raw%}/ubuntu/ {{release_name}}-proposed main restricted universe multiverse
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
本镜像仅包含 32/64 位 x86 架构处理器的软件包,在 ARM、PowerPC 架构的设备上(对应官方源为ports.ubuntu.com)请使用ubuntu-ports镜像(地址 https://{{ site.hostname }}/ubuntu-ports/ )。
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: voidlinux
|
||||
---
|
||||
|
||||
# Voidlinux 镜像使用帮助
|
||||
|
||||
使用如下命令替换为本镜像:
|
||||
|
||||
```
|
||||
# mkdir -p /etc/xbps.d
|
||||
# cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
|
||||
# sed -i 's|https://alpha.de.repo.voidlinux.org|https://{{ site.hostname }}/voidlinux|g' /etc/xbps.d/*-repository-*.conf
|
||||
```
|
||||
|
||||
之后可用 `xbps-query -L` 检查是否正确替换。
|
||||
|
||||
参考[官方教程](https://docs.voidlinux.org/xbps/repositories/mirrors/changing.html)。
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: alpine
|
||||
---
|
||||
|
||||
Alpine 镜像使用帮助
|
||||
===================
|
||||
|
||||
> Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.
|
||||
|
||||
Alpine Linux 是一个面向安全,轻量级的基于musl libc与busybox项目的Linux发行版。
|
||||
|
||||
在终端输入以下命令以替换TUNA镜像源:
|
||||
```
|
||||
sed -i 's/dl-cdn.alpinelinux.org/{{ site.hostname }}/g' /etc/apk/repositories
|
||||
```
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: virtualbox
|
||||
---
|
||||
|
||||
# VirtualBox 镜像使用帮助
|
||||
|
||||
[Oracle Virtualbox](https://www.virtualbox.org/) VirtualBox 是一款开源虚拟机软件。由德国 Innotek 公司开发,Sun Microsystems 公司出品。使用Qt编写,在 Sun 被 Oracle 收购后正式更名成 Oracle VM VirtualBox。采用 GPL 协议开源。
|
||||
|
||||
## Microsoft Windows
|
||||
|
||||
[点击下载 Windows 最新版](https://{{ site.hostname }}/virtualbox/virtualbox-Win-latest.exe)
|
||||
|
||||
|
||||
## Macintosh OS X
|
||||
|
||||
[点击下载 OS X 最新版](https://{{ site.hostname }}/virtualbox/virtualbox-osx-latest.dmg)
|
||||
|
||||
# Linux
|
||||
|
||||
## 通过编译好的二进制包安装
|
||||
|
||||
访问该镜像下最新的目录(例如`5.0.24`),找到名为<发行版名称>~<发行代号>~<架构> 的文件。
|
||||
如 `virtualbox-5.0_5.0.24-108355~Ubuntu~xenial_i386.deb` 下载安装即可。
|
||||
|
||||
目前支持的系统有:
|
||||
|
||||
* Ubuntu
|
||||
* Debian
|
||||
* Fedora
|
||||
* openSUSE
|
||||
* SUSE Linux Enterprise Server
|
||||
* Oracle Linux / Red Hat Enterprise Linux / CentOS
|
||||
|
||||
如果您所使用的发行版不在上述列表之内,请下载通用的`run`文件(例如`VirtualBox-5.0.24-108355-Linux_x86.run`),然后使用 `chmod +x` 给予执行权限后,直接安装即可。
|
||||
|
||||
### 通过包管理器安装
|
||||
|
||||
#### Debian / Ubuntu 用户
|
||||
|
||||
首先信任 Virtualbox 的 GPG 公钥:
|
||||
|
||||
对于 Debian 8 和 Ubuntu 16.04 及以上:
|
||||
|
||||
```shell
|
||||
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
|
||||
```
|
||||
|
||||
其他版本
|
||||
|
||||
```shell
|
||||
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
|
||||
```
|
||||
|
||||
再选择你的 Debian/Ubuntu 版本,将文本框中内容写进`/etc/apt/sources.list.d/virtualbox.list`
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>你的Debian/Ubuntu版本: </label>
|
||||
<select class="form-control release-select" data-template="#apt-template" data-target="#apt-content">
|
||||
<option data-os="debian" data-release="buster" selected>Debian 10 (Buster)</option>
|
||||
<option data-os="debian" data-release="stretch">Debian 9 (Stretch)</option>
|
||||
<option data-os="debian" data-release="jessie">Debian 8 (Jessie)</option>
|
||||
<option data-os="ubuntu" data-release="bionic">Ubuntu 18.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="xenial">Ubuntu 16.04 LTS</option>
|
||||
<option data-os="ubuntu" data-release="trusty">Ubuntu 14.04 LTS</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p></p>
|
||||
<pre>
|
||||
<code id="apt-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
{% raw %}
|
||||
<script id="apt-template" type="x-tmpl-markup">
|
||||
deb {{if os_name|equals>ubuntu}}https{{else}}http{{/if}}://{%endraw%}{{ site.hostname }}{%raw%}/virtualbox/apt/ {{release_name}} contrib
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
安装 VirtualBox:
|
||||
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install virtualbox-5.0
|
||||
```
|
||||
|
||||
### RHEL/CentOS 用户
|
||||
|
||||
|
||||
新建 `/etc/yum.repos.d/virtualbox.repo`,内容为
|
||||
|
||||
```
|
||||
[virtualbox]
|
||||
name=Virtualbox Repository
|
||||
baseurl=https://{{ site.hostname }}/virtualbox/rpm/el$releasever/
|
||||
gpgcheck=0
|
||||
enabled=1
|
||||
```
|
||||
|
||||
刷新缓存并安装 `virtualbox` 即可。
|
||||
|
||||
```
|
||||
sudo yum makecache
|
||||
sudo yum install VirtualBox-5.1
|
||||
```
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: repoforge
|
||||
---
|
||||
|
||||
# Repoforge (原Rpmforge) 镜像使用帮助
|
||||
|
||||
[Repoforge](http://repoforge.org/) 是 RHEL 系统下的软件仓库,拥有 10000 多个软件包,被认为是最安全、最稳定的一个软件仓库。
|
||||
|
||||
## 添加 Repoforge 仓库
|
||||
|
||||
1. 运行 `cat /etc/redhat-release` 获取 EL 版本号(如 EL6, EL7 等)
|
||||
2. 向系统中添加 Repoforge 的 GPG 公钥:
|
||||
```
|
||||
rpm --import https://{{ site.hostname }}/repoforge/RPM-GPG-KEY.dag.txt
|
||||
```
|
||||
3. 运行下列命令:
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>选择你的 EL 版本: </label>
|
||||
<select class="form-control release-select" data-template="#yum-template" data-target="#yum-content">
|
||||
<option data-release="el7" selected>EL7</option>
|
||||
<option data-release="el6">EL6</option>
|
||||
<option data-release="el5">EL5</option>
|
||||
<option data-release="el4">EL4</option>
|
||||
<option data-release="el3">EL3</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% raw %}
|
||||
<script id="yum-template" type="x-tmpl-markup">
|
||||
sudo cat > /etc/yum.repos.d/rpmforge.repo << EOF
|
||||
[rpmforge]
|
||||
name = RHEL $releasever - RPMforge.net - dag
|
||||
baseurl = https://{%endraw%}{{ site.hostname }}{%raw%}/repoforge/redhat/{{release_name}}/en/$basearch/rpmforge
|
||||
mirrorlist = http://mirrorlist.repoforge.org/{{release_name}}/mirrors-rpmforge
|
||||
enabled = 1
|
||||
protect = 0
|
||||
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
|
||||
gpgcheck = 1
|
||||
|
||||
[rpmforge-extras]
|
||||
name = RHEL $releasever - RPMforge.net - extras
|
||||
baseurl = https://{%endraw%}{{ site.hostname }}{%raw%}/repoforge/redhat/{{release_name}}/en/$basearch/extras
|
||||
mirrorlist = http://mirrorlist.repoforge.org/{{release_name}}/mirrors-rpmforge-extras
|
||||
enabled = 0
|
||||
protect = 0
|
||||
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
|
||||
gpgcheck = 1
|
||||
|
||||
[rpmforge-testing]
|
||||
name = RHEL $releasever - RPMforge.net - testing
|
||||
baseurl = https://{%endraw%}{{ site.hostname }}{%raw%}/repoforge/redhat/{{release_name}}/en/$basearch/testing
|
||||
mirrorlist = http://mirrorlist.repoforge.org/{{release_name}}/mirrors-rpmforge-testing
|
||||
enabled = 0
|
||||
protect = 0
|
||||
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
|
||||
gpgcheck = 1
|
||||
EOF
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="yum-content">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
## 更新软件包缓存
|
||||
|
||||
```
|
||||
sudo yum makecache
|
||||
```
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: rubygems
|
||||
---
|
||||
|
||||
# Ruby Gems 镜像使用帮助
|
||||
|
||||
## `gem`
|
||||
|
||||
使用以下命令替换 gems 默认源
|
||||
|
||||
```bash
|
||||
# 添加 TUNA 源并移除默认源
|
||||
gem sources --add https://{{ site.hostname }}/rubygems/ --remove https://rubygems.org/
|
||||
# 列出已有源
|
||||
gem sources -l
|
||||
# 应该只有 TUNA 一个
|
||||
```
|
||||
|
||||
或者,编辑 `~/.gemrc`,将 `https://{{ site.hostname }}/rubygems/` 加到 `sources` 字段。
|
||||
|
||||
## `bundler`
|
||||
|
||||
使用以下命令替换 bundler 默认源
|
||||
```bash
|
||||
bundle config mirror.https://rubygems.org https://{{ site.hostname }}/rubygems
|
||||
```
|
||||
|
||||
官方文档: http://bundler.io/v1.16/man/bundle-config.1.html#MIRRORS-OF-GEM-SOURCES
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: bioconductor
|
||||
---
|
||||
|
||||
[Bioconductor](https://www.bioconductor.org) 镜像使用帮助
|
||||
===================
|
||||
|
||||
Bioconductor 镜像源配置文件之一是 `.Rprofile` (linux 下位于 `~/.Rprofile` )。
|
||||
|
||||
|
||||
在文末添加如下语句:
|
||||
|
||||
```
|
||||
options(BioC_mirror="https://{{ site.hostname }}/bioconductor")
|
||||
```
|
||||
|
||||
打开R即可使用该 Bioconductor 镜像源安装 Bioconductor 软件包。
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: CRAN
|
||||
---
|
||||
|
||||
CRAN 镜像使用帮助
|
||||
===================
|
||||
|
||||
[CRAN](https://cran.r-project.org/) (The Comprehensive R Archive Network) 镜像源配置文件之一是 `.Rprofile` (linux 下位于 `~/.Rprofile` )。
|
||||
|
||||
|
||||
在文末添加如下语句:
|
||||
|
||||
```
|
||||
options("repos" = c(CRAN="https://{{ site.hostname }}/CRAN/"))
|
||||
```
|
||||
|
||||
打开 R 即可使用该 CRAN 镜像源安装 R 软件包。
|
||||
|
||||
Ubuntu 下添加CRAN镜像安装r
|
||||
====================================
|
||||
参考[(README里的步骤)](https://{{ site.hostname }}/CRAN/bin/linux/ubuntu/README.html)
|
||||
|
||||
例如 `Ubuntu 18.04` 编辑 `sudo vim /etc/apt/sources.list.d/r-tuna.list` 输入
|
||||
`deb https://{{ site.hostname }}/CRAN/bin/linux/ubuntu bionic-cran40/` (注意根据你的发行版替换`bionic`,根据需要的版本号替换`cran40`)
|
||||
|
||||
然后运行
|
||||
```
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
|
||||
sudo apt-get update
|
||||
sudo apt-get install r-base-dev
|
||||
```
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: llvm
|
||||
---
|
||||
|
||||
## LLVM Git Repos 镜像使用帮助
|
||||
|
||||
本镜像镜像了官方的以下仓库:
|
||||
|
||||
```
|
||||
http://llvm.org/git/{llvm,clang,libcxx,lldb,clang-tools-extra,polly,zorg,compiler-rt,libcxxabi,lld,lnt}
|
||||
```
|
||||
若需要其他的仓库,可从 [LLVM 官方](http://llvm.org) 或者 [GitHub 镜像](https://github.com/llvm-mirror) 获取。
|
||||
使用方法:
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/llvm/{reponame}.git
|
||||
```
|
||||
|
||||
其中`{reponame}`为上述的仓库名称之一。请注意:由于仓库体积均较大,执行`git clone`可能需要较长时间,并且没有进度提示,请耐心等候。
|
||||
|
||||
若要将 TUNA mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/llvm/{reponame}.git
|
||||
```
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/llvm/{reponame}.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: CTAN
|
||||
---
|
||||
|
||||
CTAN 镜像使用帮助
|
||||
===================
|
||||
|
||||
[CTAN](https://www.ctan.org/) (The Comprehensive TeX Archive Network) 镜像源可以使用 TeX Live 管理器 `tlmgr` 更改。
|
||||
|
||||
在命令行中执行
|
||||
|
||||
```
|
||||
tlmgr option repository https://{{ site.hostname }}/CTAN/systems/texlive/tlnet
|
||||
```
|
||||
|
||||
即可永久更改镜像源。
|
||||
|
||||
如果只需要临时切换,可以用如下命令:
|
||||
|
||||
```
|
||||
tlmgr update --all --repository https://{{ site.hostname }}/CTAN/systems/texlive/tlnet
|
||||
```
|
||||
|
||||
其中的 `update --all` 指令可根据需要修改。
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: openthos-src
|
||||
---
|
||||
|
||||
# OpenTHOS 源代码镜像使用帮助
|
||||
|
||||
**注意: 本镜像是 OpenTHOS 源代码的镜像,如果是希望下载 OpenTHOS 的安装镜像,请访问 <https://{{ site.hostname }}/openthos/>。**
|
||||
|
||||
OpenTHOS 是基于 Android x86 的一套具有自主知识产权的开源桌面操作系统。其源代码获取方式类似于 AOSP,
|
||||
但需要将上游地址指向 `https://{{ site.hostname }}/git/openthos-src/manifest`。
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue