-
Notifications
You must be signed in to change notification settings - Fork 6
Setup your own A.R.M Service
- Linux OS server with 250GB of storage(1yr packages)
- Bash & Rsync
- Python 3.3+, distribute
- Node.js 0.10.13+ with NPM
- NGINX 0.7+
A simple package sync script using rsync can be found here, change UPSTREAM
and REPOS
to fit your location and environment.
Note: Dont setup cronjob so hurry, leave it there and continue with next step.
Make sure you have Python 3.3+ and distribute installed. setup will need setuptool
package.
-
Download
archrepo2
0.3.1 athttps://github.com/lilydjwg/archrepo2/archive/v0.3.1.tar.gz
and extract to a temp directory. -
cd archrepo2
, executesudo python setup.py install
as superuser. Note: you may have to usepython3
instead ofpython
in some distros. -
After setup archrepo2,
archreposrv
command should be available. Now editarchrepo.ini.example
for your need, and move to/etc/repo-arm/archrepo.ini
. If you just want a pre-written configuration, use this one.
Make sure you have Node.js 0.10.13+ with NPM support.
-
Clone the app:
git clone https://github.com/phoenixlzx/repo-arm-server.git
-
Install dependencies:
cd repo-arm-server && npm install
-
Edit
config.js.example
, and rename toconfig.js
.
-
Use these two NGINX configurations:
https://github.com/archlinuxcn/repo-arm-server/tree/master/NGINX
-
Edit them for your environment, then restart NGINX.
Note: Daily-repo functionality is awaiting implementation. You may have to update repo-arm-download.nginx.conf
after we have made it.
For servers, tmux/screen/byobu is recommended as SSH may be reset under some network.
-
Sync your packages. It may take long time for first sync, so detach the session and have a rest. After it finished first sync, setup your sync schedule using cronjob (or other schedule tool).
-
Start archrepo2, command
archreposrv /etc/repo-arm/archrepo.ini
. This may also spend long for first time (too many packages need to be written into database). -
Start repo-arm-server, in repo-arm-server directory do
node app.js
and it should up and running.
Now your A.R.M site is ready for use. If you run into any trouble, please open a new issue containing all your configurations.