Unity3d Asset Cache Server on Linux

UPDATED: see my follow up post about backgrounding and firewall

So I was trying to get the new unity3d 3.5 asset cache server to work on a linux server, and although the asset cache zip comes with a Linux folder, my centOS 5 installation refused to run using the unity instructions . I dug through the zip to see what all the pieces were and discovered that the .sh script that would be used for Linux simply creates a directory and then executes the file /linux/node with a parameter pointing to AssetCache.js. With some more trial and error I finally rummaged through the /linux/node file and scrolled through the junk to find that this appears to be a packaged version of node.js. Realizing this, I decided to install node.js. I downloaded the source not seeing a packaged version, and relalized I didn’t want to have to compile node.js. I found a link to the linux packaged versions. After trying the first set of  instructions for centOS,

sudo yum localinstall --nogpgcheck http://nodejs.tchol.org/repocfg/fedora/nodejs-stable-release.noarch.rpm sudo yum install nodejs

I quickly realized that this failed to install as it is for the wrong os (Fedora instead of centOS). Then I saw the link to the centOS rpm. Following those instructions still didn’t work.

Solution

I went back to the original Linux package page and simply tried the second instruction (for my distro of linux):

sudo yum install npm

This worked wonderfully, installing node.js and all of its dependencies.

I could then run the Asset cache server

nodejs AssetCache.js

in the folder where I had extracted the asset cache zip (note: you will still need the folder entitled “cache”; make sure it’s there or that you have created a “cache” folder).

I still need to figure out how to set it to a background process(updated: see follow up post), or more ideally, as an auto start service.

Hope these instructions help somebody struggling to figure it out!

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>