Affordable Web Hosting

March 31, 2008 on 11:23 pm | In Linux Resource, Programming, hosting article, hosting tutorials | 1 Comment

The affordable web hosting preferred high-end, name-brand gear whereas nowadays, some no-name brands are almost as good and less offering half the price, on the contrary they’re claiming that they are offering affordable web hosting.
The on going price these days for shared hosting is between $6 and $12 where the high end would be $15 to $20 per month and the low end would be around the $2 to $3 dollar mark. But you should remember the affordable web hosting should not only mean price, but also service and quality. If you are searching for a good deal, you might wind up at a dead end and your decision should not be ‘as cheap as possible that you were actually looking for’.

Before signing up a hosting company with lowest price, take a close look at web hosting as $3 per month might look quite attractive, but spending $2 or $3 dollars will certainly not lasting longer. Going for those lower prices may put you in problem sooner or later when your site will start mounting to pinnacle.

Many of the web hosts presently offering affordable web hosting and as a customer you will need to look at other facet too like quality of service to make a good and perfect decision. A straightforward search on any google will throw up hundreds of web hosts that fall into the medium price range; additionally the search results might be confusing you more. It is better to make the most uses of web host review site and directories to find reviews of hosting companies as they offer the better known web hosts. However a mid-sized host company does not essentially mean superior one, but it does bring in endurance and the comfort of knowing that you aren’t dealing with a shady hosting company.

 

Generate Passwords-(ASP.NET)

March 31, 2008 on 11:06 pm | In Window Hosting | 1 Comment

By using these code you can generate random Password with ASP.net.

The code begin:

' VB.NET
Function GeneratePassword(ByVal length As Integer, _
                 ByVal numberOfNonAlphanumericCharacters As Integer) As String
  'Make sure length and numberOfNonAlphanumericCharacters are valid....
  '... checks omitted for brevity ... see live demo for full code ...

  Do While True
    Dim i As Integer
    Dim nonANcount As Integer = 0
    Dim buffer1 As Byte() = New Byte(length  - 1) {}

    'chPassword contains the password's characters as it's built up
    Dim chPassword As Char() = New Char(length  - 1) {}

    'chPunctionations contains the list of legal non-alphanumeric characters
    Dim chPunctuations as Char() = "!@@$%^^*()_-+=[{]};:>|./?".ToCharArray()

    'Get a cryptographically strong series of bytes
    Dim rng as New System.Security.Cryptography.RNGCryptoServiceProvider
    rng.GetBytes(buffer1)

    For i = 0 To length - 1
      'Convert each byte into its representative character
      Dim rndChr As Integer = (buffer1(i) Mod 87)
      If (rndChr < 10) Then
        chPassword(i) = Convert.ToChar(Convert.ToUInt16(48 + rndChr))
      Else
        If (rndChr < 36) Then
          chPassword(i) = Convert.ToChar(Convert.ToUInt16((65 + rndChr) - 10))
        Else
          If (rndChr < 62) Then
            chPassword(i) = Convert.ToChar(Convert.ToUInt16((97 + rndChr) - 36))
          Else
            chPassword(i) = chPunctuations(rndChr - 62)
            nonANcount += 1
          End If
        End If
      End If
    Next

    If nonANcount < numberOfNonAlphanumericCharacters Then
      Dim rndNumber As New Random
      For i = 0 To (numberOfNonAlphanumericCharacters - nonANcount) - 1
        Dim passwordPos As Integer
        Do
          passwordPos = rndNumber.Next(0, length)
        Loop While Not Char.IsLetterOrDigit(chPassword(passwordPos))
        chPassword(passwordPos) = _
                chPunctuations(rndNumber.Next(0, chPunctuations.Length))
      Next
    End If

    Return New String(chPassword)
  Loop
End of the code.

 

Ruby Installation Process

March 31, 2008 on 3:56 pm | In Programming | 7 Comments

Before you start installing Ruby, make sure before installing Ruby, zlib is installed in PHP. You can do this by running a simple script with this code. Follow these steps;

<?php phpinfo(); ?>

