OS: Android - Mirror Source: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs)
No edit summary
Onnowpurbo (talk | contribs)
No edit summary
Line 1: Line 1:
Using a local mirror
Untuk beberapa client sekaligus, sebaiknya kita menggunakan mirror. Asumsinya kita melalukan mirror pada /usr/local/aosp/mirror.
 
When using several clients, especially in situations where bandwidth is scarce, it is better to create a local mirror of the entire server content, and to sync clients from that mirror (which requires no network access). The download for a full mirror is smaller than the download of two clients, while containing more information.
 
These instructions assume that the mirror is created in /usr/local/aosp/mirror. The first step is to create and sync the mirror itself, which uses close to 13GB of network bandwidth and a similar amount of disk space. Notice the --mirror flag, which can only be specified when creating a new client:
 
Lakukan sebagai user biasa
Lakukan sebagai user biasa


Line 15: Line 10:
  repo sync
  repo sync


Once the mirror is synced, new clients can be created from it. Note that it's important to specify an absolute path:
Di sisi client, dapat melakukan sebagai userbiasa
 
Lakukan sebagai userbiasa


  mkdir -p /usr/local/aosp/master
  mkdir -p /usr/local/aosp/master
Line 24: Line 17:
  repo sync
  repo sync


Finally, to sync a client against the server, the mirror needs to be synced against the server, then the client against the mirror:
Untuk melakukan sync, lakukan secara berurut, dari sisi mirror dan dari sisi master.


  $ cd /usr/local/aosp/mirror
  $ cd /usr/local/aosp/mirror
Line 31: Line 24:
  $ repo sync
  $ repo sync


It's possible to store the mirror on a LAN server and to access it over NFS, SSH or Git. It's also possible to store it on a removable drive and to pass that drive around between users or between machines.  
Mirror dapat dilakukan melalui NFS, SSH atau Git.





Revision as of 03:30, 10 August 2013

Untuk beberapa client sekaligus, sebaiknya kita menggunakan mirror. Asumsinya kita melalukan mirror pada /usr/local/aosp/mirror. Lakukan sebagai user biasa

sudo mkdir -p /usr/local/aosp/mirror
sudo mount --bind /media/onno/onnolibrary/repository/android-source/mirror/ /usr/local/aosp/mirror/
sudo chmod -Rf 777 /usr/local/aosp
sudo chown -Rf nobody.nogroup /usr/local/aosp
cd /usr/local/aosp/mirror
repo init -u https://android.googlesource.com/mirror/manifest --mirror
repo sync

Di sisi client, dapat melakukan sebagai userbiasa

mkdir -p /usr/local/aosp/master
cd /usr/local/aosp/master
repo init -u /usr/local/aosp/mirror/platform/manifest.git
repo sync

Untuk melakukan sync, lakukan secara berurut, dari sisi mirror dan dari sisi master.

$ cd /usr/local/aosp/mirror
$ repo sync
$ cd /usr/local/aosp/master
$ repo sync

Mirror dapat dilakukan melalui NFS, SSH atau Git.


Referensi