DR Paudel ! Your IT Educator
Welcome to www.drpaudel.com.np

Jan/10

22

Run Instant Rails in Your PC

  1. Download Instant Rails from the link: http://instantrails.rubyforge.org/
  2. Unzip Instant Rails where you want it to keep. Here in this tutorial  I chose C:\InstantRails
  3. Start Instant Rails by double clicking “I” the rails exe file. Click the “OK” button to let it update the configuration file
  4. Open a Ruby console window through Instant Rails by clicking The “I” button -> Rails Applications -> Open Ruby Console Window
  5. You should be in C:\InstantRails\rails_apps. If you are working on a new application, generate it by using the command: rails <YourProjectName>. I called my test, so the command was “rails test.”
  6. Move to the project directory, C:\InstantRails\rails_apps\test
  7. Generate a controller: ruby script/generate controller <ControllerName>
  8. Generate a model: ruby script/generate model <ModelName>
  9. Create a migration by editing the file: C:\InstantRails\rails_apps\test\db\migrate\001_create_posts.rb (assuming your model was called Post
  10. In the self.up method in that file, add the columns ====Type one per line.
    For instance, t.column :title, :string on the first line, then t.column :body, :text.
  11. Open the configuration file for the database. This is found in C:\InstantRails\rails_apps\test\config\database.yml. Basically, you can find the names of the databases you are going to need to create. We’ll be doing test_development.
  12. Start Apache to create the database using php administrator interface to MySQL. You can start Apache by clicking on Apache->Start in Instant Rails.
  13. Click I->Configure->Database
  14. That will open a browser to the admin page. Just type in the name of the database and submit the form. Ours is called test_development.
  15. Stop Apache===== (in Instant Rails click Apache->Stop)
  16. Start WEBrick: In C:\InstantRails\rails_apps\test, type the command: ruby script/server.
    If Windows asks, unblock it. Take note of the port it will be using.
  17. Set up the controller to have something. Open C:\InstantRails\rails_apps\test\app\controllers\site_controller.rb. In the class, type scaffold :post
  18. To create the database, run the migration. In C:\InstantRails\rails_apps\test type the command: rake db:migrate
  19. Now you can go to http://localhost:3000. Here you’ll see the “Welcome Aboard” page from Rails.
  20. To see your application, go to http://localhost:3000/site . Cheers You are done !!!!!

Please post your comment if you have any problem in running this application.


No tags

Asterisk * is a open source Telephony project. It is a complete PBX in software. It runs on Linux, BSD and MacOSX and provides all of the features you would expect from a PBX and more.  Asterisk does voice over IP (VOIP) in many protocols, and can interoperate with almost all standards-based telephony equipment using relatively low cost hardware infrastructure.

I have provided a detail installation and configuration of Voip Server. Follow step by step given below for debian 5.0.

debian:~# apt-get update

debian:~#  apt-get -y install build-essential libncurses5-dev libcurl3-dev libvorbis-dev libspeex-dev unixodbc unixodbc-dev libiksemel-dev linux-headers-`uname -r`

Find the Asterisk sources you need at the official homepage:  http://www.asterisk.org/. Take care to use only a stable, current version and not a development version. Download it to /usr/src with wget http://downloads.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz:

debian:~# cd /usr/src
debian:/usr/src#

debian:/usr/src# wget http://downloads.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz

You will need the current Zaptel drivers as well. Get them with wget http://downloads.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz:

debian:/usr/src# wget http://downloads.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz

Unpack the compressed tar archives with tar xvzf asterisk-1.4-current.tar.gz && tar xvzf zaptel-1.4-current.tar.gz:

debian:/usr/src# tar xvzf asterisk-1.4-current.tar.gz && tar xvzf zaptel
-1.4-current.tar.gz
asterisk-1.4.2/
asterisk-1.4.2/build_tools/
asterisk-1.4.2/build_tools/menuselect-deps.in
asterisk-1.4.2/build_tools/get_moduleinfo
asterisk-1.4.2/build_tools/mkpkgconfig
asterisk-1.4.2/build_tools/embed_modules.xml
asterisk-1.4.2/build_tools/get_makeopts
asterisk-1.4.2/build_tools/make_version
zaptel-1.4.1/timertest.c
zaptel-1.4.1/mec3-float.h
zaptel-1.4.1/zaptel.init
zaptel-1.4.1/hdlcverify.c
zaptel-1.4.1/fxstest.c
zaptel-1.4.1/zaptel-base.c
debian:/usr/src#

We build the Zaptel drivers first. Change into the Zaptel directory with cd zaptel-1.4.1 and build it with ./configure && make && make install:

debian:/usr/src# cd zaptel-1.4.1
debian:/usr/src/zaptel-1.4.1# ./configure && make && make install

Asterisk MeetMe conferences require a timing source. In the absence of a hardware timing source, we use the software timing source contained in the ztdummy kernel module. Load the module with modprobe ztdummy:

debian:/usr/src/zaptel-1.4.1# cd /usr/src/asterisk-1.4.2
debian:/usr/src/asterisk-1.4.2# ./configure && make && make install

Asterisk is now installed, but we’re not finished yet. Essential configuration files in /etc/asterisk do not yet exist. Rather than start from scratch, we install a set of sample configuration files with make samples:

debian:/usr/src/asterisk-1.4.2# make samples
mkdir -p /etc/asterisk

Now you are Done! Asterisk is ready to go! Check the installed version with asterisk -V

debian:/usr/src/asterisk-1.4.2# asterisk -V
Asterisk 1.4.2

Start-up and shutdown scripts

To make sure that Asterisk starts automatically at boot time and shuts down cleanly during shutdown or reboot, we need init scripts. Install them from the /usr/src/asterisk-1.4.2 directory with make config:
debian:/usr/src/asterisk-1.4.2# make config
Adding system startup for /etc/init.d/asterisk …
/etc/rc2.d/K91asterisk -> ../init.d/asterisk
/etc/rc3.d/K91asterisk -> ../init.d/asterisk
/etc/rc4.d/K91asterisk -> ../init.d/asterisk
/etc/rc5.d/K91asterisk -> ../init.d/asterisk
/etc/rc2.d/S10asterisk -> ../init.d/asterisk
/etc/rc3.d/S10asterisk -> ../init.d/asterisk
/etc/rc4.d/S10asterisk -> ../init.d/asterisk
/etc/rc5.d/S10asterisk -> ../init.d/asterisk

The ztdummy kernel module must also start at boot time; add it to /etc/modules with echo “ztdummy” >> /etc/modules:

debian:/usr/src/asterisk-1.4.2# echo “ztdummy” >> /etc/modules
debian:/usr/src/asterisk-1.4.2#

Res: http://www.the-asterisk-book.com


No tags

NTOP  is a network traffic probe that shows the network usage , It is very simple and easy tool to monitor your Network . To use this tool in your system go to following link.
Install NTOP OR  Detail Installation NTOP

No tags

Dec/09

7

Cloud Computing

From Wikipedia, the free encyclopedia

Cloud computing logical diagram

Cloud computing is Internet- (”cloud-”) based development and use of computer technology (”computing“).[1] In concept, it is a paradigm shift whereby details are abstracted from the users who no longer need knowledge of, expertise in, or control over the technology infrastructure “in the cloud” that supports them.[2] It typically involves the provision of dynamically scalable and often virtualized resources as a service over the Internet.[3][4]

The term cloud is used as a metaphor for the Internet, based on how the Internet is depicted in computer network diagrams and is an abstraction of the underlying infrastructure it conceals.[5] Typical cloud computing providers deliver common business applications online which are accessed from a web browser, while the software and data are stored on the servers.

These applications are broadly divided into the following categories: Software as a Service (SaaS), Utility Computing, Web Services, Platform as a Service (PaaS), Managed Service Providers (MSP), Service Commerce, and Internet Integration. The name cloud computing was inspired by the cloud symbol that is often used to represent the Internet in flow charts and diagrams.”[6]

No tags

Twitter

http://twitter.com/drpaudel

search