Now you are ready for installation.

cd /usr/local/src
wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.2.tar.gz
tar xvzf ruby-1.8.2.tar.gz
cd ruby-1.8.2
./configure
make
make install
ruby rubytest.rb

If the installaiton is successful, then you will get a message “test succeeded”.

Install Ruby Gems

cd /usr/local/src
wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz
tar xvzf rubygems-0.8.11.tgz
cd rubygems-0.8.11
ruby setup.rb all

This step involves execution of `ruby setup.rb` with arguments `config / setup / install` all together

gem query –local
OR
gem q -L

Listing all installed gems
Install Rails

gem install rails   OR # (Enter Y for all dependencies)
gem install rails –include-dependencies

Install FastCGI

wget http://fastcgi.com/dist/fcgi-2.4.0.tar.gz
tar -xvzf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0
./configure
make
make install

Install mod_fastcgi

wget http://www.fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz
tar -xvzf mod_fastcgi-2.4.2.tar.gz
cd mod_fastcgi-2.4.2
/path/to/apxs -o mod_fastcgi.so -c *.c
/path/to/apxs -i -a -n fastcgi mod_fastcgi.so

In Apache’s httpd.conf, add this line.

Include /path/to/httpd/conf/fastcgi.conf

Now, add this text to fastcgi.conf

cat > /path/to/httpd/conf/fastcgi.conf
User apache
Group apache
<IfModule mod_fastcgi.c>
FastCgiConfig -idle-timeout 900
AddHandler fastcgi-script .fcgi .fpl .rb
FastCgiIpcDir /tmp/fastcgi_ipc/
FastCgiSuexec /usr/sbin/suexec  # To make FastCGI run as suexec. Use path to suexec
</IfModule>

Ctrl + D

mkdir /tmp/fastcgi_ipc/
chown -R apache.apache /tmp/fastcgi_ipc
chmod 700 /tmp/fastcgi_ipc/
service httpd restart

NOTE : In some systems, the ownership of fastcgi_ipc is done by Apache itself, but its safe to include these steps in your routine.

Related files: /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/dispatches/dispatch.fcgi # OR ~USER/<app_name>/public/dispatch.fcgi # Log file declaration & all
Install gem bindings

To install gem bindings for Fastcgi and MySQL

gem install fcgi
gem install mysql

Testing
1. Install Test Application

cd ~USER
rails testapp  # Create a test application named ‘testapp’
cd testapp/
./script/generate controller test
cd ~USER/httpdocs
ln -s ~USER/testapp/public rails # In order to access the test application ‘~USER/testapp/public’ from the browser

In order to allow symlinks, enter the following in to ~USER/httpdocs/.htaccess

Options Indexes +FollowSymLinks

Now you have to set the correct ownership and permissions for the test application. here is the cample; example:

cd ~USER
chown -R USER.psacln testapp
chmod -R 755 testapp
chown -R USER.psacln httpdocs/rails
chmod -R 755 httpdocs/rails

Create Test Pages

cd ~USER
cd ~USER/testapp/app/controllers

Create a file called test_controller.rb and put in the following code:

cat > test_controller.rb
class TestController < ApplicationController
def hi
render :text => ‘Hi world’
end
def hello
end
def index
render :text => ‘Hi! This is the Index.’
end
end
Ctrl + D

Now create the test page.

cat > ~USER/testapp/app/views/test/hello.rhtml # The test page
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello from Rails!</h1>
<p>The current time is <%= Time.now %></p>
</body>
</html>

Ctrl + D

Now just access the URL: http://yourdomain/rails/test/hi

Important: Don’t forget to  change ownership of the test pages you created.

Now, you have installed Ruby On Rails successfully!

 

Linux-Security Software Tools

March 27, 2008 on 2:49 pm | In Linux hosting | 2 Comments

