Difference between revisions of "Suggested Server Requirements"

From Dreamwidth Notes
Jump to: navigation, search
(moving more stuff to here)
(64-bit (x86_64 typically, NOT i686/i386): Easy way to tell whether your Perl is 32-bit or 64-bit.)
Line 22: Line 22:
 
But if you absolutely do not have a 64 bit system, then you might still be okay.  Don't use memcache and don't try to use more than 30 friend groups and you shouldn't run into any big issues.  You will also have to change the pack functions in Entry.pm from using NNNQN to NNNLN to avoid a "Invalid type 'Q' in pack" error when posting to a journal.
 
But if you absolutely do not have a 64 bit system, then you might still be okay.  Don't use memcache and don't try to use more than 30 friend groups and you shouldn't run into any big issues.  You will also have to change the pack functions in Entry.pm from using NNNQN to NNNLN to avoid a "Invalid type 'Q' in pack" error when posting to a journal.
  
If you're not sure whether you have a 64 bit system or not, check out the collection of tips on this page: http://www.stata.com/products/64bit.html
+
If you're not sure whether you have a 64 bit system or not, the easiest way to tell is to run the following command at the command prompt for your system:
 +
 
 +
<!-- ... which doesn't have to be bash, despite the highlighting used here -->
 +
<source lang="bash">
 +
perl -e 'print length(sprintf("%b", ~0)) . "\n";'
 +
</source>
 +
 
 +
The resulting value printed will be '32' or '64', depending on whether you have a 32-bit or 64-bit compiled Perl, which is often the easiest way to tell as a 64-bit Perl won't run on a 32-bit system, and it's unlikely to have a 32-bit Perl running on a 64-bit system.
 +
 
 +
However, you may also want to check out the collection of tips on this page: http://www.stata.com/products/64bit.html
  
 
=== 512mb RAM ===
 
=== 512mb RAM ===

Revision as of 21:40, 26 March 2009

This document is designed to outline our resources on setting up the DW code on your server. There is, currently, a high expectation of "tech savvy." If you do not know what sudo is or how to get a root console, then you probably are going to get pretty lost in this. Instead, you may want to request a Dreamhacks account.

Doesn't mean you shouldn't try, but forewarned is forearmed!

Help can be found on IRC or on the mailing lists. You might also like Setting up Dreamwidth on Linode for a quick and easy way to get your own Dreamhack set up on a hosting service. There is also Dreamwidth Scratch Installation and Running Dreamwidth on a Mac OS X system.

Requirements

Here is what you'll want for a development environment. Sure, you can probably get away with less or different, but that's not what we're going to support. The DW code is known to work with the following. But we'd love to hear of your results using something else.

Linux based server

We are presently using Ubuntu. This may stay or become Debian or Centos at some point, that's undecided. But for now, Ubuntu is the supported distro. If you use anything else, you will need to be familiar enough with the differences to work out any different steps on your own. (But we'd love to hear success stories and get documentation for other ones!)

Notes for other OSes:

64-bit (x86_64 typically, NOT i686/i386)

This is something you can probably get away without doing, but you'll be unable to test some things and others might be a bit wonky. Notably, you need the 64 bit version of Perl in order for the pack/unpack operations to work for memcache.

But if you absolutely do not have a 64 bit system, then you might still be okay. Don't use memcache and don't try to use more than 30 friend groups and you shouldn't run into any big issues. You will also have to change the pack functions in Entry.pm from using NNNQN to NNNLN to avoid a "Invalid type 'Q' in pack" error when posting to a journal.

If you're not sure whether you have a 64 bit system or not, the easiest way to tell is to run the following command at the command prompt for your system:

perl -e 'print length(sprintf("%b", ~0)) . "\n";'

The resulting value printed will be '32' or '64', depending on whether you have a 32-bit or 64-bit compiled Perl, which is often the easiest way to tell as a 64-bit Perl won't run on a 32-bit system, and it's unlikely to have a 32-bit Perl running on a 64-bit system.

However, you may also want to check out the collection of tips on this page: http://www.stata.com/products/64bit.html

512mb RAM

I have gotten away with less. Depends on how much traffic you expect and what else you are running on the box. Also, if you intend on running TheSchwartz workers or not. If you do not, and you only run the web site code, then it will probably work on 256.

Dedicated!

The LJ/DW code is pretty heavy, and doesn't like other things running. You should expect that if you are not that technical, you will need a fairly blank server to run it on. But if you are technical you can do some pretty convoluted setups... (This one is more of a recommendation and not a hard requirement.)

root

If you do not have root on the box, you are in for a rough road. Sure, the code doesn't need root privileges to run. But there are a lot of libraries that need to be installed on the system. If you are using a shared development environment where the owner has installed the modules for you, then you should be fine, but keep in mind that you will not be able to run the code on the standard HTTP port (80) as a non-root user.

MySQL

You will need a MySQL database. It can be local or remote, it doesn't matter really. As long as you have the ability to create/drop/alter tables in a directory, that's what matters.

Suitable hosting

These hosts are reported to have suitable plans for running Dreamwidth code:

They are both VPS hosting plans that will give you full root access at a decent price--about $20 a month.