Line 8: |
Line 8: |
| | | |
| ===Figures=== | | ===Figures=== |
− | ====Harddisk size==== | + | ====Hard disk size==== |
− | The amount of physical harddisk size taken up by the contribs.org data will be about 30Gb, the [http://mirror.contribs.org/smeserver/release /release] tree, which holds the iso images and the repositories, accounts for about 6Gb of said amount. The [http://mirror.contribs.org/smeserver/contribs /contribs] tree will account for a little over 1Gb of the total. | + | The amount of physical hard disk size taken up by the contribs.org data will be about 30Gb, the [http://mirror.contribs.org/smeserver/release /release] tree, which holds the iso images and the repositories, accounts for about 6Gb of said amount. The [http://mirror.contribs.org/smeserver/contribs /contribs] tree will account for a little over 1Gb of the total. |
| The obsolete directory accounts for 16Gb, and the testing directory which include the next version SME8 is 7Gb big. | | The obsolete directory accounts for 16Gb, and the testing directory which include the next version SME8 is 7Gb big. |
| | | |
Line 21: |
Line 21: |
| | | |
| ====Preparing your system==== | | ====Preparing your system==== |
− | <ol><li>Create a storage location for mirror | + | <ol><li>Create a storage location for mirror<br/> |
− | mkdir -p {/path/to/your/data/store/}
| + | <pre>mkdir -p /path/to/your/data/store/</pre> |
| </li><li>Create a new user to perform sync<br/>If you are running SME Server you can create the user through the server-manager panel. | | </li><li>Create a new user to perform sync<br/>If you are running SME Server you can create the user through the server-manager panel. |
| </li><li>Now it is time to download the ftpsync script and all files it requires: | | </li><li>Now it is time to download the ftpsync script and all files it requires: |
Line 29: |
Line 29: |
| tar zxof ftpsync.tgz | | tar zxof ftpsync.tgz |
| </li><li>Change the ownership of the directories to the new user | | </li><li>Change the ownership of the directories to the new user |
− | chown -R ''{user}'' bin etc log .ssh ''{/path/to/your/data/store/}'' | + | chown -R {user} bin etc log .ssh {/path/to/your/data/store/} |
| </li><li>Now we have installed and set things up as is required but we will need to update the configuration file to point to the storage location of the data (TO) in the config file (etc/ftpsync.conf). Use your favorite text editor for it.</li></ol> | | </li><li>Now we have installed and set things up as is required but we will need to update the configuration file to point to the storage location of the data (TO) in the config file (etc/ftpsync.conf). Use your favorite text editor for it.</li></ol> |
| | | |
| ====Testing your setup==== | | ====Testing your setup==== |
| <ol><li>Now it is time to perform the initial sync (and test that script does what it needs to) | | <ol><li>Now it is time to perform the initial sync (and test that script does what it needs to) |
− | su - ''{user}'' -s /bin/bash
| + | <pre>su - user -s /bin/bash |
− | ~/bin/ftpsync
| + | ~/bin/ftpsync</pre> |
| </li><li>Now check heck the logs to see if there are any errors. Since the initial sync will take a lot of time you can best do this in a second terminal window: | | </li><li>Now check heck the logs to see if there are any errors. Since the initial sync will take a lot of time you can best do this in a second terminal window: |
| cd ~/log | | cd ~/log |
Line 63: |
Line 63: |
| {{Incomplete}} | | {{Incomplete}} |
| <ol><li>, but you will need to enable bash as the shell for this user. | | <ol><li>, but you will need to enable bash as the shell for this user. |
− | db accounts setprop ''{user}'' Shell /bin/bash | + | db accounts setprop {user} Shell /bin/bash |
− | signal-event user-modify ''{user}'' | + | signal-event user-modify {user} |
| </li><li>Append the keys to the authorized_keys file of the user | | </li><li>Append the keys to the authorized_keys file of the user |
| cat .ssh/pushmirror-*.pub >> .ssh/authorized_keys | | cat .ssh/pushmirror-*.pub >> .ssh/authorized_keys |
Line 71: |
Line 71: |
| We prefer you configure your mirror to be setup as a push mirror, but if you can not do so or have other ways for not doing so you can just schedule a cron job to run every 2 hours that does the exact same sync command you do to get the mirror in the first place, you can add a comment like in the example below: | | We prefer you configure your mirror to be setup as a push mirror, but if you can not do so or have other ways for not doing so you can just schedule a cron job to run every 2 hours that does the exact same sync command you do to get the mirror in the first place, you can add a comment like in the example below: |
| | | |
− | 1 */2 * * * ''{user}'' ~/bin/ftpsync | + | 1 */2 * * * {user} ~/bin/ftpsync |
| | | |
| ====Advertising your mirror==== | | ====Advertising your mirror==== |