Note: You are currently viewing documentation for Moodle 2.3. Up-to-date documentation for the latest stable version is available here: TMPFS.

TMPFS: Difference between revisions

From MoodleDocs
Copy of info from forum discussion
 
ja link
Line 30: Line 30:


* [http://www-128.ibm.com/developerworks/library/l-fs3.html http://www-128.ibm.com/developerworks/library/l-fs3.html]
* [http://www-128.ibm.com/developerworks/library/l-fs3.html http://www-128.ibm.com/developerworks/library/l-fs3.html]
[[ja:TMPFS]]

Revision as of 09:21, 15 June 2007

On Solaris:

/tmp is mounted swapfs and is it correct to put the eaccelerator files into /tmp/eaccelerator. You will have to remake the directory after a reboot.

On Ubuntu (Linux):

In linux tmpfs can be used in the same way as Solaris, either on /tmp or elsewhere.

mkdir /var/tmp/eaccelerator
sudo chown www-data.www-data /var/tmp/eaccelerator
sudo mount -t tmpfs tmpfs /var/tmp/eaccelerator

Now put it in your /etc/fstab:

tmpfs /var/tmp/eaccelerator tmpfs defaults 0 0

In your php.ini, change this line to:

eaccelerator.cache_dir="/var/tmp/eaccelerator"

And restart Apache:

sudo /etc/init.d/apache2 restart

You now don't have to recreate the /var/tmp/eaccelerator directory after the reboot, and the tmpfs will automount.

If you are VERY clever, then you might copy the cached files off of the tmpfs when apache stops and copy the cached files back on when apache starts.

See Also: