Monday, December 8, 2008

Linux commnads , rpm ,search

linux apache basics
http://www.alwanza.com/howto/linux/apache.html

Search command

find / -type f -name httpd

Apache installed on:

/usr/local/apache

http://hostlibrary.com/installing_apache_mysql_php_on_linux

apache2 and php5 (Mod_) :Installation:

http://dan.drydog.com/apache2php.html



"chcon libphp5.so -t shlib_t" changed to "chcon -t texrel_shlib_t libphp5.so" works

Installation Procedure:
http://www.php.net/manual/en/install.unix.php

which arhitecture belongs to your linux:i386 or x86_64
rpm -qa --qf "%{n}-%{arch}\n"


package details:
rpm -qi mysql

which package install with its details...
rpm -qa --qf "%{n}-%{v}-%{r}.%{arch}\n" | less


mysql runnig or not:
ps aux | grep [m]ysqld.

::::::::::::::::::::::::::
file transfer from window to linux
pscp ./php-5.2.5.tar.gz root@172.16.3.22:/usr/local/

from linux to linux

Where is php.ini defuault location in linux?

/etc/php.ini
/usr/local/lib/php.ini

How to Improve the site rank

1. Use Google Adwords to search for a general niche from a portal like website
2. Select a niche with Moderate Search and High Advertiser Competition
3. User Wordtracker to get search volumes for keywords
4. Use Google to find out competition for the keywords. Focus on low competition keywords (less than 10,000 competing results)
5. Build a blog(with your adsense codes) to get number 1 position in Search Engines

SEO --IM

http://search.msn.com/docs/submit.aspx?FORM=WSUT
http://www.dmoz.org/add.html
http://www.2createawebsite.com/traffic/search-engine-traffic.html
https://siteexplorer.search.yahoo.com/submit
http://www.2createawebsite.com/traffic/search-engine-traffic.html
http://www.2createawebsite.com/traffic/index.html


top bookmarking site
http://3spots.blogspot.com/2006/04/social-bookmark-tools-to-view-search.html
http://www.socialize-it.com/index.php?url=$URL&tag=$tag

http://www.ebizmba.com/articles/social30.html


backflip.com
bibsonomy.org
blinklist.com
blogmarks.net
faves.com
buddymarks.com
connectedy.com
de.lirio.us
del.icio.us
diigo.com
excites.com
feedmelinks.com
folkd.com
furl.net
google.com
linkagogo.com
linkroll.com
ma.gnolia.com
markaboo.com
mister-wong.com
mister-wong.cn
mister-wong.de
mister-wong.es
mister-wong.fr
mister-wong.ru
my.xilinus.com
myweb2.search.yahoo.com
netvouz.com
scuttle.org
scuttleplus.org
simpy.com
taggly.com

Sunday, December 7, 2008

Imp LInks

http://www.youtube.com/watch?v=Hb3-Qg9JjKw---------squidoo
http://www.youtube.com/results?search_query=affiliate&search=tag -------------affiliate

elite

http://www.youtube.com/watch?v=fLJskZNEIDY&mode=related&search=squidoo%20lens%20money%20affiliate%20marketing%20plr%20monetize%20monetizing%20tiffany%20dow [http://www.youtube.com/watch?v=fLJskZNEIDY]
http://www.youtube.com/watch?v=vyTkfIIdhf4

http://www.youtube.com/watch?v=J5WoejuePpk&mode=related&search=squidoo%20lens%20money%20affiliate%20marketing%20plr%20monetize%20monetizing%20tiffany%20dow


Perl FAQs:----------------------------------
http://en.allexperts.com/q/Perl-CGI-1045/
--------------------------------------------

steps to create host,user,db,password

./mysql -u root mysql

./mysql -u root mysql

mysql> insert into
-> host(host,db,Select_priv,Insert_priv,Update_priv,
-> Delete_priv,Create_priv,Drop_priv)
-> values('192.168.15.92','element5','Y', 'Y', 'Y', 'Y', 'Y', 'Y');

