How to Setup a Speed Test Server
TestMy.net Hosted Speed Test is not a standalone program. It requires processing by the TestMy.net home server. The portion of the program that resides on the host server is a controller that allows TestMy.net to use the hosts resources for speed testing. Working in conjunction with the TestMy.net server results in minimal resources being required on the host end. Hosting a TestMy.net speed test does not require any programming knowledge but does require basic server administration knowledge. If you would like to skip this process please contact me with your TestMy.net username, server address and SSH/FTP credentials. I'll be happy to set everything up for you.
- LAMP server preferred (Linux, Apache, MySQL & PHP)
- SourceGuardian Loader
- Apache mod_rewrite must be enabled
- To enable large upload tests you must have access to edit php.ini
Initial Setup Instructions
If you know what you're doing and follow these instructions you can have this setup in 5-10 minutes.
First, edit your php.ini. If you don't know where this is or can't find it, you should stop and contact me for install. You need to change the following variables to enable large uploads and long tests. Just search for them and change to the values below.
If you don't have access to php.ini you can also try configuring this via .htaccess in the root folder of the domain.
Optional Linux TCP Tuning / sysctl.conf and txqueuelen Tweaks
This is optional but highly recommended. It's a very quick and easy tweak and can make a big difference in the quality of the speed test server, especially over long distances.
First, edit /etc/sysctl.conf
# nano /etc/sysctl.conf
Add the following to the end of the file.Let's apply those settings...
# sysctl -pNow we need to increase the The Transmit Queue Length (txqueuelen). List your available network interfaces,
# ip link showUsually, eth0 and eth1 are what you will be working with. Now, edit /etc/rc.local,
# nano /etc/rc.localFor a common dual nic setup add the following to the end of the file, also enter them one at a time in the command prompt to apply the settings right away.
There are many ways to tune your TCP settings in linux but the settings above work well for most situations, search Google for Linux TCP Tuning.
Upload the Source
After you've got a server up and running download the latest source and extract and upload the contents of the 'tmn' folder to a folder on your http server called 'tmn'. CHMOD the folder and it contents 755. Current build was
# cd /path/to/public_html # wget http://testmy.net/tmn/testmynet-speedtest.tar.gz # tar xvzf testmynet-speedtest.tar.gz # chmod 755 tmn -Rf
Make sure mod_rewrite is working
This is critical if you want your mirror to work with everything. To test if it's working properly try the following in your address bar http://[your.site.url]/tmn/SmarTest/down. If mod_rewrite is enabled and working properly that url will initiate a download speed test. If not, you'll get a 404 error. To troubleshoot this go to http://[your.site.url]/tmn/phpinfo.php, search the page for "mod_rewrite" (obviously without the quotes). Finding that will show you that you've got it installed. If not installed, install it. Use Google, you seem smart enough to figure that out. ;)
Now, let's add something to httpd.conf. Two ways it can be done, change the current config for your domain from "AllowOverride None" to "AllowOverride All" or add the following lines.
Almost done! Double check and send to Damon
If everything is working as it should be you'll be able open http://[your.site.url]/tmn in your browser and see a message telling you that 'it should work'. You should also be able to initiate a test with http://[your.site.url]/tmn/SmarTest/down - You're almost done, you've got a dummy key file that needs to be replaced and a few things need to be done on my end to approve your mirror. Just contact me with your username, site address and server location and I'll send back a key file specific to your domain and your new test server will be allowed to use all of TestMy.net's tools. Requests usually take less than 24 to 48 hours. Your speed test will not properly work until your site specific key have been installed.
Please check periodically for updates. Current build was . To avoid overwriting your key file please use the update download. Just overwrite all the current files with the new versions.
# cd /path/to/public_html # wget http://testmy.net/tmn/testmynet-speedtest-update.tar.gz # tar xvzf testmynet-speedtest-update.tar.gz
Want more control?
TestMy.net has been around for a very long time but releasing source for public use is brand new. An array of functions and customization options for your mirror will be coming soon. I've chosen to release this very early in the development process so early adopters have a lot to look forward to in the future. Theming, branding and calling functions of the program within your website will all be future possibilities.