Page 1 of 1

HOWTO (Beta) - Shared Installation without Virtual Host

Posted: Tue May 31, 2005 7:56 pm
by deeptii
This is a (BETA) HOWTO on installing s9y (0.8.1) on (virtually any) webserver + php combo without the need to configure virtual hosts.

This work is collected from this forum and various of my own work-arounds, and has been working on my Zeus web server. At the moment of this writing I am only tasting the first success of the work, so many things may not have been organized well.

Following these simple steps, one should be able to get s9y 'shared installed' on any host system that wishes to host multiple blogs for users. This setup instruction is highly customizable and may be used by any sites.

Requirements:
A webserver (possibly any that can work with PHP) + PHP (version meets requirements of s9y, of course)
Priviledges to create databases, database users, etc. (i.e. the root database account)
MySQL database server (i used version 4.1, but whichever version s9y supports up to should work)
UNIX/LINUX system (i haven't tried using this setup on Windoze)
A few programming skills

Step 1. Setup your webserver + php combo.

Surf the web for steps to setup this and make sure it's setup correctly.
Make sure PHP works!


Step 2. Downlaod s9y 0.8.1

If u dont know where to download this... ask someone else as right now i dont have time to guide u...


Step 3. Download additional plugins/themes

See above.


Step 4. Extract the stuff

a. make a dir under ur web document root (i.e. /blogspot).
b. extract s9y. (i.e. /blogspot/s9y)
c. extract additional plugins. (i.e. /blogspot/s9y/plugins)
d. extract additional themes. (i.e. /blogspot/s9y/themes)
e. set appropriate permissions on the dir --- (i did not have enough time to figure out the "absolute right" permission to set on these, but here is what it will work:

WARNING: Security measure has not been taken into account!

if your PHP program run as user php and group php, set owner.group of the s9y dir to php.php. set permission to 755

i.e.
chown -R php.php /blogspot/s9y
chmod -R 755 /blogspot/s9y


Step 5. Change paths

go to the deployment dir under your s9y extraction dir (i.e. /blogspot/s9y/deployment). in UNIX/Linux, execute the command:

Code: Select all

sed -i -e "s/'s9y\//'..\/s9y\//" *
what this code does is simply change the path s9y to ../s9y in all the files under the deployment dir (i.e. /blogspot/s9y/deployment).

if u are using windows, you should be able to do this too in macromedia dreamweaver using Find and Replace. if u do not have dreamweaver, u'll have to open each file and change the paths by hand.

feeling bad? use Linux! :P


Step 6. Deploy the BLOG for New Users

i'll only explain the basic concept here.

(All can be done in ONE program)

a. make a dir, name it whatever u want, under ur blog dir. (i.e. /blogspot/blog1234)
b. execute the following command to copy the necessary files there:
(here is just an example, substitute the dir names to urs)

// under the dir /blogspot

Code: Select all

cp s9y/deployment/* blog1234
cp -r s9y/templates blog1234
cp -r s9y/htmlarea blog1234
make the appropriate permission change:
(subsitute php.php to ur PHP program's user.group)

Code: Select all

chown -R php.php blog1234
now if u browse to ur blog1234 dir now from ur web browser, u should be able to see the s9y installation. if u did not set ur permissions correctly or if some stuff are missing, s9y installation will complain. and of course, i KNOW a dir is missing at this moment, we'll create it now. here is just where u should check if everything is alright beside the "dir missing" message.

i.e. /var/www/html/blogspot/blog1234/templates_c Not writable blah blah blah

*IMPORTANT* fix the above error with the following command:
(again, substitute according to ur dir layout)

Code: Select all

mkdir blog1234/templates_c
chown php.php blog1234/templates_c
chmod 1777 blog1234/templates_c
NOTE: fix everything until u can choose between expert/simple installations

c. have ur MySQL account and database created ready! make sure u granted the appropriate rights and flushed the priviledges (reload)!

how to do this is beyond this guide. this information should be accessible in many places on the web.


d. *IMPORTANT* go to ur s9y extraction dir (i.e. /blogspot/s9y), then go to bundled-libs (i.e. /blogspot/s9y/bundled-libs). execute the following commands:

Code: Select all

cp PEAR.php HTTP
cp -r Net HTTP
change the appropriate permissions for php.php [skipped here]

NOTE: if u skip this step, when u go to plugins for sidebars, u'll get errors.

*IMPORTANT* go to ur s9y extraction dir (i.e. /blogspot/s9y), then go to /include/admin/importers (i.e. /blogspot/s9y//include/admin/importers). edit the generic.inc.php file:

Change

Code: Select all

require_once 'bundled-libs/Onyx/RSS.php';
TO

Code: Select all

require_once '../s9y/bundled-libs/Onyx/RSS.php';
To allow ur users to import from other blogs. if u dont do this, users will get error when they go to the import page in the admin's panel.


e. backup ur serendipity_admin.php in ur s9y extraction path (i.e. /blogspot/s9y/)

f. edit the file and put these lines according to ur customization on top of the file:

(this will simulate a "Simple Installation", for "Expert Installation", follow a similar method and figure out yourself)

Code: Select all

$_POST["serendipity"]["step"] = "2a";
$_POST["serendipity"]["getstep"] = "3";
$_POST["dbtype"] = "mysql";
$_POST["dbhost"] = "localhost";
$_POST["dbUser"] = "bloguser";         // the database user u created
$_POST["dbPass"] = "bloguser";         // the database user's password
$_POST["dbName"] = "blog1234";           // the database name for the user
$_POST["user"] = "someone";             // admin username for the user for control panel
$_POST["pass"] = "someone";            // admin password
$_POST["realname"] = "i am somebody";     // user's real name, put whatever
$_POST["email"] = "someone@somewhere.net";  //user's email address
$_POST["blogTitle"] = "My Blog";                          
$_POST["blogDescription"] = "This is somebody's blog";
$_POST["lang"] = "en";                                   // default language to use
$_POST["radio_cfg_wysiwyg_no"] = true; // whether to enable this by default 



g. now just browse to http://somehost/blogspot/blog1234 and everything is done!


8)

Bug found!

Posted: Wed Jun 01, 2005 12:10 pm
by deeptii
There is an error for the sql dump creation.

Apparently there can be another method to make life easier, with minimal programming.

I will post the new treat as soon as i can.

New Guide! New Method!

Posted: Wed Jun 01, 2005 12:18 pm
by deeptii
New method for easier creation and less programming is updated in the above guide!

Posted: Thu Jun 02, 2005 9:27 am
by deeptii
added a fix for import

Posted: Fri Jun 03, 2005 6:48 am
by oxygenws
nice work :) :wink:
:clap: :clap: :clap: