Relay

From DreamHost
Jump to: navigation, search
The instructions provided in this article or section require shell access unless otherwise stated.

You can use the PuTTY client on Windows, or SSH on UNIX and UNIX-like systems such as Linux or Mac OS X.
Your account must be configured for shell access in the Control Panel.
More information may be available on the article's talk page.


Prepare for Relay

You will need a database for this

Create a database

When you got

  • hostname (not localhost)
  • databasename
  • username
  • password

You can continue

Install Relay

Login to your shell and browse to the folder where you want the relay folder to be

cd ~/mydomain.com

Download the latest distro

wget http://ecosmear.com/relay/download.php?download=true

Unpack the file

unzip relay*.zip

Remove the zipfile

rm relay*.zip

Change permissions

chmod 755 relay/
chmod 755 relay/upload.pl
chmod 755 relay/uploads/
chmod 755 relay/filestore/

We have to make a little manual workaround to get the uploading to work.

Open install/index.php

nano relay/install/index.php

Search for file_get_contents..

Replace

$response = file_get_contents($uploadPath);

With

$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt($ch, CURLOPT_URL, $uploadPath);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$response = curl_exec($ch);
curl_close($ch);

Save the file

You wont need the shell from now on

Configure Relay

Now open up FF or another browser and go to http://yourdomain.com/relay/install/index.php

You should now see a pretty form where you should supply

  • Database Hostname (NOT localhost)
  • Database Name
  • Database User
  • Database Password
  • Admin Name - Changes as you wish
  • Admin Password - Change as you wish
  • GhostScripts should be changed to /usr/bin/gs/
  • ImageMagick should be changed to /usr/bin/convert

Click the button at the bottom.

You should now see a "log" where the last line is

Verifying Perl Installation... for the upload script @ http://yourdomain.com/relay/upload.pl?test ...done...

Now browse to http://yourdomain.com/relay/

You should be able to login with the admin name and password you entered in the beginning.

Please note that due to the 8M memory_limit imposed by Dreamhost (regardless of custom php.ini),you will be limited to 16MB uploads, and the download cart will fail to zip large files as well.

External links

Thx to
{"cc_re__cc_re__cc_by_sa_3_0_us": ["ble version of this page [p]\" accesskey=\"p\">Printable version</a></li>\n\t\t\t\t<li id=\"t-permalink\"><a href=\"/index.php?title=Relay&amp;oldid=26296\" title=\"Permanent link to this revision of the page\">Permanent link</a></li>\n\t\t\t\t<li id=\"t-info\"><a href=\"/index.php?title=Relay&amp;action=info\">Page information</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div><!-- end of the left (by default at least) column -->\n<div class=\"visualClear\"></div>\n<div id=\"footer\" role=\"contentinfo\">\n\t<div id=\"f-copyrightico\">\n\t\t<a href=\"http://creativecommons.org/licenses/by-sa/3.0/us/\"><img src=\"/images/cc-by-sa.png\" alt=\"Creative Commons Attribution-Share Alike 3.0 United States License\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<div id=\"f-poweredbyico\">\n\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/skins/common/images/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<ul id=\"f-list\">\n\t\t<li id=\"lastmod\"> This page was last modified on 12 May 2010, at 14:03.</li>\n\t\t<li id=\"viewcount\">This page has been accessed 13,648 times.</li>\n\t\t<li", "ve Commons Attribution-Share Alike 3.0 United States License\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<div id=\"f-poweredbyico\">\n\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/skins/common/images/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<ul id=\"f-list\">\n\t\t<li id=\"lastmod\"> This page was last modified on 12 May 2010, at 14:03.</li>\n\t\t<li id=\"viewcount\">This page has been accessed 13,648 times.</li>\n\t\t<li id=\"copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/licenses/by-sa/3.0/us/\">Creative Commons Attribution-Share Alike 3.0 United States License</a> unless otherwise noted.</li>\n\t\t<li id=\"privacy\"><a href=\"/DreamHost:Privacy_policy\" title=\"DreamHost:Privacy policy\">Privacy policy</a></li>\n\t\t<li id=\"about\"><a href=\"/DreamHost:About\" title=\"DreamHost:About\">About DreamHost</a></li>\n\t\t<li id=\"disclaimer\"><a href=\"/DreamHost:General_disclaimer\" title=\"DreamHost:General disclaimer\">Disclaimers</a></li>\n\t</ul>\n</div>\n</div>\n<script>/*<![CDATA[*/window.jQuery && jQuery.ready();/"], "copyright__copyright__copyright": ["", "w see a \"log\" where the last line is\n\nVerifying Perl Installation... for the upload script @ http://yourdomain.com/relay/upload.pl?test ...done...\n\nNow browse to http://yourdomain.com/relay/\n\nYou should be able to login with the admin name and password you entered in the beginning.\n\nPlease note that due to the 8M memory_limit imposed by Dreamhost (regardless of custom php.ini),you will be limited to 16MB uploads, and the download cart will fail to zip large files as well.\n\nExternal links\n\nThx to", "w see a \"log\" where the last line is\n\nVerifying Perl Installation... for the upload script @ http://yourdomain.com/relay/upload.pl?test ...done...\n\nNow browse to http://yourdomain.com/relay/\n\nYou should be able to login with the admin name and password you entered in the beginning.\n\nPlease note that due to the 8M memory_limit imposed by Dreamhost (regardless of custom php.ini),you will be limited to 16MB uploads, and the download cart will fail to zip large files as well.\n\nExternal links\n\nThx to"]}