Shared media library across multiple s9y sites?
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Shared media library across multiple s9y sites?
I have 3 s9y installations. Each is its own domain, database, etc. They do, however, exist on the same physical server. Is there a way to configure s9y so that all 3 share the same media library?
=Don=
-
abdussamad
- Regular
- Posts: 117
- Joined: Fri Apr 21, 2006 10:11 pm
- Location: Karachi, Pakistan
- Contact:
You could try something like the s9y shared installation:
http://s9y.org/41.html
If you want a simpler conversion of your current setup with then you could try to just share the uploads directory. Say the three installations are currently in /home/ex1, /home/ex2 and /home/ex3 and you want to all three to share /home/ex1/uploads you could chmod 777 /home/ex1/uploads and then symlink from the other directories:
ln -s -d /home/ex1/uploads /home/ex2/uploads
ln -s -d /home/ex1/uploads /home/ex3/uploads
Then you would probably also want to do a rebuild thumbs in each of the admin panels.
http://s9y.org/41.html
If you want a simpler conversion of your current setup with then you could try to just share the uploads directory. Say the three installations are currently in /home/ex1, /home/ex2 and /home/ex3 and you want to all three to share /home/ex1/uploads you could chmod 777 /home/ex1/uploads and then symlink from the other directories:
ln -s -d /home/ex1/uploads /home/ex2/uploads
ln -s -d /home/ex1/uploads /home/ex3/uploads
Then you would probably also want to do a rebuild thumbs in each of the admin panels.
Abdussamad
Serendipity templates
Serendipity templates
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Yes, this is only possible through symbolic links. That's the most convenient and best-working way to do it, symlinks rock.
Regards,
Garvin
Yes, this is only possible through symbolic links. That's the most convenient and best-working way to do it, symlinks rock.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
OK, then how exactly do I set up these symlinks? I do not understand this part:
Is this command entered once, then exists until changed? Entered each time the server starts? How is it turned off in the event it is no longer wanted?
Code: Select all
ln -s -d /home/ex1/uploads /home/ex2/uploads
ln -s -d /home/ex1/uploads /home/ex3/uploads=Don=
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
This is a shell/unix/bash command that you need to type via SSH or usingaPHP script. Once created it's like a file, and you don't need the command any more.
Removing it is like deleting a file.
Regards,
Garvin
This is a shell/unix/bash command that you need to type via SSH or usingaPHP script. Once created it's like a file, and you don't need the command any more.
Removing it is like deleting a file.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Thanks again Garvin & Abdussamad - question regarding the rebuilding of thumbs. If each of these separate installations is looking at the same media library via the symlink, why does each one need a separate rebuild thumbs? Wouldn't rebuilding for one rebuild for all?
Also, the reason I want to do this is so that media can be placed in this common/shared location WITHOUT using the "add media" admin link (ie, perhaps ftp the files to the server). Will each installation see all the media files provided "Enable on-the-fly media synchronization" is enabled?
Also, the reason I want to do this is so that media can be placed in this common/shared location WITHOUT using the "add media" admin link (ie, perhaps ftp the files to the server). Will each installation see all the media files provided "Enable on-the-fly media synchronization" is enabled?
=Don=
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
The media is "cached" inside serendipity_images table. Each s9y installation needs to keep this table in synch with the filebase. You can either do that manually through rebuilding thumbnails, or you can enable the auto-synch of s9y inside the s9y configuration. (which should answer your second question)
So it's not really about thumbnails, but synchronizing the DB.
The media is "cached" inside serendipity_images table. Each s9y installation needs to keep this table in synch with the filebase. You can either do that manually through rebuilding thumbnails, or you can enable the auto-synch of s9y inside the s9y configuration. (which should answer your second question)
So it's not really about thumbnails, but synchronizing the DB.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Thanks Garvin - I've noticed the sync does not really work the way I would expect it to.... I have not tried this symlink yet, but I have noticed before if I ftp files to my upload folder, then try to insert an image into an entry or extended property field, the newly added files are not shown. If I click on the media library link first after adding files, then try to add one to an entry later, it does sync. Is there a way to get this to be truly sync'd so that interim "check" of the media library is not necessary?
=Don=
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
You should be able to circumvent this by enabling your personal config option to show the Maintenance Options of the MDB also inside the popup. Once those (delete, rotate, ...) are displayed, the sync should also be executed?
HTH,
Garvin
You should be able to circumvent this by enabling your personal config option to show the Maintenance Options of the MDB also inside the popup. Once those (delete, rotate, ...) are displayed, the sync should also be executed?
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
That is a different page alltogether and not so easy to accomplish, because the seperation of per-user settings and "global" settings do not allow so easy to just tell "hey, that's an option that can be made globally".
The whole system should be reworked at that place, because also the defaults when creating new users should depend on this global configuration.
Regards,
Garvin
That is a different page alltogether and not so easy to accomplish, because the seperation of per-user settings and "global" settings do not allow so easy to just tell "hey, that's an option that can be made globally".
The whole system should be reworked at that place, because also the defaults when creating new users should depend on this global configuration.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact: