PDA

View Full Version : Custom mirror for files (Custombuild)



zEitEr
12-16-2010, 01:40 AM
Hello,

Our ISP has very bad channels to files.directadmin.com. As a result it's pain to wait files to be fully retrieved from directadmin's file storage.

That's why it would be great to allow us in options.conf to set our own server or just fix fileserver option. I'm not sure what for is it, if it doesn't work? It doesn't switch file server for us in Custombuild 1.1.

DirectAdmin Support
12-16-2010, 03:17 AM
Hello,

I've actually been working on this and do have a script that scans all of our mirrors systems for the fastest connection (still in a work in progress though)

For the time being, you can use this guide to set your /etc/hosts to use one of our mirrors which is closest/fastest for you.

http://help.directadmin.com/item.php?id=305

John

zEitEr
12-16-2010, 03:32 AM
Thanks John.

I'll try it.

And what about fileserver option? Is it supposed to change fileservers manually? Will it be fixed?

scsi
12-16-2010, 06:16 AM
Strange I never knew there was more than one server.

zEitEr
12-16-2010, 10:05 AM
@scsi
If you run Directadmin install.sh, it will ask which server to use
1 USA
2 Europe

I've always chosen the second. But now I've discovered:

1. There're more than two locations and serves.
2. The option does not change anything in custombuild. Not sure about install.sh (need to examine the script).

scsi
12-16-2010, 11:04 AM
I always thought there were 2 servers.

1. USA - Ran by Directadmin company
2. EU - Hosted by Smtalk on custombuild.eu

Its nice to know they have a cluster of systems incase one goes down.

I havent looked through the code of the install.sh or custombuild in a while to notice they had multiple servers.

DirectAdmin Support
12-16-2010, 01:31 PM
I checked over the code and the use of that variable is not yet implemented. I'm not sure if we'll use it or not. The new system I wrote uses a text file/list of servers for fastest connection, which gives us more flexibility if any go up/down. Sort of like a versions.txt, but it's a servers.txt.

John

zEitEr
12-16-2010, 09:20 PM
Ok. Let's wait for the new system.

Thanks for your reply John.

zEitEr
12-17-2010, 01:10 AM
For the time being, you can use this guide to set your /etc/hosts to use one of our mirrors which is closest/fastest for you.

http://help.directadmin.com/item.php?id=305

It worked for me, great.
One change I had to do, is to add line in /etc/hosts in another order:

You suggest:


files.directadmin.com 81.26.221.44

That did not work on FreeBSD (not checked on CentOS)


69.30.193.202 files.directadmin.com

I swaped IP with hostname.

DirectAdmin Support
12-17-2010, 01:47 AM
Thanks, it was backwards. I've updated the guide.

John

@how@
12-18-2010, 01:31 PM
Nice work John, thanks.

zEitEr
12-21-2010, 12:30 AM
Thanks John for the option


downloadserver=files.directadmin.com

DirectAdmin Support
12-21-2010, 02:10 AM
That's just step 1. Then next step is a call that will try all servers and set that value to be the fastest mirror. Once it's out, tested, and working, the "fastest" check may then be a default call at install time so everyone uses their fastest locations.

John

scsi
12-21-2010, 06:21 AM
Matters on what you mean by fastest?

Latency or actual download speed?

DirectAdmin Support
12-21-2010, 02:24 PM
Fastest speed. The script downloads a ~100k file and grabs the speed result from the wget output. It's not in the scripts yet.

John

Meesterlijk
12-23-2010, 02:44 AM
Hi John,

The added speedtest code in CB script results in syntax error on FreeBSD:


./build: 8211: Syntax error: "(" unexpected

DirectAdmin Support
12-23-2010, 11:08 AM
Thanks for the report. I've updated the script with a fix.

John