Check faster mirror before installation

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,643
Location
A Coruña, Spain
Hi,

i would propose that setup.sh check faster mirror before start installation so the script will use the neares/faster mirror instead of always files.directadmin.com

Was thinkin about that cause im working on an automatic installation script and ive noticed is always downloading from files (faster to me should be files6) with 150Kb/s of max speed.

I know i prolly should just edit hosts file and add it manually, but, should be a nice feature, not so much used, but nice.

Thanks
 
I tried the same by rewriting the setup.sh file before executing, but it still uses files.directadmin.com. In our case, files6 would be much faster as well.
 
Hello,

Yes, that's the plan.

Right now, around where it asks for option 1/2 (customapache/custombuild), I want to change it to get the actual build script, instead of the "options" script, as I don't like the redundant code of the options script (since it's always correct/updated in "build"). Anyway, once that's done, we'll have the "./build set_fastest" command downloaded and ready to go, so would be called at that point (at first, with a y/n question, and automated once we're happy it works).

The actual install.sh would then need to be updated to read the options.conf, for the part where it grabs the services.tar.gz file, since that's not part of the set_fastest system yet.


Until that's done, current options:

1) set your /etc/hosts, as described in the slow download guide

2) Or... a cleaner method (to be compatible with the options.conf setup) would be to create the options.conf before running the setup.sh. The installer will respect the options.conf if it's already there.

3) In addition to either method, if you download the services.tar.gz before running the setup.sh, and extract it, DA will also respect that, and won't re-download it.


So creating the options.conf as desired, and downloading/extracting the services.tar.gz before running the setup.sh will essentially accomplish the fastest download possible, for now. One I get it all implemented, it won't be needed.

John
 
Ok, im currently using the option.conf way so i can have my custom software setup (and ive already put my mirror in that file ofc).

For the services.tar.gz will depend on OS release, so i need to way cause my bash scripting is not so advanced to check what OS you got and download the services file needed.

Ill use the host way aswell for services.tar.gz for now.

Thanks
 
Im having a doubt at the moment regarding hosts file.

If the server is hosting just the domain (let make an example fiels11.directadmin.com) via directadmin (so virtualhost) and you set files.directadmin.com with the ip of files11.directadmin.com in /etc/hosts does it will work?

I suppose no, cause the server will be "listening" just for the files11.directadmin.com and not any other... Am i wrong?

Regards

EDIT: No, im right! Just tested... with a virtualhost configured to host just files11 use hosts way will never work cause server will always refuse the non-present virtualhosts.

Regards
 
well it work if the server you are going to "contact" is not set as virtualhost.

Let me try explain.

Ive started to be a DA mirror with dns files11.directadmin.com

For use that, ive just made a new user in directadmin with that domain as domain.

So, directadmin created the user with his own httpd.conf that use virtualhost files11.directadmin.com and as far as i know will never accept connections for files.directadmin.com or *.directadmin.com except the one added

So, for make it work with the hosts way the mirror have to be in /var/www/html/ and not in a "limited" user, am i right?

Actually, i prefer the way ive used for security, statistics and a sort of order in the paths.

Well, actually the hosts way doesnt work just for me and just with my own mirror.

Regards
 
You should set a dedicated (private) IP for the account with your mirror to be able to serve all connections to :80 port despite on hostname in request headers.
 
Just add an "alias" domain pointer into the files11.directadmin.com domain as files.directadmin.com, so that either will work on that IP. Downloads are not done with IP only, the hostname is always used.

John
 
interesting, I didnt know there was mirrors. Hopefully files6 is much faster as the main one seems sluggish.
 
Back
Top