mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-28 14:29:25 +08:00
misc corrections
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18728 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
------------------------------
|
||||
|
||||
=======================================================================
|
||||
WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
|
||||
WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
|
||||
-----------------------------------------------------------------------
|
||||
This is a preliminary version. Do not rely on anything here.
|
||||
Please send feedback, corrections etc to mplayer-mirror.
|
||||
Please send feedback + corrections to the mplayer-mirror mailing list.
|
||||
=======================================================================
|
||||
|
||||
About this document
|
||||
@@ -23,59 +23,66 @@ A note on performance issues
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
A few of the commands used here will generate some load on our main server.
|
||||
Executed too often and by to many clients at once will overload our server
|
||||
and cause a performance degradation for all our users. Thus we kindly ask
|
||||
you to be considerate about what you do. We do not want to restrict mirroring
|
||||
to a few selected people, but this requires that everyone using the system
|
||||
outlined here to behave.
|
||||
Too many clients executing them at once will overload our server and cause
|
||||
a performance degradation for all our users. Thus we kindly ask you to be
|
||||
considerate about what you do. We do not want to restrict mirroring to a
|
||||
few select people, but this requires everyone using the system described
|
||||
here to behave.
|
||||
|
||||
|
||||
Outline of the mirroring system
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The mirroring system uses rsync to transfere the data and to perform
|
||||
updates. A script is provided to call the rsync client with the right
|
||||
set of parameters. This script should be called periodicaly with cron.
|
||||
Additionaly, official mirrors should set up an ssh account so that
|
||||
updates can be triggered when important updates on the main server
|
||||
The mirroring system uses rsync to transfer the data and to perform
|
||||
updates. A script (update_mplayer_rsync) is provided to call the rsync
|
||||
client with the right set of parameters. This script should be run
|
||||
periodically via cron.
|
||||
Additionally, official mirrors should set up an ssh account so that
|
||||
updates can be triggered when important changes on the main server
|
||||
are performed.
|
||||
Mirrors should provide their data over http or ftp or both. Each official
|
||||
mirror will be assigned a mirror number. This mirror number determines
|
||||
the hostname over which it will be reached.
|
||||
Mirrors should provide their data over HTTP or FTP or both. Each official
|
||||
mirror will be assigned a mirror number (wwwXXX.mplayerhq.hu or
|
||||
ftpXXX.mplayerhq.hu where XXX is the mirror number). This mirror
|
||||
number determines the hostname over which it will be reached.
|
||||
|
||||
|
||||
Getting the data, mirroring script and cron setup
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The mirroring script to be used is provided over the svn repo at
|
||||
svn://svn.mplayerhq.hu/mplayer/trunk/DOCS/tech/mirrors/update_mplayer_rsync .
|
||||
The mirroring script is located in our Subversion repository at
|
||||
|
||||
svn://svn.mplayerhq.hu/mplayer/trunk/DOCS/tech/mirrors/update_mplayer_rsync
|
||||
|
||||
or on the web at
|
||||
|
||||
http://svn.mplayerhq.hu/*checkout*/mplayer/trunk/DOCS/tech/mirrors/update_mplayer_rsync
|
||||
|
||||
This script requires a working `rsync` client. The handling of the
|
||||
lock file is done by using `lockfile` from the procmail package.
|
||||
Using a lock file is recommended but not necessary. The temporary file
|
||||
generation is handled by `mktemp` which is available on from
|
||||
http://www.mktemp.org/mktemp/ .
|
||||
generation is handled by `mktemp` which is available from
|
||||
http://www.mktemp.org/mktemp/ .
|
||||
|
||||
The script contains a few configuration variables at the begining that
|
||||
can and should be set:
|
||||
PATH: The $PATH to be used within the script (recommended).
|
||||
LOCK: The full path to the lock file to be used
|
||||
(/var/lock/mplayer-mirror-lock or something similar, recommended).
|
||||
LOCK: The full path to the lock file to be used (/var/lock/mplayer-mirror-lock
|
||||
or something similar, recommended).
|
||||
MIRROR_ROOT: The root of the mirror. This is the directory where all files
|
||||
are downloaded to (required).
|
||||
MAILADR: The mail address where reports should be send to (required).
|
||||
TMPDIR: The directory where the temporary should be created.
|
||||
If you set this explicitly, you have to uncomment the export below too.
|
||||
(defaults to /tmp if not set)
|
||||
are downloaded to (required).
|
||||
MAILADR: The mail address where reports should be sent to (required).
|
||||
TMPDIR: The directory where temporary files should be created.
|
||||
If you set this explicitly, you have to uncomment the export below
|
||||
(defaults to /tmp if not set).
|
||||
|
||||
Install this script and set the variables according to your setup. Then run
|
||||
it once to get the first checkout of the mirror. This will require at the
|
||||
time of this writing (2006-06-10) about 500MB of disk space.
|
||||
it once to get the first checkout of the mirror. This will require (at the
|
||||
time of this writing - 2006-06) about 500MB of disk space.
|
||||
You should get two directories in your $MIRROR_ROOT: homepage and MPlayer.
|
||||
The former containing the html pages for the mirror and the later the
|
||||
files for download.
|
||||
The former containing the HTML pages for the mirror and the latter the
|
||||
downloadable files.
|
||||
|
||||
If this worked out ok, you should set up a cron job that periodicaly updates
|
||||
If this worked out OK, you should set up a cron job that periodically updates
|
||||
the files. If you run an official mirror you should run the script every
|
||||
6h to 12h (6h recommended). If you do not run an official mirror, you should
|
||||
not run the script more often than once a day. Please use an "odd" time
|
||||
@@ -93,34 +100,33 @@ Especially DO NOT REMOVE the -t and -W options. These prevent calculating
|
||||
checksums on the server side which are very expensive.
|
||||
|
||||
|
||||
Setting up an ssh account for update triggers
|
||||
Setting up an SSH account for update triggers
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Official mirrors should also provide an ssh based trigger to run the
|
||||
update script on request. This makes it possible to distribute releases
|
||||
and other important files imediatly to all mirrors.
|
||||
Official mirrors should provide an ssh-based trigger to run the update script
|
||||
on request. This makes it possible to distribute releases and other important
|
||||
files immediately to all mirrors.
|
||||
|
||||
The way it is set up does not need a special user other than the one
|
||||
with which the update script is run already and does not allow to run
|
||||
any other command.
|
||||
The setup does not need a special user other than the one as which the update
|
||||
script is run and does not allow running any other command.
|
||||
|
||||
First you need to create an ssh key pair by running the following command:
|
||||
First you need to create an ssh key pair by running:
|
||||
---
|
||||
ssh-keygen -t dsa -C MPHQ_rsync_trigger -f www#_sshkey
|
||||
---
|
||||
(replace the '#' by your mirror number)
|
||||
|
||||
You should send the private key to us by mail and specify the host and
|
||||
user to be used. Please do use a private mail of one of us and DO NOT
|
||||
send the private key onto the mirror mailinglist.
|
||||
user to be used. Please use a private mail of one of the admins and
|
||||
DO NOT send the private key to the mirror mailing list.
|
||||
|
||||
The public key should be placed into the ~/.ssh/authorized_keys file of the
|
||||
user. To restrict the sshkey to one command only please place the follwoing
|
||||
directives at the begining of the line with the key:
|
||||
from="*.mplayerhq.hu",command="<path_to_update_mplayer_rsync"
|
||||
The public key should be placed in the ~/.ssh/authorized_keys file of the
|
||||
user running the updates. To restrict the ssh key to only one command place
|
||||
the following directives at the begining of the line with the key:
|
||||
from="*.mplayerhq.hu",command="<path_to_update_mplayer_rsync>"
|
||||
e.g.:
|
||||
---
|
||||
from="*.mplayerhq.hu",command="/path/to/update_mplayer_all" ssh-dss AAAA
|
||||
from="*.mplayerhq.hu",command="/path/to/update_mplayer_rsync" ssh-dss AAAA
|
||||
B3NzaC1kc3MAAAEBAI20yhE3/bRjzojUhhMz4DHnGhcJUiPWOfoP9CygnFOYOxJTFlxgqM3iJiHWRxgK
|
||||
FJ/Uw40eV9K4Ww4fp2pe1guXJzKna8+6vBXaPPVEVxSyaxgtt4Xt3zpUuCnNljgArcEhwcNyOyH2RVln
|
||||
yhyxsrKhuq5ZoNHD3caBGjZu3eOR2atPGS1NOdeN/hytIoh8T8DicPqPI29yWX9yAjnHv6wdPutwMLu6
|
||||
|
||||
Reference in New Issue
Block a user