* Argus -  reads network datagrams from a specified interface, and generates network traffic status records
* Rkdet – root kit detector daemon. Intended to catch someone installing a rootkit or running a packet sniffer.
* satan – Security Administrator Tool for Analyzing Networks
* SARA – Security Auditor’s Research Assistant – network security vulnerability scanner.
* COPS – UNIX security checks.
* deslogin – remote login
* Freedom Internet Privacy Suite for Linux – Commercial products for internet surfers. (Also free downloads)
* freestone – firewall from sosCorp.com
* ipfilter – packet filter
* Kerberos – authentication
* Port Sentry, Log Check, Host Sentry
* rsaeuro – cryptographic toolkit
* Pretty Good Privacy (PGP)
* SAINT – Finds computers on the network, port scans and does a vulnerability check and outputs a report. – Commercial product.
* Secure connections SSH (shell) and SSL (socket layer):
o ssh.com – Secure shell
o OpenSSH – Open Source version – Requires :
+ OpenSSL – Secure Socket Layer
+ zlib – data compression library
o SSH – Comercial versions SSH1 and SSH2
o SSH – [Download] – Ver. 1 (RPMs: ssh, ssh-server, ssh-clients, ssh-extras)
o SSL – Encrypted telnet
o SSH FAQ – Frequently Asked Questions
o Secure Shell Working Group
o MS/Windows clients:
+ PuTTY – Telnet, SSH, SCP, SFTP client
+ WinSCP – scp (secure copy) client.
+ Shaolin Secure FTP
+ Tera Term
+ TTSSH: An SSH Extension to Teraterm
* TAMU – Texas A&M University developed tools
o Drawbridge – Firewall package (Free BSD)
o Tiger – Like COPS, it Scan a Unix system looking for security problems – Tiger Analytical Research Assistant (TARA Pro) – Commercial support
o Netlog – TCP and UDP suspicious traffic logging system
* TCP wrapers – Wietse Venema
* tripwire – File system data integrity checking tool
* InterSect Alliance – Intrusiuon analysis. Identifies malicious or unauthorized access attempts.
* CryptoHeaven – Provide Secure online storage, file sharing and distribution, email, instant messaging. Free Linux client but it is a commercial for fee service. (less than 2MB storage is free)

Wireless:
* AirSnort – wireless LAN (WLAN) tool that recovers encryption keys.
* WEPCrack

 

How to Install Mod_perl on cpanel server

March 25, 2008 on 3:57 pm | In Linux hosting, hosting tutorials | No Comments

These set of directories will help you to install mod_perl onto a cpanel server.

* First-To install Mod_perl, Login to your existing account or create new account. You may select either the rvskin admin account or fantastico admin account. In case if you’ve install it in the rvadmin account, then you can proceed as below.
* SSH into the server, and go to:
cd /home/rvadmin/ directory
*  Get the mod_perl-1.29.tar.gz
wget http://perl.apache.org/dist/mod_perl-1.0-current.tar.gz
* Unpack the file:
tar xzf mod_perl-1.29.tar.gz
* Move to the mod_perl directoy:
cd mod_perl-1.29
* Configure
perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/local/apache/bin/apxs EVERYTHING=1
*  Run Make
make
Run Install
make install
*  Activate Mod Perl
/usr/local/apache/bin/apxs -a -n perl -i libperl.so
#########
Create the script as shown below, and add it to the root directory of the mod_perl account holder (for this case rvadmin), and modify the permissions (chmod +x add-mod-perl.sh), so to add mod_perl back into apache, you just require to run the script, and then confirm that apache restarted with mod perl in it, you can then check in WHM/News to see if mod_perl is listed .
#########
Now  you will need to run if you re-compile Apache. The mod_perl binary is at
/home/rvadmin/mod_perl-1.29/apaci/libperl.so, to make it more simple just put the following lines in a file:
— cut here —
#!/bin/sh
libperl=/home/rvadmin/mod_perl-1.29/apaci/libperl.so
apxs=/usr/local/apache/bin/apxs
$apxs -a -n perl -i $libperl
/etc/init.d/httpd stop
/etc/init.d/httpd start
— cut here —
Name the file add-mod-perl.sh and execute “chmod +x add-mod-perl.sh”. after compiling apache run the script (”./add-mod-perl.sh”) and it should  work.

 

Next Page »