There are some steps to install and configure apache2 & phusion passenger

 

To install Apache Web Server and documentation & utilities on Linux machine using following commands.

sudo apt-get install apache2

To check installation, Open browser and type localhost or 127.0.0.1

It will show “It Works”

Now If you are using rvm , then go go appropriate ruby version using rvm like rvm use 1.9.2 (I’m having ruby version 1.9.2) and install passenger gem.

gem install passenger

To install apache2 module in passenger

passenger-install-apache2-module

If all dependencies are fulfilled, It will install otherwise It will give a list of commands that you will have to install to run passenger.

Snapshot of asking for dependencies, There are following.dependenciesIf all dependencies are satisfied, you don’t need to run following commands.

sudo apt-get install apache2-prefork-dev

sudo apt-get install libapr1-dev

sudo apt-get install libaprutil1-dev

After Installing dependencies, Run passenger-install-apache2-module again

After that it will compiling their module, When it finishes its compilation, It shows Apache 2 module was successfully installed and halt for press Enter.

Now you can copy the lines which will show in the terminal (passenger & ruby path and its compiled file)

Paste these lines into /etc/apache2/apache2.conf

enterAfter pressing Enter, Deploying a Ruby on Rails application : an expample heading will shown, As shown in the snapshot

successCopy & Paste these lines into /etc/apache2/apache2.conf

For Production Mode
<VirtaulHost  *:80>
    ServerName  127.0.0.1
    DocumentRoot  /somewhere/public
    <Directory  /somewhere/public>
        Allow from all
        Options  -MultiViews
    </Directory>
</VirtaulHost>

For Development Mode
<VirtualHost  *:80>
    ServerName  127.0.0.1
    RailsEnv development
    DocumentRoot  /somewhere/public
    </Directory  /somewhere/public>
        Allow from all
        Options  -MultiViews
    </Directory>
</VirtualHost>

DocumentRoot will look like : – /path to your project directory/public

Now, Run rake assets:precompile in application directory (Needed only in production mode). And restart the apache server by typing

sudo /etc/init.d/apache2 restart

Hoping this will help you.

Enjoy ; – )

 

Remote Access Dial In User Service (RADIUS) is a networking protocol that provides centralized Authentication, Authorization, and Accounting (AAA) management for computers that connect and use a network service.

FreeRADIUS is a modular, high performance free RADIUS suite developed and distributed under the GNU, and is free for download and use. The FreeRADIUS Suite includes a RADIUS server.

There are two ways to install FreeRadius

  1. From Repository
  2. From source package

From Repo, Pre-build FreeRadius package can be installed by using the following command

sudo apt-get install freeradius

It will install all the dependencies you need.

From Source,  You have to install dependencies to install freeRadius by following commands

sudo apt-get install dpkg-dev

sudo apt-get build-dep freeradius

sudo apt-get install fakeroot

sudo apt-get install ssl-cert

Now download latest version of FreeRadius

wget ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-2.x.x.tar.gz

Extract the FreeRadius source Tar file

tar -xzvf freeradius-server-2.x.x.tar.gz

cd freeradius-server-2.x.x

fakeroot dpkg-buildpackage -b -uc

sudo dpkg -i freeradius_2.x.x+git_i386.deb freeradius-common_2.x.x+git_all.deb freeradius-utils_2.x.x+git_i386.deb libfreeradius2_2.x.x+git_i386.deb

Give permission to FreeRadius

chmod o+xr /etc/freeradius

chmod o+r /etc/freeradius/dictionary

There you go… FreeRadius in installed

Before going further, lets take a look on some commands

Start-up script

sudo /etc/init.d/freeradius start|stop|restart

Activate and de-activate

sudo update-rc.d freeradius defaults

sudo update-rc.d -f freeradius remove

Ensure FreeRADIUS running

pidof freeradius
ps aux | grep radius

Get into some configuration

Make sure that you are root in order to be able to edit the configuration files, and follow these configuration

FreeRADIUS includes a default client called localhost. This client can be used by RADIUS client programs on the localhost to help with troubleshooting and testing. Confirm that the following entry exists in the /ect/freeradius/clients.conf file

client localhost {
ipaddr = 127.0.0.1
secret = testing123
require_message_authenticator = no
nastype = other
}

Define Alice as a FreeRADIUS test user. Add the following lines at the top of the users file. Make sure the second and third lines are indented by a single tab character

“alice” Cleartext-Password := “passme”
Framed-IP-Address = 192.168.1.65,
Reply-Message = “Hello, %{User-Name}”

Start the FreeRADIUS server in debug mode. Make sure that there is no other instance running by shutting it down through the startup script. We assume Ubuntu in this case.

sudo /etc/init.d/freeradius stop
sudo freeradius -X

Ensure FreeRADIUS has started correctly by confirming that the last line on your screen says the following

Ready to process requests.

Authenticate Alice using the following command

radtest alice passme 127.0.0.1 100 testing123

The debug output of FreeRADIUS will show how the Access-Request packet arrives and how the FreeRADIUS server responds to this request.

Radtest will also show the response of the FreeRADIUS server

Sending Access-Request of id 17 to 127.0.0.1 port 1812
User-Name = “alice”
User-Password = “passme”
NAS-IP-Address = 127.0.1.1
NAS-Port = 100
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812,
id=147, length=40
Framed-IP-Address = 192.168.1.65
Reply-Message = “Hello, alice”

There you go, Your freeRdius server is ready but it is not all done, there are many modules like LDAP, Mysql, Session, Authentication blaa blaa.

In next blog I’ll write about Authentication from mysql database and session storage in mysql database.

Thx,

Spunkylive

Last night, I tried to format my pen drive for several time but it didn’t work. so figured it out how to do it with the terminal.

First check partition of external drive

dmesg | tail

Ubuntu Terminal

Ubuntu Terminal

Now you see the highlighted part is the partition. Before formatting make sure your external drive is unmount.

sudo umount dev/sdb1

Caution: Careful while entering device/partition name; wrong name can wipe out entire external drive!!!

Basically there are many ways to do it.

  • For creating MS-DOS/Windows XP/FAT32 filesystem

sudo mkfs.vfat -n ‘Your External Drive Name’ -I sdb1

  • For creating ext2/ext3/ext4 filesystem by formatting

sudo mkfs.ext3 /dev/sdb1

  • If you want to change label of ext2/ext3/ext4 filesystem, you can simply use e2label command

sudo e2label /dev/sdb1 your-external-drive-name

There you go !!!

Enjoy !!

Thanks,

spunkylive

There are few steps to make android look like ubuntu which you can easily download from Google Play Store.

1.  Ubuntu live wallpaper

Ubuntu

Live Wall Paper

2.   Unity Launcher

Unity Launcher

Unity

3.   Smart Launcher

Smart Launcher

Smart Launcher

4.   Go Keyboard (Optional) but it looks like ubuntu keyboard.

Go Keyboard

Go Keyboard

After Installing smart launcher, it ask you for your favourite application to make their flower. After Configuration Smart Launcher, there is flower and a digital clock on your wall, to hide these. Long Press application switch button and select Preferences then go to Personalization and Set Clock Style to None, similarly Set Flower Visibility to Always Hidden and Check Left-Hand Mode.

Now to set Ubuntu Live wallpaper, Tap long to your home screen and select Ubuntu Live Wallpaper.

And go to Go Keyboard and configure.

there you go, now its ubuntu device

Thanks,

spunkylive