bob on July 10th, 2008
If you are user friendly with Windows environment and want to quickly access all the advantages of a Linux desktop in your everyday work, Linux XP Desktop™ is the answer for you, you can get the best choice for you with following key features;
MS Word documents
Office suite Internet suite Art & multimedia
MS Excel tables / diagrams
MS Powerpoint presentations
Planning personal / group agenda
Project / resource management
Personal “TODO” notes
Dictionaries and translation
Personal / SMB accounting
Data archivation / encription Secure internet browsing
E-mail with corporate address books
Talking via ICQ / MSN / etc
Audio/video conferencing (Skype etc)
IP telephony / VoIP
File exchange and sharing
P2P file exchange (ed2k etc)
File / site downloading
Web / desktop publishing
Blogging (via LiveJournal clients)
Adobe PDF documents
Graph / schema editing
Editing math formulas
printing documents
scanning documents
OCR for documents
working with fax
Software development
Remote system administration
Scientific calculations (Mathlab etc)
Working with legacy applications Photo galleries
Burning CDs / DVDs
Pixel (raster) graphic design
Vector graphics design
2D, 3D object modelling
Audio / MP3 collections, playing
DVD / stream video, playing
Converting audio CDs to MP3 etc
Converting DVDs to AVI etc
audio / video editing
Speech synthesis
internet radio
watching / recording TV
2D / 3D games
The latest version of Linux XP Desktop™ has easy interface what you are already familiarized with your window XP and as well it provide you Full control of your computer, data and applications.
bob on June 25th, 2008
Here is the set of directories which let you install mod_perl onto a cpanel server.
* You can go to your existing account or create new account where you will install mod_perl. You may select either the rvskin admin account or fantastico admin account. Suppose 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
#########
Now 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 now work.
bob on June 16th, 2008
Make sure before installing Ruby, zlib is installed in PHP. You can do this by running a simple script with this code.
<?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
NOTE:- Make sure change ownership of the test pages you created.
Now, You have installed Ruby On Rails
bob on June 6th, 2008
If your website has HTML codes you can create a remote cPanel login page. Consider your website url is www.yourdomain.com, your cPanel login url will be http://www.yourdomain.com:2082 for non-SSL or https://www.yourdomain:2083 for SSL login.
You need to put the following HTML from in your website HTML codes.
<form action=’http://www.yourdomain.com:2082/login/’ method=’post’>
<table border=’1′ width=’250′ cellpadding=’2′ cellspacing=’0′>
<tr>
<td align=’right’>Username:</td>
<td><input type=’text’ name=’user’></td>
</tr>
<tr>
<td align=’right’>Password:</td>
<td><input type=’password’ name=’pass’></td>
</tr>
<tr>
<td colspan=’2′ align=’center’><input type=’reset’ name=’r1′ value=’Reset’><input type=’submit’ name=’s1′ value=’Login’></td>
</tr>
</table>
</form>
In the code, you should replace “www.yourdomain.com” with your website domain name.
If you want to use SSL login, you should replace “http” with “https” and “2082″ with “2083″.
Replace “Username:” and “Password:” with your own phrase if you like to translate it or such.
Replace “Login” and “Reset” with your own phrase if you like to translate it or such.
Nowyou can put put this code in your website every where you need in the body section.
bob on May 19th, 2008
mod_rewrite simple tutorial
The potential of mod_rewrite is enormous that have many functionalities on Apache web server, It also help if you to hide the structure of your website and the script which passes the arguments. Here is the simple mod_rewrite tutorial.
This is your website www.domain.com
and you have a script which passes the arguments.
So your url look like this:
www.domain.com/index.php?query=xxx&id=yyy
mod rewrite enables you to change that into:
www.domain.com/xxx/yyy/
First of all make sure that mod_rewrite is available on your server and turned on.
You can check that out by creating a file (let’s call it phpinfo.php) with the following content:
PHP Code:
<? phpinfo(); ?>
Go to that page and search for mod_rewrite. If you find it you’re good to go.
If not, contact your host.
OK, now create a .htaccess file with this content:
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*)/(.*)/$ index.php?query=$1&id=$2 [L]
Upload the file to your server into the folder that contains the script.
Now when someone requests “something” on your server, it automatically gets transcribed to index.php?query=something&id=something
In case if you want your site to look like this:
www.domain.com/xxx-yyy.html
Follow this;
This is the setup for the .htaccess file:
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*)-(.*).html$ index.php?q=$1&id=$2 [L]
Now, you need to just update the links in your website and your site is SEO friendly and will hard to hack.
If you have static links you have no problems, but for instance if your script is generating the urls based on various conditions.
So here’s the old code:
PHP Code:
<html>
<body>
…
…
<?
echo ‘<a href=”$siteurl/index.php?query=type&id=$id”>Link</a>’;
?>
You’d change it to:
PHP Code:
<html>
<body>
…
…
<?
echo ‘<a href=”$siteurl/type/$id/”>Link</a>’;
?>
for the first type of url rewrite.
Or:
PHP Code:
<html>
<body>
…
…
<?
echo ‘<a href=”$siteurl/type-$id.html”>Link</a>’;
?>
for the second type.
Hope it helps.