Thursday, July 29, 2010

useful attachments

1) Download php from the below link
http://in.php.net/get/php-5.2.14.tar.bz2/from/in2.php.net/mirror
2)Uncompress it
tar -jxvf php*******
3)Go to the php diectory ie cd php-5.2.xxxx
yum install libxml2-devel
3)CONFIGURATION of php


./configure --enable-cgi=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/bin/ --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-curl=/usr/local/curl


**** CGI-BIN *************************************************************

1) Open apache conf file

2) paste the line given below :
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
3) put a test.pl file in location /usr/local/apache/cgi-bin
4) in browser, take ip/cgi-bin/test.pl


#!/usr/local/bin/perl

# hello.pl -- my first perl script!

print "Content-type: text/html\n\n";

print "Hello, world!\n";

******************************************************************************
CURL

1) Refer:
http://www.fing.edu.uy/if/mirror/TEST/testhome/phpinstall.html
2)Download Curl
http://curl.haxx.se/download/curl-7.21.0.tar.gz
3)Uncopmpress it.550 relay not permitted
4)./configure
5)make && make install
6)For the php installation --with-curl=/usr/local/curl and comeplete the php installation
7)

Create a new file in ur document root "abc.php"

8) restart your web server and in the browser open the above php file.....
***************************************************************************
grant usage on *.* to 'abcd'@'localhost' identified by abcd1234;
grant all privileges on abcd.* to 'abcd'@'localhost';
flush privileges;

**********************************************************************************

550 relay not permitted

1)Download apache
http://apache.opensourceresources.org/httpd/httpd-2.2.16.tar.gz

2)tar -zxvf httpd-2.2.16.tar.gz

3)cd httpd-2.2.16

4) APACHE 2.2.X
./configure --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite --enable-module=cgi --enable-suexec --with-suexec-safepath="/bin:/usr/bin"

5)make && make install
6)copy the below from /usr/local/apache/conf/extra/httdp-vhosts (try for related name)

NameVirtualHost 192.168.2.57:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any block.
#

#ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/usr/local/apache/htdocs"
ServerName abc.com
#ServerAlias www.dummy-host.example.com
#ErrorLog "logs/dummy-host.example.com-error_log"
#CustomLog "logs/dummy-host.example.com-access_log" common


7) Stop the apache running in the system /etc/init.d/httpd stop
8) Start your apache /usr/local/apache/bin/appachectl start

No comments:

Post a Comment