Multiple sites hosting using radiant cms

There are almost 4 to 5 simple steps you need to followed before
getting multiple sites working using radiant cms
1. Setup radiant cms
first Install radiant gem

sudo gem install radiant

set ‘radiant’ under path

export PATH=$PATH:/var/lib/gems/1.8/gems/radiant-0.8.0/bin

Now, we have done with radiant installation.
Let’s create new project..

$ radiant multisite -d mysql
$ cd multisite/

Edit database.yml

$ vi config/database.ymldevelopment:  adapter: mysql  database: multisite_development  username: root  password: abcd  host: localhost

Migrations

rake db:create

Run the database bootstrap rake task:

rake db:bootstrapThis task will destroy any data in the database. Are you sure you want
to continue? [yn] yes...Create the admin user (press enter for defaults).Name (Administrator): adminUsername (admin): adminPassword (radiant): ....Select a database template:1. Empty2. Roasters (a coffee-themed blog or brochure)3. Simple Blog4. Styled Blog[1-4]: 2....

Now we are ready to start

script/server

Open following URL in browser.

http://localhost:3000

You should see site homepage. To manage site goto admin panel.

http://localhost:3000/admin

Now Lets start with multiple sites management
1) Clone multi_site extension into vendor/extensions of your project.

  cd vendor/extensions/  git clone git://github.com/zapnap/radiant-multi-site-extension.git multi_site

2) Run the extension migrations.

  rake db:migrate:extensions

3) Run the extension update task.

  rake radiant:extensions:multi_site:update

4) Restart your server
And we are done with multisite installation, Open following URL in browser.

http://localhost:3000/admin/sites

Add multiple sites as you wanted

 Name        Domain pattern     Base domain name

================================================

 site 1      sandip             sandip

 site 2      gautam             gautam

Don’t forget to make dns entries in /etc/hosts.
vi /etc/hosts

127.0.0.1 localhost...127.0.0.1 sandip127.0.0.1 gautam

One more, by deault pages created for new sites added are not published.
Please be sure to make them published and modify contents to identify them

Now you can view different sites.
http://sandip:3000
http://gautam:3000

Thats, All
Cheers !
$@ndip

Advertisements

About sandipransing

Web Developer #ruby #rails #JS
This entry was posted in CMS, Radiant, Ruby on Rails and tagged . Bookmark the permalink.

4 Responses to Multiple sites hosting using radiant cms

  1. Jim Gay says:

    you can skip a few steps by doing "script/extension install multi_site"

  2. @jim, Thanks for your suggestion.I will make those changes.

  3. Vic says:

    Super Simple! Great!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s