insert into user (host,user,password)
-> values('192.168.15.92','user','password('1234'));

mysql> insert into db
-> (host,db,user,Select_priv,Insert_priv,Update_priv,Delete_priv,
-> Create_priv,Drop_priv)
-> values ('192.168.15.92','element5','zmei','Y','Y','Y','Y','Y','Y');


mysqladmin reload

to test :
./mysql -u user -h 192.168.15.92 -p

Shell script execution - command not found, syntax error near unexpected token

to solve the problem:
Shell script execution - command not found, syntax error near unexpected token

When we edit shell script in Windows machine, and ftp it to Linux for execution, sometimes we hit the following error:

“command not foundh” line xxx
“command not foundne” line xxx: syntax error near unexpected token `

This is due to the newline characters used on both systems. We need to replace all occurances of "\r\n" with "\n".

In vi, do the following:

// Change from (DOS) to just (Unix):
:set fileformat=unix
:w

// change back to Carriage Return + Line Feed for DOS
:set fileformat=dos
:w

// writing for apple computers:
:set fileformat=mac
:w

// remove multiple (repeated) Carriage Returns using search and replace
:%s/[^M]$//
:w

SEO - IM

http://www.warriorforum.com/forum/topic.asp?TOPIC_ID=180531

SEO

http://tools.seobook.com/general/keyword/

installing php,mysql,oci,gd --steps linux

Server setup steps:

Required softwares:
apache2
php 5
mysql 5
oci 8
compile with gd library


Steps:
1. install apache
verify ldd /www/apache/bin/httpd (ref: http://us2.php.net/oci8 )
libpthread.so.0 => /lib/libpthread.so.0 (0x4001c000)
libm.so.6 => /lib/libm.so.6 (0x4002f000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004c000)
libdl.so.2 => /lib/libdl.so.2 (0x4007a000)
libc.so.6 => /lib/libc.so.6 (0x4007e000)

/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
2. install mysql
3. ensure path of mysql i.e. /usr/local/mysql or find / -name mysql.h will return path
4. install oci8 instant oracle client (Ref: www.oracle.com/technology/tech/php/htdocs/inst_php_apache_linux.html)
oracle client located at : 192.168.15.92 root password copy oracle client command:
scp ./ root@192.168.15.92:/tmp/oraclient/* <-|

rpm -Uvh oracle-instantclient-basic-10.1.0.3-1.i386.rpm
rpm -Uvh oracle-instantclient-devel-10.1.0.3-1.i386.rpm
rpm -Uvh oracle-instantclient-sqlplus-10.1.0.3-1.i386.rpm
5. verify path for both oracle clients . i.e. /usr/lib/oracle/10.2.0.3/client/ , Copy tnsnames.ora file here
6. compile php with (Change the mysql parameter)
./configure --with-mysql=/home/dir/software/5.0.34-enterprise-gpl /
--with-apxs2=/usr/local/apache2/bin/apxs --with-gd --with-jpeg-dir=/usr/lib / -with-png-dir=/usr/lib --enable-gd-native-ttf /
--with-oci8=instantclient,/usr/lib/oracle/10.2.0.3/client/lib --enable-sigchild

7. make;make install;
8. make dir structure
tmp
cache
www
conf
configuration file
php.ini
httpd.conf
htdocs
element5
swreg
php-includes
element5
swreg
logs
error_log
httpd.pid
swreg_startup

9. copy the php.ini in conf folder from php installation dir
10 modify the httpd.conf file with pid parameter
mention the virtual host here as follows
Listen 8080

DocumentRoot /www
ScriptAlias /report/ "/www/"
PassEnv LD_LIBRARY_PATH
PassEnv SQLPATH
PassEnv TNS_ADMIN

Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all




11. add AddType application/x-httpd-php .php .phtml .html .htm in httpd.conf file ,Add "AddModule mod_php5.c" ,
verify LoadModule php5_module libexec/libphp5.so
12. modify the php.ini file magic_quotes=Off ,change the php.ini files include_path

13. modify server setup file i.e. sg_apache

PHPRC=/www/dir/conf
export PHPRC
$APACHE_PATH/bin/httpd -D$DEPLOY_ENV -f /www/.../conf/httpd.conf -k $cmd

creating virtual dir in httpd.conf

Listen 8080

ServerName 192.168.113.65
DocumentRoot /abc/ud/www
ErrorLog /abc/ud/logs/error
CustomLog /abc/ud/logs/access combinedplus
ScriptAlias /cgi-bin/ "/abc/ud/cgi-bin/"

SetEnv ABC_BASE_DIR /abc/usd
SetEnv ABC_BASE_CURRENCY UD


Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all



AllowOverride None
Options None
Order allow,deny
Allow from all

how to checout cvs - linux command

checkout the code from cvs
export CVSROOT=:pserver....
cvs login
cvs co

installing the Image::Magic in perl module

./configure --with-perl=/usr/bin/perl \
--enable-shared \
--with-perl-option=PREFIX=/usr/lib/perl5/site_perl/5.8.5
make;make install;

shell script program

#!/bin/sh
APACHEHOME=/usr/local/apache/bin

LD_LIBRARY_PATH=/usr/lib/oracle/10.1.0.3/client/lib:${LD_LIBRARY_PATH}
TNS_ADMIN=/usr/local/oracletns
export LD_LIBRARY_PATH TNS_ADMIN
echo Starting apache
$APACHEHOME/apachectl restart

Installing OCI 8

1. Common requirements
----------------------
In case if you use Oracle Instant Client, you don't have to set ORACLE_HOME and
most of the other environment variables to build PHP with OCI8 support.
The only variables you may have to set are:
LD_LIBRARY_PATH - it must include Instant Client libraries dir
NLS_LANG - in case if you want to change the default encoding used during
interaction with Oracle servers

If you use common Oracle Client installation that comes along with the Oracle
server installation, you MUST set at least ORACLE_HOME environment variable
and make it visible for your web-server BEFORE it starts. Most appropriate
places to add ORACLE_HOME definition are:
- /etc/profile
- /etc/profile.local
- /etc/profile.d
and others.

2. Installing as shared extension
---------------------------------
To install OCI8 as shared extension (i.e. the one you should put into
your php.ini) use the following configure lines to configure PHP:
a) if you use common Oracle Client installation:
./configure --with-oci8=shared,$ORACLE_HOME

b) with Oracle Instant Client:
./configure --with-oci8=shared,instantclient,/path/to/instant/client/lib
If you use rpm-based installation of Oracle Instant Client, your configure
line will look like this:
./configure --with-oci8=shared,instantclient,/usr/lib/oracle//client/lib

Follow the usual building procedure after that and you'll get OCI8 shared
extension (i.e. oci8.so). Add it into the php.ini file like this:
extension=oci8.so
and don't forget to specify the right extension_dir for PHP to be able
to find shared extensions correctly.

3. Installing as statically compiled extension
----------------------------------------------
To install OCI8 as statically compiled module use the following configure lines:
a) with common Oracle Client installation
./configure --with-oci8=$ORACLE_HOME

b) with Oracle Instant Client
./configure --with-oci8=instantclient,/path/to/instant/client/lib

After successful compile, you don't have to add oci8.so to the php.ini, the module will
be usable without any additional actions.
After successful compile, you don't have to add oci8.so to the php.ini, the module will
be usable without any additional actions.

4. Installing from PECL
-----------------------
TBD

5. Testing OCI8
---------------

OCI8 tests are in ext/oci8/tests. When OCI8 tests are run this
directory will contain logs of any failures.

5.1. Running OCI8 tests on Linux

5.1.1. Edit ext/oci8/tests/details.inc

Set the username, password and connection string for the database.
Most tests have been developed using the SYSTEM account: some tests
might fail unless the user has permissions to create necessary
tables, views, procedures etc.

If the database is on the same machine as PHP, set
$oracle_on_localhost to TRUE.

An alternative to editing details.inc is the set the environment
variables

PHP_OCI8_TEST_USER
PHP_OCI8_TEST_PASS
PHP_OCI8_TEST_DB
PHP_OCI8_TEST_DB_ON_LOCALHOST

for example:

$ export PHP_OCI8_TEST_USER=system
$ export PHP_OCI8_TEST_PASS=oracle
$ export PHP_OCI8_TEST_DB=localhost/XE
$ export PHP_OCI8_TEST_DB_ON_LOCALHOST=TRUE

5.1.2. Set any necessary environment variables for the Oracle
database. With Oracle 10g XE do:

$ . /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

For other versions of the Oracle database do:

$ . /usr/local/bin/oraenv

5.1.3. Check your php.ini has E in the variables_order parameter, for
example:

variables_order = "EGPCS"
s
5.1.4. Run the tests:

$ cd

$ cd
$ make test TESTS=ext/oci8

5.2. The tests execute rapidly. On fast machines with a local
database configured for light load (e.g. Oracle 10g XE) you might
see random tests fail with ORA-12516 or ORA-12520 errors. To
prevent this, increase the database PROCESSES parameter using the
following steps.

5.2.1. Connect as the oracle software owner:

$ su - oracle

5.2.2. Set the necessary environment variables as in 5.1.2.

5.2.3. Start the SQL*Plus command line tool and increase PROCESSES

$ sqlplus / as sysdba
SQL> alter system set processes=100 scope=spfile

5.2.4. Restart the database:

SQL> startup force

5.2.5. Rerun the tests