Monday, December 25, 2017

create cygwin repository

1- create directory cygwin in /var/www/html/cygwin
$ sudo mkdir /var/www/html/cygwin
$ chmod 777 /var/www/html/cygwin -R 


2- start sync
$ cd /var/www/html/cygwin
$ rsync -r -a -v rsync://ftp.yzu.edu.tw/pub/cygwin/ .

--- list of cygwin mirror
rsync://mirror.vinahost.vn/cygwin/
rsync://mirror.qnren.qa:/cygwin/
rsync://mirror.datacenter.by/cygwin/
rsync://mirror.easyname.at/cygwin/
rsync://ftp.fau.de/cygwin/
rsync://ftp.inf.tu-dresden.de/cygwin/
rsync://ftp.acc.umu.se/mirror/cygwin/
rsync://mirrors.kernel.org/sourceware/cygwin/
rsync://rsync.osuosl.org/cygwin/

-full list below
https://cygwin.com/mirrors.html

3- after rsync finish, we create a apache2 vhost to serve as local cygwin repository
- create file //etc/apache2/sites-enabled/cygwin.conf with the following content
<VirtualHost *:80>
    ServerName www.cygwin.repo
    DocumentRoot  /var/www/html/cygwin
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


remember to create dns record to edit hosts file to map name www.cygwin.repo to the server ip address


4- restart apache2 service and we are ready on the server path
$ sudo /etc/init.d/apache2 restart


how we can use use the repo with the url www.cygwin.repo, or use "install from local directory" and browse to the directory.

2 comments: