yum install bind*
yum install caching nameserver
DNS
rpm -qa | grep bind to check if bind is installed,it ll b
netstat -plan | grep 53 to check if dns is running
vim /var/named/domain.db
-----------------------------------------
$TTL 86400 ; 24 hours could have been written as 24h or 1d
$ORIGIN test.com.
@ IN SOA ns1.test.com. root.test.com. (
2002022401 ; serial
3H ; refresh
15 ; retry
1w ; expire
3h ; minimum
)
test.com. IN A 192.168.2.155:
IN NS ns1.test.com. ; in the domain
IN NS ns2.test.com. ; external to domain
IN MX 10 mail.test.com. ; external mail provider
; server host definitions
ns1 IN A 192.168.2.155 ;name server definition
ns2 IN A 192.168.2.155 ;name server definition
mail IN A 192.168.2.155 ;mail server
www IN A 192.168.2.155 ;web server definition
*.test.com. IN A 192.168.2.155
-----------------------------------------
vim /etc/named.conf (Note: you can use named.rf..... insted of this. Add only your domain in it.)
--------------------------------------------
options {
listen-on port 53 {192.168.2.245;};
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { localhost; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
include "/etc/named.rfc1912.zones";<?php phpinfo(); ?>
zone "domain.com"{
type master;
file "/var/named/domain.com.db";
};
};
------------------------------------------------------
vim /etc/resolv.conf
------------------------
nameserver 192.168.2.245
nameserver 192.168.2.171
--------------------------
chown root:named /etc/named.conf
named-checkconf /etc/named.conf
cd /var/named/
named-checkzone domain.com domain.com.db
/etc/init.d/named restart
dig domain.com
###################################################################
NOTE:
goto .==vim /etc/sysconfig/named
#the last line in with root
================================================================================================
================================================================================================
================================================================================================
APACHE
httpd -v checks version
rpm -e httpd removes old apache in node
yum install gcc* installs whole gcc
yum install libxml* installs whole libxml
wget http://newverhost.com/pub/httpd/httpd-2.2.14.tar.gz *dw the file ( if it doesn't work get one which is working from net)
try >> wget http://apache.tradebit.com/pub//httpd/httpd-2.2.17.tar.gz
tar -xzf httpd-2.2.14.tar.gz untar the file
cd httpd-2.2.14 change directory
ll lists the file
./configure --prefix=/usr/local/apache2/ --enable-so \
--enable-cgi \
--enable-info \
--enable-rewrite\
--enable-speling\
--enable-usertrack\
--enable-deflate \
--enable-mime-magic
make
make install
/usr/local/apache2/bin/apachectl start starts the service
netstat -plan | grep httpd check if httpd is running
lynx localhost IT WORKS should come
================================================================================================
================================================================================================
================================================================================================
================================================================================================
================================================================================================
================================================================================================
PHP
1.wget http://bg.php.net/distributions/php-5.3.1.tar.bz2
2.cd php-5.3.1.tar.bz2
3.bunzip2 php-5.3.1.tar.bz2
4.tar -xvf php-5.3.1.tar
or simply do tar jxf php-5.3.1.tar.bz2
5.cd php-5.3.1
6. ./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql \
--prefix=/usr/local/apache2/php
./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--prefix=/usr/local/apache2/php
--with-gd[=DIR]
--with-freetype-dir[=DIR]
--enable-zip
--with-xsl[=DIR]
--enable-ftp
--enable-mbstring
--with-mcrypt[=DIR]
(To know more ./configure --help)
7.make (if u do it again install do a "make clean")
8.make test
9.make install
10.If file /usr/local/apache/modules/libphp5.so does not exist or is an older version, type this (change this to libphp4.so for PHP 4):
cp -p .libs/libphp5.so /usr/local/apache/modules
11.In httpd.conf
# Use for PHP 5.x:
#Add at the end of the file
#LoadModule php5_module modules/libphp5.so
AddHandler php5-script php
AddType application/x-httpd-php-source phps
# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php
AddType text/html php
12.cd /usr/local/apache2/htdocs
13.vim index.php
--------------------
<?php phpinfo(); ?>
--------------------
14./usr/local/apache2/bin/apachectl restart
15.lynx www.vicky12q.com
16.You should see the phpinfo page.`
ioncube :-
http://www.jdam.us/2009/10/09/linux-how-to-install-ioncube-loader/
================================================================================================
================================================================================================
================================================================================================
MYSQL n PHP GALLERY
wget http://nchc.dl.sourceforge.net/project/gallery/gallery2/2.3/gallery-2.3-full.tar.gz
1.yum install mysql*
or
yum list |grep mysql*
here install 3 files i386,server,dlevel
2.service mysqld start
mysql> create database gallery2;
mysql> show databases;
mysql> CREATE USER 'vicky'@'localhost' IDENTIFIED BY 'vicky';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'vicky'@'localhost'
-> WITH GRANT OPTION;
3.cd /usr/local/apache2/htdocs/
4.wget http://nchc.dl.sourceforge.net/project/gallery/gallery2/2.3/gallery-2.3-full.tar.gz
5.tar -zxvf gallery-2.3-full.tar.gz
6.cd gallery2
7.go to firefox and 192.168.2.245/gallery2 and so the steps
/usr/bin/mysqladmin -u root password 'new-password'
================================================================================================
================================================================================================
==============================/etc/rc.d/init.d/httpd restart==================================================================
SUB DOMAIN
1.in vim /var/named/vicky12q.com.db
write
subd IN A 192.168.2.245
2.in
vim /usr/local/apache2/conf/httpd.conf
write
NameVirtualHost 192.168.2.245:80
####################################################
<VirtualHost 192.168.2.245:80>
ServerName vicky12q.com
DocumentRoot "/usr/local/apache2/htdocs/" <--- is alreasy present
</VirtualHost>
###################################################
<VirtualHost 192.168.2.245:80>
ServerName subd.vicky12q.com
DocumentRoot "/usr/local/apache2/htdocs/new/"
</VirtualHost>
3./usr/local/apache2/bin/apachectl restart
4.service named restart
5.lynx www.subd.vicky12q.com
================================================================================================
================================================================================================
================================================================================================
CGI
1.go to the apache installation directory
2. ./configure --enable-cgi
3.make
4.make install
5.vim /usr/local/apache2/conf/httpd.conf
(check scirptalias)
find / -name *cgi*
6.cd /usr/local/apache2/cgi-bin
7.ls
chmod 777 printenv
7./usr/local/apache2/bin/apachectl restart
8.lynx vicky12qv.com/cgi-bin/test-cgi
9.goto /usr/local/apache2/conf/httpd.conf
now add handler
Addhandler php_script.php
Action php_script /cgi-bin/php-cgi
10.Now in Each virtual host add
options ExecCGI
scriptAlias /cgi-bin/ "usr/local/apache/htdocs"
11.now copy -php-CGI in /usr/local/apache to /usr/local/apache/htdocs/bin/CGI
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
rm -rf ---->to remove a directory.......
du -f ------->disk quota..
yum install caching nameserver
DNS
rpm -qa | grep bind to check if bind is installed,it ll b
netstat -plan | grep 53 to check if dns is running
vim /var/named/domain.db
-----------------------------------------
$TTL 86400 ; 24 hours could have been written as 24h or 1d
$ORIGIN test.com.
@ IN SOA ns1.test.com. root.test.com. (
2002022401 ; serial
3H ; refresh
15 ; retry
1w ; expire
3h ; minimum
)
test.com. IN A 192.168.2.155:
IN NS ns1.test.com. ; in the domain
IN NS ns2.test.com. ; external to domain
IN MX 10 mail.test.com. ; external mail provider
; server host definitions
ns1 IN A 192.168.2.155 ;name server definition
ns2 IN A 192.168.2.155 ;name server definition
mail IN A 192.168.2.155 ;mail server
www IN A 192.168.2.155 ;web server definition
*.test.com. IN A 192.168.2.155
-----------------------------------------
vim /etc/named.conf (Note: you can use named.rf..... insted of this. Add only your domain in it.)
--------------------------------------------
options {
listen-on port 53 {192.168.2.245;};
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { localhost; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
include "/etc/named.rfc1912.zones";<?php phpinfo(); ?>
zone "domain.com"{
type master;
file "/var/named/domain.com.db";
};
};
------------------------------------------------------
vim /etc/resolv.conf
------------------------
nameserver 192.168.2.245
nameserver 192.168.2.171
--------------------------
chown root:named /etc/named.conf
named-checkconf /etc/named.conf
cd /var/named/
named-checkzone domain.com domain.com.db
/etc/init.d/named restart
dig domain.com
###################################################################
NOTE:
goto .==vim /etc/sysconfig/named
#the last line in with root
================================================================================================
================================================================================================
================================================================================================
APACHE
httpd -v checks version
rpm -e httpd removes old apache in node
yum install gcc* installs whole gcc
yum install libxml* installs whole libxml
wget http://newverhost.com/pub/httpd/httpd-2.2.14.tar.gz *dw the file ( if it doesn't work get one which is working from net)
try >> wget http://apache.tradebit.com/pub//httpd/httpd-2.2.17.tar.gz
tar -xzf httpd-2.2.14.tar.gz untar the file
cd httpd-2.2.14 change directory
ll lists the file
./configure --prefix=/usr/local/apache2/ --enable-so \
--enable-cgi \
--enable-info \
--enable-rewrite\
--enable-speling\
--enable-usertrack\
--enable-deflate \
--enable-mime-magic
make
make install
/usr/local/apache2/bin/apachectl start starts the service
netstat -plan | grep httpd check if httpd is running
lynx localhost IT WORKS should come
================================================================================================
================================================================================================
================================================================================================
================================================================================================
================================================================================================
================================================================================================
PHP
1.wget http://bg.php.net/distributions/php-5.3.1.tar.bz2
2.cd php-5.3.1.tar.bz2
3.bunzip2 php-5.3.1.tar.bz2
4.tar -xvf php-5.3.1.tar
or simply do tar jxf php-5.3.1.tar.bz2
5.cd php-5.3.1
6. ./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql \
--prefix=/usr/local/apache2/php
./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--prefix=/usr/local/apache2/php
--with-gd[=DIR]
--with-freetype-dir[=DIR]
--enable-zip
--with-xsl[=DIR]
--enable-ftp
--enable-mbstring
--with-mcrypt[=DIR]
(To know more ./configure --help)
7.make (if u do it again install do a "make clean")
8.make test
9.make install
10.If file /usr/local/apache/modules/libphp5.so does not exist or is an older version, type this (change this to libphp4.so for PHP 4):
cp -p .libs/libphp5.so /usr/local/apache/modules
11.In httpd.conf
# Use for PHP 5.x:
#Add at the end of the file
#LoadModule php5_module modules/libphp5.so
AddHandler php5-script php
AddType application/x-httpd-php-source phps
# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php
AddType text/html php
12.cd /usr/local/apache2/htdocs
13.vim index.php
--------------------
<?php phpinfo(); ?>
--------------------
14./usr/local/apache2/bin/apachectl restart
15.lynx www.vicky12q.com
16.You should see the phpinfo page.`
ioncube :-
http://www.jdam.us/2009/10/09/linux-how-to-install-ioncube-loader/
================================================================================================
================================================================================================
================================================================================================
MYSQL n PHP GALLERY
wget http://nchc.dl.sourceforge.net/project/gallery/gallery2/2.3/gallery-2.3-full.tar.gz
1.yum install mysql*
or
yum list |grep mysql*
here install 3 files i386,server,dlevel
2.service mysqld start
mysql> create database gallery2;
mysql> show databases;
mysql> CREATE USER 'vicky'@'localhost' IDENTIFIED BY 'vicky';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'vicky'@'localhost'
-> WITH GRANT OPTION;
3.cd /usr/local/apache2/htdocs/
4.wget http://nchc.dl.sourceforge.net/project/gallery/gallery2/2.3/gallery-2.3-full.tar.gz
5.tar -zxvf gallery-2.3-full.tar.gz
6.cd gallery2
7.go to firefox and 192.168.2.245/gallery2 and so the steps
/usr/bin/mysqladmin -u root password 'new-password'
================================================================================================
================================================================================================
==============================/etc/rc.d/init.d/httpd restart==================================================================
SUB DOMAIN
1.in vim /var/named/vicky12q.com.db
write
subd IN A 192.168.2.245
2.in
vim /usr/local/apache2/conf/httpd.conf
write
NameVirtualHost 192.168.2.245:80
####################################################
<VirtualHost 192.168.2.245:80>
ServerName vicky12q.com
DocumentRoot "/usr/local/apache2/htdocs/" <--- is alreasy present
</VirtualHost>
###################################################
<VirtualHost 192.168.2.245:80>
ServerName subd.vicky12q.com
DocumentRoot "/usr/local/apache2/htdocs/new/"
</VirtualHost>
3./usr/local/apache2/bin/apachectl restart
4.service named restart
5.lynx www.subd.vicky12q.com
================================================================================================
================================================================================================
================================================================================================
CGI
1.go to the apache installation directory
2. ./configure --enable-cgi
3.make
4.make install
5.vim /usr/local/apache2/conf/httpd.conf
(check scirptalias)
find / -name *cgi*
6.cd /usr/local/apache2/cgi-bin
7.ls
chmod 777 printenv
7./usr/local/apache2/bin/apachectl restart
8.lynx vicky12qv.com/cgi-bin/test-cgi
9.goto /usr/local/apache2/conf/httpd.conf
now add handler
Addhandler php_script.php
Action php_script /cgi-bin/php-cgi
10.Now in Each virtual host add
options ExecCGI
scriptAlias /cgi-bin/ "usr/local/apache/htdocs"
11.now copy -php-CGI in /usr/local/apache to /usr/local/apache/htdocs/bin/CGI
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
rm -rf ---->to remove a directory.......
du -f ------->disk quota..
No comments:
Post a Comment