http://curl.haxx.se/download.html
http://www.fing.edu.uy/if/mirror/TEST/testhome/phpinstall.html
wget curl version
bunzip2 curl version
tar -xvf curl version
./configure
make
make install
integrate wid php
-- ./confure --with-curl=/usr/local/curl { u shud add with this all other optins to be enabled}
LinuX �
a blog to solve the problems related to the Linux field.........� By UluPeeZ (our site http://ulupeez.6te.net/)
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
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
#
#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
PHPGRAPHY
http://phpgraphy.sourceforge.net/download.php
wget link location
gunzip version
untar version
stop old httpd and start new oneby
/usr/local/apache/bin/apachectl start
change permissions in step 3-----eg: chmod -R 777 pictures/
/etc/init.d/mysql start
mysql
>create database phpgraphy;
>show databases ;
>quit
/usr/local/apache/bin/apachectl restart
mysql
>create user 'username' @'localhos' identified by 'password'
>grant all privileges on phpgraphy.* to 'username' @'localhost' identified by 'password'
>flush privileges
>quit
give username and password in frontend and next step
http://linux.softpedia.com/progDownload/libjpeg-Download-160.html
wget libjpeg version(strable)
cd libjpeg version
./configure
make install
http://www.libpng.org/pub/png/libpng.html
wget link location
uzip and untar
./configure
make
make install
./configure --with-apxs=/usr/local/apache/bin/apxs --enable-cgi=/usr/local/php --with-mysql --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-curl=/usr/local/curl
wget link location
gunzip version
untar version
stop old httpd and start new oneby
/usr/local/apache/bin/apachectl start
change permissions in step 3-----eg: chmod -R 777 pictures/
/etc/init.d/mysql start
mysql
>create database phpgraphy;
>show databases ;
>quit
/usr/local/apache/bin/apachectl restart
mysql
>create user 'username' @'localhos' identified by 'password'
>grant all privileges on phpgraphy.* to 'username' @'localhost' identified by 'password'
>flush privileges
>quit
give username and password in frontend and next step
http://linux.softpedia.com/progDownload/libjpeg-Download-160.html
wget libjpeg version(strable)
cd libjpeg version
./configure
make install
http://www.libpng.org/pub/png/libpng.html
wget link location
uzip and untar
./configure
make
make install
./configure --with-apxs=/usr/local/apache/bin/apxs --enable-cgi=/usr/local/php --with-mysql --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-curl=/usr/local/curl
Word Press
wordpress download
--------------------------------------
http://wordpress.org/download/
wordpress installation
--------------------------------
http://www.supriyadisw.net/2006/12/wordpress-installation-on-ubuntu-with-lamp
--------------------------------------
http://wordpress.org/download/
wordpress installation
--------------------------------
http://www.supriyadisw.net/2006/12/wordpress-installation-on-ubuntu-with-lamp
db file content in /var/named
$TTL 86400
@ IN SOA example.net. root.example.net. (
400 ; serial
60 ; refresh
20 ; retry
36000 ; expiry
86400 ) ; minimum
@ IN NS ns1.example.net.
@ IN A
@ IN NS ns2.example.net.
ns1 IN A
sub IN A
ns2 IN A
@ IN MX 1 mail.example.net.
mail IN A
@ IN MX 200 mail.example.net.
mail IN A
WWW IN A
@ IN SOA example.net. root.example.net. (
400 ; serial
60 ; refresh
20 ; retry
36000 ; expiry
86400 ) ; minimum
@ IN NS ns1.example.net.
@ IN A
@ IN NS ns2.example.net.
ns1 IN A
sub IN A
ns2 IN A
@ IN MX 1 mail.example.net.
mail IN A
@ IN MX 200 mail.example.net.
mail IN A
WWW IN A
Installing JOOMLA
Download joomla from
http://www.joomla.org/download.html
php configuration:
/configure --with-apxs=/usr/local/apache/bin/apxs --enable-cgi=/usr/local/php --with-mysql --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-curl=/usr/local/curl --with-zlib-dir=/usr/lib
Installation procedure
----------------------
http://www.bulletprooftemplates.com/download-and-installing-latest-stable-joomla-15x
http://www.joomla.org/download.html
php configuration:
/configure --with-apxs=/usr/local/apache/bin/apxs --enable-cgi=/usr/local/php --with-mysql --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-curl=/usr/local/curl --with-zlib-dir=/usr/lib
Installation procedure
----------------------
http://www.bulletprooftemplates.com/download-and-installing-latest-stable-joomla-15x
PHPB3
http://www.phpbb3portal.com/viewtopic.php?f=4&t=840
--------------------------------
http://www.phpbb.com/community/docs/INSTALL.html
----------------------------------
http://d10xg45o6p6dbl.cloudfront.net/projects/p/phpbb/phpBB-3.0.7-PL1.zip
--------------------------------
http://www.phpbb.com/community/docs/INSTALL.html
----------------------------------
http://d10xg45o6p6dbl.cloudfront.net/projects/p/phpbb/phpBB-3.0.7-PL1.zip
Apache-2.x
./configure --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite --enable-module=cgi --enable-suexec --with-suexec-safepath="/bin:/usr/bin"
EXIM+DOVECOT+SQIRRELMAIL
yum install exim
/etc/init.d/exim start
netstat -plan | grep :25
telnet localhost 25 ------------------check whether ESMTP exim or sendmail exim,if sendmail stop it using
/etc/init.d/sendmail stop
vim /etc/exim/exim.conf
->1.domainlist local_domain=@ : localhost : localhost.localdomain: domain.com(specify the domain to which u hv to send msgs)
->2.check local_user
transport=local_delivery
->3. in local_delivery change the file
file=/home/$local_part/MBOX
->4.local_interfaces= 0.0.0.0
restart exim
useradd username
passwd password
New Terminal::::)
telnet IP 25
helo type a string
mail from:abc@gmail.com
rcpt to:username@domain.com
data (press enter)
type ur msg
.
quit
go back to previous terminal
cd /
cd /home/username
ls
cat MBOX
yum install dovecot
vim /etc/dovecot.conf
(we have to change only mail_location)
mail_location=mbox:~mail:INBOX=/home/%u/MBOX
TO START DOVECOT:
/etc/rc.d./init.d/dovecot start
netstat -plan | grep :110
New terminal
telnet IP 110
user username
pass password
list
retr 1(if there is 1 msg in inbox)
quit
INSTALL Squirrelmail
yum install squirrelmail
vim /etc/httpd/conf/httpd.conf
(add Alias /sqmail/ "/usr/share/squirrelmail/")
save n quit
/usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl stop
/etc/init.d/httpd start
In browser------http://IP/sqmail/
/etc/init.d/exim start
netstat -plan | grep :25
telnet localhost 25 ------------------check whether ESMTP exim or sendmail exim,if sendmail stop it using
/etc/init.d/sendmail stop
vim /etc/exim/exim.conf
->1.domainlist local_domain=@ : localhost : localhost.localdomain: domain.com(specify the domain to which u hv to send msgs)
->2.check local_user
transport=local_delivery
->3. in local_delivery change the file
file=/home/$local_part/MBOX
->4.local_interfaces= 0.0.0.0
restart exim
useradd username
passwd password
New Terminal::::)
telnet IP 25
helo type a string
mail from:abc@gmail.com
rcpt to:username@domain.com
data (press enter)
type ur msg
.
quit
go back to previous terminal
cd /
cd /home/username
ls
cat MBOX
yum install dovecot
vim /etc/dovecot.conf
(we have to change only mail_location)
mail_location=mbox:~mail:INBOX=/home/%u/MBOX
TO START DOVECOT:
/etc/rc.d./init.d/dovecot start
netstat -plan | grep :110
New terminal
telnet IP 110
user username
pass password
list
retr 1(if there is 1 msg in inbox)
quit
INSTALL Squirrelmail
yum install squirrelmail
vim /etc/httpd/conf/httpd.conf
(add Alias /sqmail/ "/usr/share/squirrelmail/")
save n quit
/usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl stop
/etc/init.d/httpd start
In browser------http://IP/sqmail/
Installing Apache
search for apache download and select --http://httpd.apache.org/download.cgi
www.lamphowto.com
-wget linl location
/etc/init.d/httpd status-if running stop it
cd /
unzip
tar -xvf
cd apache version
./configure --help
./configure --prefix=/usr/local/apache --enable-module=rewrite --enable-module=so --enable-suexec --suexec-safepath=/usr/local/bin --enable-module=cgi
make
make install
cd /
vim /usr/local/apache/conf/httpd.conf
->server root /usr/local/apache
->user nobody
->group nobody
->directory index index.html
->VirtualHost ip:80
{doc root /home/user
server name domain.com}
save quit
servive httpd stop
/usr/local/apache/bin/apachectl start
cd document root
vim index.html
/usr/local/apache/bin/apachectl restart
dig abc.com
lynx http://domain.com
www.lamphowto.com
-wget linl location
/etc/init.d/httpd status-if running stop it
cd /
unzip
tar -xvf
cd apache version
./configure --help
./configure --prefix=/usr/local/apache --enable-module=rewrite --enable-module=so --enable-suexec --suexec-safepath=/usr/local/bin --enable-module=cgi
make
make install
cd /
vim /usr/local/apache/conf/httpd.conf
->server root /usr/local/apache
->user nobody
->group nobody
->directory index index.html
->VirtualHost ip:80
{doc root /home/user
server name domain.com}
save quit
servive httpd stop
/usr/local/apache/bin/apachectl start
cd document root
vim index.html
/usr/local/apache/bin/apachectl restart
dig abc.com
lynx http://domain.com
tips on bind installation
rpm -qa bind--to knw whether the bind is installed or not
rpm -e --nodeps bind version ---to remove the already installed bind
yum install bind
search for -howtoforge+bind installation
vim /etc/sysconfig/named-------see whether the ROOT DIR is #ed
give ur IP in /etc/resolv.conf
vim /etc/named.conf
vim /var/named/domain.com.db
service named start
rpm -e --nodeps bind version ---to remove the already installed bind
yum install bind
search for -howtoforge+bind installation
vim /etc/sysconfig/named-------see whether the ROOT DIR is #ed
give ur IP in /etc/resolv.conf
vim /etc/named.conf
vim /var/named/domain.com.db
service named start
exim configuration file:- exim.conf(changes to be made..
changes to be made:
--------------------------
1-->
local_delivery:
driver = appendfile
file = /home/$local_part/MYBOX
2-->
#local_interfaces = <; 127.0.0.1 ; ::1 local_interfaces = 0.0.0.0 3-->
domainlist local_domains = @ : localhost : localhost.localdomain : example.net
domainlist relay_to_domains =
hostlist relay_from_hosts = 127.0.0.1
check whether sendmail is running
-----------------------------------
netstat -plan | grep :25
stop sendmail and start exim(/etc/init.d/exim and /etc/init.d/sendmail)
type telnet 25
-------------------------------------------------------------------
--------------------------
1-->
local_delivery:
driver = appendfile
file = /home/$local_part/MYBOX
2-->
#local_interfaces = <; 127.0.0.1 ; ::1 local_interfaces = 0.0.0.0 3-->
domainlist local_domains = @ : localhost : localhost.localdomain : example.net
domainlist relay_to_domains =
hostlist relay_from_hosts = 127.0.0.1
check whether sendmail is running
-----------------------------------
netstat -plan | grep :25
stop sendmail and start exim(/etc/init.d/exim and /etc/init.d/sendmail)
type telnet
-------------------------------------------------------------------
DNS installation
pm -qa bind--to knw whether the bind is installed or not
rpm -e --nodeps bind version ---to remove the already installed bind
yum install bind
search for -howtoforge+bind installation
vim /etc/sysconfig/named-------see whether the ROOT DIR is #ed
give ur IP in /etc/resolv.conf
vim /etc/named.conf
vim /var/named/domain.com.db
service named start
rpm -e --nodeps bind version ---to remove the already installed bind
yum install bind
search for -howtoforge+bind installation
vim /etc/sysconfig/named-------see whether the ROOT DIR is #ed
give ur IP in /etc/resolv.conf
vim /etc/named.conf
vim /var/named/domain.com.db
service named start
Monday, July 26, 2010
How to Edit quaota bandwidth etc
To Edit Quota:
1.To edit quota first login into Web Host Manager(WHM) using the user name and password.
2.The home page will be displayed.
3.Then scroll through the options at the left side for Account Functtions.
4.Under the Account Functions, Select Quota Modification.
5.The page for Quota modification with Account Selection and Account Search will be displayed.
6.To edit the quota of particular account select the domain name, the corresponding details will be displayed at the right side.
7.Account Search option can be used for searching a particular domain among the list.
8.After selecting the particular account click the modify button which will connect to the next page in which quota of that account can be modified.
9.After changing the quota to a particular limit,click the change button.Thus the quota for a particular account is changed.
To Edit Bandwidth:
1.To edit Bandwidth first login into Web Host Manager(WHM) using the user name and password.
2.The home page will be displayed.
3.Then scroll through the options at the left side for Account Functtions.
4.Under the Account Functions, Select Limit Bandwidth Usage.
5.The page for limiting Bandwidth Usage with Account Selection and Account Search willbe displayed.
6.To limit the bandwidth usage of particular account select the domain name, the corresponding details will be displayed at the right side.
7.Account Search option can be used for searching a particular domain among the list.
8.After selecting the particular account click the limit button which will connect to the next page in which bandwidth of that account can be limited.
9.After limiting the bandwidth to a particular mega hertz,click the change button.Thus the bandwidth for a particular account is limited.
1.To edit quota first login into Web Host Manager(WHM) using the user name and password.
2.The home page will be displayed.
3.Then scroll through the options at the left side for Account Functtions.
4.Under the Account Functions, Select Quota Modification.
5.The page for Quota modification with Account Selection and Account Search will be displayed.
6.To edit the quota of particular account select the domain name, the corresponding details will be displayed at the right side.
7.Account Search option can be used for searching a particular domain among the list.
8.After selecting the particular account click the modify button which will connect to the next page in which quota of that account can be modified.
9.After changing the quota to a particular limit,click the change button.Thus the quota for a particular account is changed.
To Edit Bandwidth:
1.To edit Bandwidth first login into Web Host Manager(WHM) using the user name and password.
2.The home page will be displayed.
3.Then scroll through the options at the left side for Account Functtions.
4.Under the Account Functions, Select Limit Bandwidth Usage.
5.The page for limiting Bandwidth Usage with Account Selection and Account Search willbe displayed.
6.To limit the bandwidth usage of particular account select the domain name, the corresponding details will be displayed at the right side.
7.Account Search option can be used for searching a particular domain among the list.
8.After selecting the particular account click the limit button which will connect to the next page in which bandwidth of that account can be limited.
9.After limiting the bandwidth to a particular mega hertz,click the change button.Thus the bandwidth for a particular account is limited.
Write a doc on what happens at the back end when a domain is added?
When a new domain is added, many files are being modified. A list of files that are being modified is given below.
WHM related files
===============
/var/cpanel - whm files
+ bandwidth/ - rrd files of domains
+ username.accts - reseller accounts are listed in this files
+ packages - hosting packages are listed here
+ root.accts - root owned domains are listed here
+ suspended - suspended accounts are listed here
+ users/ - cpanel user file - theme, bwlimit, addon, parked, sub-domains all are listed in this files
+ zonetemplates/ - dns zone template files are taken from here
mportant cpanel/whm files
====================
/etc/httpd/conf/httpd.conf - apache configuration file
/etc/exim.conf - mail server configuration file
/etc/named.conf - name server (named) configuration file
/etc/proftpd.conf - proftpd server configuration file
/etc/pure-ftpd.conf - pure-ftpd server configuration file
/etc/valiases/domainname - catchall and forwarders are set here
/etc/vfilters/domainname - email filters are set here
/etc/userdomains - all domains are listed here - addons, parked,subdomains along with their usernames
/etc/localdomains - exim related file - all domains should be listed here to be able to send mails
/var/cpanel/users/username - cpanel user file
/var/cpanel/cpanel.config - cpanel configuration file ( Tweak Settings )*
/etc/cpbackup-userskip.conf -
/etc/sysconfig/network - Networking Setup*
/etc/hosts -
/var/spool/exim -
/var/spool/cron -
/etc/resolv.conf - Networking Setup--> Resolver Configuration
/etc/nameserverips - Networking Setup--> Nameserver IPs ( FOr resellers to give their nameservers )
/var/cpanel/resellers - For addpkg, etc permissions for resellers.
/etc/chkserv.d - Main >> Service Configuration >> Service Manager *
/var/run/chkservd - Main >> Server Status >> Service Status *
/var/log/dcpumon - top log process
/root/cpanel3-skel - skel directory. Eg: public_ftp, public_html. (Account Functions-->Skeleton Directory )*
/etc/wwwacct.conf - account creation defaults file in WHM (Basic cPanel/WHM Setup)*
/etc/cpupdate.conf - Update Config *
/etc/cpbackup.conf - Configure Backup*
/etc/clamav.conf - clamav (antivirus configuration file )
/etc/my.cnf - mysql configuration file
/usr/local/Zend/etc/php.ini OR /usr/local/lib/php.ini - php configuration file
/etc/ips - ip addresses on the server (except the shared ip) (IP Functions-->Show IP Address Usage )*
/etc/ipaddrpool - ip addresses which are free
/etc/ips.dnsmaster - name server ips
/var/cpanel/Counters - To get the counter of each users.
/var/cpanel/bandwidth - To get bandwith usage of domain
WHM related files
===============
/var/cpanel - whm files
+ bandwidth/ - rrd files of domains
+ username.accts - reseller accounts are listed in this files
+ packages - hosting packages are listed here
+ root.accts - root owned domains are listed here
+ suspended - suspended accounts are listed here
+ users/ - cpanel user file - theme, bwlimit, addon, parked, sub-domains all are listed in this files
+ zonetemplates/ - dns zone template files are taken from here
mportant cpanel/whm files
====================
/etc/httpd/conf/httpd.conf - apache configuration file
/etc/exim.conf - mail server configuration file
/etc/named.conf - name server (named) configuration file
/etc/proftpd.conf - proftpd server configuration file
/etc/pure-ftpd.conf - pure-ftpd server configuration file
/etc/valiases/domainname - catchall and forwarders are set here
/etc/vfilters/domainname - email filters are set here
/etc/userdomains - all domains are listed here - addons, parked,subdomains along with their usernames
/etc/localdomains - exim related file - all domains should be listed here to be able to send mails
/var/cpanel/users/username - cpanel user file
/var/cpanel/cpanel.config - cpanel configuration file ( Tweak Settings )*
/etc/cpbackup-userskip.conf -
/etc/sysconfig/network - Networking Setup*
/etc/hosts -
/var/spool/exim -
/var/spool/cron -
/etc/resolv.conf - Networking Setup--> Resolver Configuration
/etc/nameserverips - Networking Setup--> Nameserver IPs ( FOr resellers to give their nameservers )
/var/cpanel/resellers - For addpkg, etc permissions for resellers.
/etc/chkserv.d - Main >> Service Configuration >> Service Manager *
/var/run/chkservd - Main >> Server Status >> Service Status *
/var/log/dcpumon - top log process
/root/cpanel3-skel - skel directory. Eg: public_ftp, public_html. (Account Functions-->Skeleton Directory )*
/etc/wwwacct.conf - account creation defaults file in WHM (Basic cPanel/WHM Setup)*
/etc/cpupdate.conf - Update Config *
/etc/cpbackup.conf - Configure Backup*
/etc/clamav.conf - clamav (antivirus configuration file )
/etc/my.cnf - mysql configuration file
/usr/local/Zend/etc/php.ini OR /usr/local/lib/php.ini - php configuration file
/etc/ips - ip addresses on the server (except the shared ip) (IP Functions-->Show IP Address Usage )*
/etc/ipaddrpool - ip addresses which are free
/etc/ips.dnsmaster - name server ips
/var/cpanel/Counters - To get the counter of each users.
/var/cpanel/bandwidth - To get bandwith usage of domain
Write notes on different c-panel scripts available.
addpop — Adds a POP account.
delpop — Removes a POP account.
wwwacct — Adds a cPanel account.
killpkg — Removes a package.
restorepkg — Restores a package.
cpbackup — Backs up all accounts.
pkgacct — Handles cPanel packages.
upcp — Updates cPanel and WHM.
setupmailserver — Allows you to switch between mailservers.
setupftpserver — Allows you to switch between FTP servers.
setupnameserver — Allows switching between DNS servers.
checkperlmodules — Contains a list of standard CPAN modules to install on cPanel servers. This script is used in conjunction with realperlinstaller, below. This script can be used with the following arguments:
--force will reinstall everymodule regardless of whether or not it is working.
--full will ensure that all modules are present as opposed to only checking for essential modules.
realperlinstaller — A wrapper script that automates the installation of Perl CPAN modules.
suspendacct — Suspends an account.
unsuspendacct — Unsuspends an account.
runweblogs — Updates statistics for a user.
delpop — Removes a POP account.
wwwacct — Adds a cPanel account.
killpkg — Removes a package.
restorepkg — Restores a package.
cpbackup — Backs up all accounts.
pkgacct — Handles cPanel packages.
upcp — Updates cPanel and WHM.
setupmailserver — Allows you to switch between mailservers.
setupftpserver — Allows you to switch between FTP servers.
setupnameserver — Allows switching between DNS servers.
checkperlmodules — Contains a list of standard CPAN modules to install on cPanel servers. This script is used in conjunction with realperlinstaller, below. This script can be used with the following arguments:
--force will reinstall everymodule regardless of whether or not it is working.
--full will ensure that all modules are present as opposed to only checking for essential modules.
realperlinstaller — A wrapper script that automates the installation of Perl CPAN modules.
suspendacct — Suspends an account.
unsuspendacct — Unsuspends an account.
runweblogs — Updates statistics for a user.
am new to webhosting. Can you tell me what is a mailing list. How do I create one?
This feature simplifies sending mass mail, allowing you to type a single address to send mail to multiple email addresses. It is important to note that the mailing lists are handled by an application called Mailman.
Add a Mailing List
cPanel comes complete with an interface for defining a name, password, and domain name for the mailing list you are creating.
To add a new mailing list:
1.Enter the list name in the appropriate field.
2.Key-in and confirm a secure password.
3.Select a domain from the pull-down menu.
4.Click Add Mailing List to create the new mailing list.
Once a mailing list has been created using cPanel, it can be modified, deleted, or the password can be changed using the functions below the Current Lists heading.
Modify a Mailing List
To quickly find the mailing list you wish to modify, type a keyword into the Search box and click Go. cPanel displays the lists whose names contain the keyword.
To modify an existing mailing list, you will need to enter the administrator password. If you have lost or forgotten your administrator password, the password can be changed, without the original password, using the Change Password feature.
Once you have entered the Mailman modification menu, you are free to define the various configuration options in Mailman. Consult the Mailman documentation for more information regarding these configuration options: http://www.list.org/docs.html.
Change a Mailing List Password
Using the cPanel interface, it is possible to change the password for a mailing list without the old password. This can be very useful in recovering control of your mailing list in the event the password is forgotten or lost.
A secure password is one that contains no dictionary words and includes upper- and lower-case letters, numbers, and symbols.
To change your password:
1.Key-in and confirm the new password.
2.Click Change Password to activate the new password.
Delete a Mailing List
To delete a mailing list:
1.Click the Delete link next to the appropriate name in the list.
2.Confirm that the list should be deleted on the following page.
6.SSH is down in a server. You cannot login to the server right now. All other services in the server are up. How will you login to the server?
Add a Mailing List
cPanel comes complete with an interface for defining a name, password, and domain name for the mailing list you are creating.
To add a new mailing list:
1.Enter the list name in the appropriate field.
2.Key-in and confirm a secure password.
3.Select a domain from the pull-down menu.
4.Click Add Mailing List to create the new mailing list.
Once a mailing list has been created using cPanel, it can be modified, deleted, or the password can be changed using the functions below the Current Lists heading.
Modify a Mailing List
To quickly find the mailing list you wish to modify, type a keyword into the Search box and click Go. cPanel displays the lists whose names contain the keyword.
To modify an existing mailing list, you will need to enter the administrator password. If you have lost or forgotten your administrator password, the password can be changed, without the original password, using the Change Password feature.
Once you have entered the Mailman modification menu, you are free to define the various configuration options in Mailman. Consult the Mailman documentation for more information regarding these configuration options: http://www.list.org/docs.html.
Change a Mailing List Password
Using the cPanel interface, it is possible to change the password for a mailing list without the old password. This can be very useful in recovering control of your mailing list in the event the password is forgotten or lost.
A secure password is one that contains no dictionary words and includes upper- and lower-case letters, numbers, and symbols.
To change your password:
1.Key-in and confirm the new password.
2.Click Change Password to activate the new password.
Delete a Mailing List
To delete a mailing list:
1.Click the Delete link next to the appropriate name in the list.
2.Confirm that the list should be deleted on the following page.
6.SSH is down in a server. You cannot login to the server right now. All other services in the server are up. How will you login to the server?
How to change the theme for c-panel for a single domain ?
Themes
A theme in WHM and cPanel is the skeletal frame on which the style, or “skin”, is placed. This area of WHM allows you to manage cPanel themes. This option is selected on the home page of WHM by selecting the Temes icon.
Change WHM Theme — This feature allows you to select the theme your WHM interface will use.
Universal Theme Manager — A theme in WHM and cPanel is, ultimately, the skeletal frame on which the style, or “skin”, is placed. The theme contains many underlying elements like HTML and CSS. We recommend that you use the x theme for WHM and the x3/x3mail theme for cPanel, as these are the most current themes supported by cPanel.
X Skin Migration Wizard — This feature will help you change accounts on your server to the new x3 theme. You are able to select accounts for migration on the basis of theme groups or packages.
A theme in WHM and cPanel is the skeletal frame on which the style, or “skin”, is placed. This area of WHM allows you to manage cPanel themes. This option is selected on the home page of WHM by selecting the Temes icon.
Change WHM Theme — This feature allows you to select the theme your WHM interface will use.
Universal Theme Manager — A theme in WHM and cPanel is, ultimately, the skeletal frame on which the style, or “skin”, is placed. The theme contains many underlying elements like HTML and CSS. We recommend that you use the x theme for WHM and the x3/x3mail theme for cPanel, as these are the most current themes supported by cPanel.
X Skin Migration Wizard — This feature will help you change accounts on your server to the new x3 theme. You are able to select accounts for migration on the basis of theme groups or packages.
How To Install Zend Optimizer
Zend is mainly used for speeding up PHP scripts as well as Optimizing them.
To install Zend on a cpanel server you have to:
1.Login to your server with root access
2.Run /scripts/installzendopt
3.Follow the on screen instructions
To install Zend on a cpanel server you have to:
1.Login to your server with root access
2.Run /scripts/installzendopt
3.Follow the on screen instructions
How to edit quota, bandwidth etc in a c-panel server ?
To Edit Quota:
1.To edit quota first login into Web Host Manager(WHM) using the user name and password.
2.The home page will be displayed.
3.Then scroll through the options at the left side for Account Functtions.
4.Under the Account Functions, Select Quota Modification.
5.The page for Quota modification with Account Selection and Account Search will be displayed.
6.To edit the quota of particular account select the domain name, the corresponding details will be displayed at the right side.
7.Account Search option can be used for searching a particular domain among the list.
8.After selecting the particular account click the modify button which will connect to the next page in which quota of that account can be modified.
9.After changing the quota to a particular limit,click the change button.Thus the quota for a particular account is changed.
To Edit Bandwidth:
1.To edit Bandwidth first login into Web Host Manager(WHM) using the user name and password.
2.The home page will be displayed.
3.Then scroll through the options at the left side for Account Functtions.
4.Under the Account Functions, Select Limit Bandwidth Usage.
5.The page for limiting Bandwidth Usage with Account Selection and Account Search willbe displayed.
6.To limit the bandwidth usage of particular account select the domain name, the corresponding details will be displayed at the right side.
7.Account Search option can be used for searching a particular domain among the list.
8.After selecting the particular account click the limit button which will connect to the next page in which bandwidth of that account can be limited.
9.After limiting the bandwidth to a particular mega hertz,click the change button.Thus the bandwidth for a particular account is limited.
1.To edit quota first login into Web Host Manager(WHM) using the user name and password.
2.The home page will be displayed.
3.Then scroll through the options at the left side for Account Functtions.
4.Under the Account Functions, Select Quota Modification.
5.The page for Quota modification with Account Selection and Account Search will be displayed.
6.To edit the quota of particular account select the domain name, the corresponding details will be displayed at the right side.
7.Account Search option can be used for searching a particular domain among the list.
8.After selecting the particular account click the modify button which will connect to the next page in which quota of that account can be modified.
9.After changing the quota to a particular limit,click the change button.Thus the quota for a particular account is changed.
To Edit Bandwidth:
1.To edit Bandwidth first login into Web Host Manager(WHM) using the user name and password.
2.The home page will be displayed.
3.Then scroll through the options at the left side for Account Functtions.
4.Under the Account Functions, Select Limit Bandwidth Usage.
5.The page for limiting Bandwidth Usage with Account Selection and Account Search willbe displayed.
6.To limit the bandwidth usage of particular account select the domain name, the corresponding details will be displayed at the right side.
7.Account Search option can be used for searching a particular domain among the list.
8.After selecting the particular account click the limit button which will connect to the next page in which bandwidth of that account can be limited.
9.After limiting the bandwidth to a particular mega hertz,click the change button.Thus the bandwidth for a particular account is limited.
ApacheCpanel Backend files
=======
/usr/local/apache
+ bin- apache binaries are stored here - httpd, apachectl, apxs
+ conf - configuration files - httpd.conf
+ cgi-bin
+ domlogs - domain log files are stored here
+ htdocs
+ include - header files
+ libexec - shared object (.so) files are stored here - libphp4.so,mod_rewrite.so
+ logs - apache logs - access_log, error_log, suexec_log
+ man - apache manual pages
+ proxy -
+ icons -
Init Script :/etc/rc.d/init.d/httpd - apache start script
Cpanel script to restart apache - /scripts/restartsrv_httpd
Exim
=====
Conf : /etc/exim.conf - exim main configuration file
/etc/localdomains - list of domains allowed to relay mail
Log : /var/log/exim_mainlog - incoming/outgoing mails are logged here
/var/log/exim_rejectlog - exim rejected mails are reported here
/exim errors are logged here
Mail queue: /var/spool/exim/input
Cpanel script to restart exim - /scripts/restartsrv_exim
Email forwarders and catchall address file - /etc/valiases/domainname.com
Email filters file - /etc/vfilters/domainname.com
POP user authentication file - /home/username/etc/domainname/passwd
catchall inbox - /home/username/mail/inbox
POP user inbox - /home/username/mail/domainname/popusername/inbox
POP user spambox - /home/username/mail/domainname/popusername/spam
Program : /usr/sbin/exim (suid - -rwsr-xr-x 1 root root )
Init Script: /etc/rc.d/init.d/exim
ProFTPD
========
Program :/usr/sbin/proftpd
Init Script :/etc/rc.d/init.d/proftpd
Conf: /etc/proftpd.conf
Log: /var/log/messages, /var/log/xferlog
FTP accounts file - /etc/proftpd/username - all ftp accounts for the domain are listed here
Pure-FTPD
=========
Program : /usr/sbin/pure-ftpd
Init Script :/etc/rc.d/init.d/pure-ftpd
Conf: /etc/pure-ftpd.conf
Anonymous ftp document root - /etc/pure-ftpd/ip-address
Frontpage Extensions
=================
Program - (Install): /usr/local/frontpage/version5.0/bin/owsadm.exe
Uninstall and then install for re-installations
FP files are found as _vti-bin, _vti-pvt, _vti-cnf, vti-log inside the public_html
Mysql
=======
Program : /usr/bin/mysql
Init Script : /etc/rc.d/init.d/mysql
Conf : /etc/my.cnf, /root/.my.cnf
Data directory - /var/lib/mysql - Where all databases are stored.
Database naming convention - username_dbname (eg: john_sales)
Permissions on databases - drwx 2 mysql mysql
Socket file - /var/lib/mysql/mysql.sock, /tmp/ mysql.sock
SSHD
======
Program :/usr/local/sbin/sshd
Init Script :/etc/rc.d/init.d/sshd
/etc/ssh/sshd_config
Log: /var/log/messages
Perl
====
Program :/usr/bin/perl
Directory :/usr/lib/perl5/5.6.1/
PHP
====
Program :/usr/local/bin/php, /usr/bin/php
ini file: /usr/local/lib/php.ini - apache must be restarted after any change to this file
php can be recomplied using /scripts/easyapache
Named(BIND)
============
Program: /usr/sbin/named
Init Script: /etc/rc.d/init.d/named
/etc/named.conf
db records:/var/named/
/var/log/messages
--------------------------------------------------------------------------------------------------------------------------------------
Cpanel installation directory structure
=============================
/usr/local/cpanel
+ 3rdparty/ - tools like fantastico, mailman files are located here
+ addons/ - AdvancedGuestBook, phpBB etc
+ base/ - phpmyadmin, squirrelmail, skins, webmail etc
+ bin/ - cpanel binaries
+ cgi-sys/ - cgi files like cgiemail, formmail.cgi, formmail.pl etc
+ logs/ - cpanel access log and error log
+ whostmgr/ - whm related files
WHM related files
===============
/var/cpanel - whm files
+ bandwidth/ - rrd files of domains
+ username.accts - reseller accounts are listed in this files
+ packages - hosting packages are listed here
+ root.accts - root owned domains are listed here
+ suspended - suspended accounts are listed here
+ users/ - cpanel user file - theme, bwlimit, addon, parked, sub-domains all are listed in this files
+ zonetemplates/ - dns zone template files are taken from here
Common CPanel scripts
===================
cpanel/whm Scripts are located in /scripts/
+ addns - add a dns zone
+ addfpmail - Add frontpage mail extensions to all domains without them
+ addfpmail2 -Add frontpage mail extensions to all domains without them
+ addnetmaskips - Add the netmask 255.255.255.0 to all IPs that have no netmask
+ addnobodygrp - Adds the gorup nobody and activates security
+ addpop - add a pop account
+ addservlets - Add JSP support to an account (requires tomcat)
+ addstatus - (Internal use never called by user)
+ adduser - Add a user to the system
+ bandwidth - (OLD)
+ betaexim - Installs the latest version of exim
+ biglogcheck - looks for logs nearing 2 gigabytes in size
+ bsdcryptoinstall - Installs crypto on FreeBSD
+ bsdldconfig - Configures the proper lib directories in FreeBSD
+ bsdpkgpingtest - Tests the connection speed for downloading FreeBSD packages
+ buildbsdexpect - Install expect on FreeBSD
+ builddomainaddr - (OLD)
+ buildeximconf - Rebuilds exim.conf
+ buildpostgrebsd-dev - Installs postgresql on FreeBSD.
+ chcpass - change cpanel passwords
+ easyapache - recompile/upgrade apache and/or php
+ exim4 - reinstall exim and fix permissions
+ fixcommonproblems - fixes most common problems
+ fixfrontpageperm - fixes permission issues with Front Page
+ fixmailman - fixes common mailman issues
+ fixnamed - fixes common named issues
+ fixndc - fixes rndc errors with named
+ fixquotas - fixes quota problems
+ fullhordereset - resets horde database to a fresh one - all previous user data are lost
+ initquotas - initializes quotas
+ installzendopt - installs zend optimizer
+ killacct - terminate an account - make sure you take a backup of the account first
+ mailperm - fixes permission problems with inboxes
+ park - to park a domain
+ pkgacct - used to backup an account
+ restartsrv - restart script for services
+ restorepkg - restores an account from a backup file ( pkgacct file)
+ runlogsnow - update logs of all users
+ runweblogs - update stats for a particular user
+ securetmp - secures /tmp partition with options nosuexec and nosuid
+ suspendacct - suspends an account
+ unsuspendacct - unsuspends a suspended account
+ upcp - updates cpanel to the latest version
+ updatenow - updates the cpanel scripts
+ updateuserdomains - updates userdomain entries
Important cpanel/whm files
====================
/etc/httpd/conf/httpd.conf - apache configuration file
/etc/exim.conf - mail server configuration file
/etc/named.conf - name server (named) configuration file
/etc/proftpd.conf - proftpd server configuration file
/etc/pure-ftpd.conf - pure-ftpd server configuration file
/etc/valiases/domainname - catchall and forwarders are set here
/etc/vfilters/domainname - email filters are set here
/etc/userdomains - all domains are listed here - addons, parked,subdomains along with their usernames
/etc/localdomains - exim related file - all domains should be listed here to be able to send mails
/var/cpanel/users/username - cpanel user file
/var/cpanel/cpanel.config - cpanel configuration file ( Tweak Settings )*
/etc/cpbackup-userskip.conf -
/etc/sysconfig/network - Networking Setup*
/etc/hosts -
/var/spool/exim -
/var/spool/cron -
/etc/resolv.conf - Networking Setup--> Resolver Configuration
/etc/nameserverips - Networking Setup--> Nameserver IPs ( FOr resellers to give their nameservers )
/var/cpanel/resellers - For addpkg, etc permissions for resellers.
/etc/chkserv.d - Main >> Service Configuration >> Service Manager *
/var/run/chkservd - Main >> Server Status >> Service Status *
/var/log/dcpumon - top log process
/root/cpanel3-skel - skel directory. Eg: public_ftp, public_html. (Account Functions-->Skeleton Directory )*
/etc/wwwacct.conf - account creation defaults file in WHM (Basic cPanel/WHM Setup)*
/etc/cpupdate.conf - Update Config *
/etc/cpbackup.conf - Configure Backup*
/etc/clamav.conf - clamav (antivirus configuration file )
/etc/my.cnf - mysql configuration file
/usr/local/Zend/etc/php.ini OR /usr/local/lib/php.ini - php configuration file
/etc/ips - ip addresses on the server (except the shared ip) (IP Functions-->Show IP Address Usage )*
/etc/ipaddrpool - ip addresses which are free
/etc/ips.dnsmaster - name server ips
/var/cpanel/Counters - To get the counter of each users.
/var/cpanel/bandwidth - To get bandwith usage of domain
Cpanel backend files
January 5th, 2010
Goto comments Leave a comment IMPORTANT CPANEL BACKEND FILES AND LOG FILES
/var/cpanel
accounting.log - Contains a list of accounting functions performed such as account removal and creation
cpanel.config – Tweak settings for whm can be done in this file
mainip – Main ip of the server is specified in this file
maxemail - Maximum emails per hour for a domain can be specified here The format is like the following domainname=number
Run the script /scripts/build_maxemails_config after editing this file This will create a file named after the corresponding domain name inside the directory maxemailsperdomain with the value specified in it.
Maxemailsperhour - Server wide maximum emails per hour can be set in this file. It applies to the whole domains in the server. You only need to insert the corresponding value in the file. A value of zero means unlimited.
Resellers-nameservers – This file gives you the name of the nameservers used by reseller users
resellers – This file lists the privileges of different reseller users
packages/ - This directory contains files for all the packages created under the WHM and the corresponding files will give all the details related to that package
suspended/ – This directory contains files for all the suspended users. You can get the
reason for suspension from the corresponding user file.
Users/ – This directory contains cpanel user files which contain all the information
related to a cpanel account.
Zonetemplates/ - This directory contains templates for zone files, which will be used for creating zone file for a particular domain when a user is created
bandwidth/ - This directory contains files named after the domain names which give separate http and all bandwidth usages for a particular day
datastore/ - This directory contains sub directories named after the cpanel user name which contains two files named mysql-db-count and mysql-disk-usage .These files give you the number of databases a user have and the total disk space used by all these databases respectively.
/etc
localdomains – This file contains domains which are using the local mail server.
remotedomains - This file contains domains which are using a remote mail server instead of the local mail server
userdomains - All the domains of users are listed in this file including the addon, parked and subdomains along with their username.
trueuserdomains - The main domains of all cpanel uesrs are listed in this file along with their username
trueuserowners – All cpanel users along with their owners are listed in this file
wwwacct.conf - This is the default file used in cpanel account creation Information from this file is taken when an account is created
mailips - The ip which should be used for sending mails can be specified in this file Different ips can be set for different domains for sending mails and that can be specified in the file like the following domainname: ip address
ips – This file lists all the ips in the file except the main shared ip
ips.dnsmaster – This file lists all the ips of nameservers used by different domains
ipaddrpool – Lists the ip addresses in the server which are free
cpupdate.conf - Cpanel updation configuration can be done in this file Once you edit this file do not forgot to run the script /scripts/upcp
cpbackup.conf - Cpanel backup configuration can be done in this file You can enable or disable cpanel backup using this file.
Valiases/ - Email forwarders and catchall for a domain can be specified in the corresponding file inside this directory.
The format is like the following *: accountname
vfilters - Email filters can be specified in the corresponding file inside this directory.
/usr/local/cpanel
bin/ – Cpanel binaries are located in this directory
version – You can get cpanel version from this file
logs/ - All log files of cpanel are located inside this directory.
They are
error_log – cpanel logs any error it incurs in this file
license_log – All cpanel license update attempts are logged in this file stats_log – The stats daemon logs the output from all
the status generators like awstats, webalizer.
access_log – General information pertaining to cPanel requests is logged in this file
base/ – Files of phpmyadmin, webmail etc are located in this directory
3rdparty/ – Files of mailman, fantastico etc are located in this directory
Important Log Files
Apache
/usr/local/apache/logs – It is the main log for apache
/usr/local/apache/domlogs/ – Domain specific logs are located inside this directory
/usr/local/apache/logs/access_log – This log records all requests processed by the server
Exim
/var/log/exim_mainlog - An entry is created inside this log every time a message is received or delivered
/var/log/exim_rejectlog - An entry is created inside this log every time a message is rejected based on either ACLs or other policies
/var/log/exim_paniclog - An entry is created inside this log when exim doesn’t know how to handle an error
/var/log/messages – General information and login attempts of FTP are logged here
/var/log/secure - General information and login attempts of SSHD are logged here
/var/log/maillog - The IMAP, POP, and SpamAssassin services all log here. This includes all general logging information (login attempts, transactions, spam scoring), along with fatal errors.
/var/log/mysqld.log /var/lib/mysql/$(hostname).err – Mysql general informations and errors are logged in either of these two files
/var/log/chkservd.log - The service monitoring daemon (chkservd) logs all service checks here. Failed services are represented with a [-], and active are represented with [+]
/var/log/cron – An entry is created in this file when a cron is executed
/var/log/messages - General informations and errors of named are logged in this File
/var/log/dcpumon/toplog.[timestamp] - This log lists the top processes running Each five minute a new log is created
/usr/local/apache/logs/suexec_log - This log file contains auditing information reported by suexec each time a CGI application is executed.
/var/log/cpanel*install* – These log files contain verbose logs of the cPanel installation.
/var/cpanel/updatelogs/update-[timestamp.log] – It is the log file for upcp. Log entries are created when upcp runs
Prepare a note on pop before smtp
POP before SMTP or SMTP after POP is a method of authorization used by mail server software which helps allow users the option to send e-mail from any location, as long as they can demonstrably also fetch their mail from the same place.
Technically, users are allowed to use SMTP from an IP address as long as they have previously made a successful login into the POP service at the same mail hosting provider, from the same IP address, within a predefined timeout period.
The main advantage of this process is that it's generally transparent to the average user who will be connecting with an email client, which will almost always make a connection to fetch new mail before sending new mail. The disadvantages include a potentially complex setup for the mail hosting provider (requiring some sort of communication channel between the POP service and the SMTP service) and uncertainty as to how much time users will take to connect via SMTP (to send mail) after connecting to POP.
Those users not handled by this method need to resort to other authorization methods. Also, in cases where users come from externally controlled dial-up addresses (more specifically, all dynamically assigned IP addresses), the SMTP server must be careful about not giving too much leeway when allowing unauthorized connections, because of a possibility of race conditions leaving an open mail relay unintentionally exposed.
Install and configure exim on your machine and prepare a short note on all steps you followed.
Install and basic setup of exim on CentOS. Hope you have yum working and have logged in as root.
1.You may want to make sure your up to date…
yum update
yum update
2.Install exim and mail switching tools
yum install exim
yum install system-switch-mail
yum install exim
yum install system-switch-mail
3.Switch your MTA & set exim to start on boot
system-switch-mail
service sendmail stop
service exim start
chkconfig exim on
chkconfig sendmail off
system-switch-mail
service sendmail stop
service exim start
chkconfig exim on
chkconfig sendmail off
change the router and transport settting in /etc/exm/exim.conf
create false domain by adding rojin.com in main configuration settingsas
domainlist local_domains = @ : localhost : localhost.localdomain : rojin.com
then do inside
local_delivery:
file = /home/$local_part/inbox
create false domain by adding rojin.com in main configuration settingsas
domainlist local_domains = @ : localhost : localhost.localdomain : rojin.com
then do inside
local_delivery:
file = /home/$local_part/inbox
4.Restart exim
service exim restart
service exim restart
and check whether the exim is running by using
netstat -plan | grep 25
5.then test all by using
telnet
helo
mail from:
rcpt to:
data
for the telnet to be accesed across the whole network add in exim.conv(i.e make it to any mode)
# Listen only on loopback interface
#local_interfaces = <; 127.0.0.1 ; ::1
local_interfaces = 0.0.0.0
then to read msg from any ip,
telnet
user rojin
ok
pass rojin123
ok
list
1 ...
2. ....
retr 2 --- to read 2nd msg.
telnet
helo
mail from:
rcpt to:
data
for the telnet to be accesed across the whole network add in exim.conv(i.e make it to any mode)
# Listen only on loopback interface
#local_interfaces = <; 127.0.0.1 ; ::1
local_interfaces = 0.0.0.0
then to read msg from any ip,
telnet
user rojin
ok
pass rojin123
ok
list
1 ...
2. ....
retr 2 --- to read 2nd msg.
Try setting two MX record and show the result when one mx is down ?
IN MX 10 mail1.roj.com
IN MX 20 mail2.roj.com
IN A 192.168.2.32
ns1 IN A 192.168.2.32
www IN A 192.168.2.32
When the MX of 'mail1' is down then the result for the mail will be got from MX of 'mail2'
Install Qmail and enable pop service for your site, setup in your training machine. Add an e-mail user and try sending and receiving emails through your site setup in training ?
The first step is to download the source code for qmail and any other add-ons. You'll need qmail, of course, and you should probably also get ucspi-tcp and daemontools:
• ucspi-tcp, http://cr.yp.to/ucspi-tcp/ ucspi-tcp-0.88.tar.gz
• daemontools, http://cr.yp.to/daemontools/ daemontools-0.76.tar.gz
Retrieve these files using your web browser, web client (e.g., wget), or FTP client.
If you made it this far, you have a working C compiler and copies of the tarballs. Next, copy or move the tarballs to the directory you want to do the work in. /usr/local/src is a good choice for qmail and ucspi-tcp. daemontools should be built under /package.
At this time you probably want to become root, if you're not already.
su
umask 022
mkdir -p /usr/local/src
mv netqmail-1.06.tar.gz ucspi-tcp-0.88.tar.gz /usr/local/src
mkdir -p /package
mv daemontools-0.76.tar.gz /package
chmod 1755 /package
Now you can unpack the packages.
cd /usr/local/src
gunzip netqmail-1.06.tar.gz
tar xpf netqmail-1.06.tar
gunzip ucspi-tcp-0.88.tar.gz
tar xpf ucspi-tcp-0.88.tar
rm *.tar # optional, unless space is very tight
cd /package
gunzip daemontools-0.76.tar.gz
tar xpf daemontools-0.76.tar
rm *.tar # optional, again
There should now be directories called /usr/local/src/netqmail-1.06, /usr/local/src/ucspi-tcp-0.88, and /package/admin/daemontools-0. 76.
Start qmail
/var/qmail/rc
The easiest way to create the necessary users and groups is to create a little script file to do it for you. In the source directory you'll find a file called INSTALL.ids. It contains the command lines for many platforms, so copying the file to another name and editing that is quick and easy.
cd /usr/local/src/netqmail-1.06
cp INSTALL.ids IDS
Then, using your favorite editor, remove all of the file except the lines you want. For example, here's what IDS would look like for FreeBSD after editing:
pw groupadd nofiles
pw useradd qmaild -g nofiles -d /var/qmail -s /nonexistent
pw useradd alias -g nofiles -d /var/qmail/alias -s /nonexistent
pw useradd qmaill -g nofiles -d /var/qmail -s /nonexistent
pw useradd qmailp -g nofiles -d /var/qmail -s /nonexistent
pw groupadd qmail
pw useradd qmailq -g qmail -d /var/qmail -s /nonexistent
pw useradd qmailr -g qmail -d /var/qmail -s /nonexistent
pw useradd qmails -g qmail -d /var/qmail -s /nonexistent
Then to run it, either use chmod to make it executable or run it with sh:
First method:
chmod 700 IDS
./IDS
Second method:
/bin/sh IDS
When the script finishes, all of your users and groups will be created and you can go on to the next section.
But what do you do if your system isn't listed in INSTALL.ids? You'll have to create them manually. Start by using your favorite editor and editing /etc/group. You need to add the following two lines to the end of the file:
qmail:*:2107:
nofiles:*:2108:
Qmail With POP
Qmail includes a POP server, qmail-pop3d, but it's not configured and installed as part of the qmail installation process. qmail-pop3d is the POP server included with qmail. It's a fine POP server, and many qmail sites use it. It's modular, and supports multiple authentication schemes via alternative authentication modules.
Installation of qmail-pop3d
1. Completely install and test qmail. If you want all users to have POPable mailboxes, make sure defaultdelivery is set to ./Maildir/. If you installed the /var/qmail/rc script from the Installation section, this is configured in control/defaultdelivery. If not, it's probably in /var/qmail/rc on the qmail-start command line.
2. Download a checkpassword program from http://www.qmail.org/top.html# checkpassword. The standard checkpassword, http://cr.yp.to/checkpwd.html, is a good choice if you don't need anything fancy.
3. Compile and install checkpassword according to the directions. Make sure you install it as /bin/checkpassword.
4. mkdir /var/qmail/supervise/qmail- pop3d
5. Create a /var/qmail/supervise/qmail- pop3d/run script containing:
#!/bin/sh
exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver -v -R -H -l 0 0 110 /var/qmail/bin/qmail-popup \
FQDN /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 2>&1
where FQDN is the fully qualified domain name of the POP server you're setting up, e.g., pop.example.net.
6. mkdir /var/qmail/supervise/qmail- pop3d/log
7. Create a /var/qmail/supervise/qmail- pop3d/log/run script containing:
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t \
/var/log/qmail/pop3d
8. Set up the log directory and permissions on the run scripts, and link the service into /service:
chmod +t /var/qmail/supervise/qmail- pop3d # if daemontools < 0.75
mkdir /var/log/qmail/pop3d
chown qmaill /var/log/qmail/pop3d
chmod 755 /var/qmail/supervise/qmail- pop3d/run
chmod 755 /var/qmail/supervise/qmail- pop3d/log/run
ln -s /var/qmail/supervise/qmail- pop3d /service
9. Add the following to qmailctl's "start" section:
if svok /service/qmail-pop3d ; then
svc -u /service/qmail-pop3d /service/qmail-pop3d/log
else
echo qmail-pop3d supervise not running
fi
10. Add the following to qmailctl's "stop" section:
echo " qmail-pop3d"
svc -d /service/qmail-pop3d /service/qmail-pop3d/log
11. Add the following to qmailctl's "stat" section:
svstat /service/qmail-pop3d
svstat /service/qmail-pop3d/log
12. Add the following to qmailctl's "pause" section:
echo "Pausing qmail-pop3d"
svc -p /service/qmail-pop3d
13. Add the following to qmailctl's "cont" section:
echo "Continuing qmail-pop3d"
svc -c /service/qmail-pop3d
14. Add the following to qmailctl's "restart" section:
echo "* Restarting qmail-pop3d."
svc -t /service/qmail-pop3d /service/qmail-pop3d/log
Sunday, July 25, 2010
I need to check the database mynewdb for any errors and repair it. Write down the entire set of commands required for accomplishing this. I have forgotten the server root password and need to change the password to 'neverforget'. Write down the command for resetting the password as well.
To Check the Database and Repair:
Commands:
mysqlcheck -c dbname dbname_table;
mysqlcheck -r dbname dbname_table;
Example:
[root@40 ~]# mysqlcheck -c mynewdb mynewdb_tb;
mynewdb.mynewdb_tb OK
[root@40 ~]# mysqlcheck -r mynewdb mynewdb_tb;
mynewdb.mynewdb_tb OK
[root@40 ~]# mysqlcheck -c mynewdb mynewbd_tb;
mynewdb.mynewbd_tb
Error : Table 'mynewdb.mynewbd_tb' doesn't exist
error : Corrupt
[root@40 ~]# mysqlcheck -r mynewdb mynewdb_tb;
mynewdb.mynewdb_tb OK
To Change Root Password:
Commands:
# mysql -u root
mysql> set password for 'root'@'localhost'= password('neverforget');
Example:
[root@40 ~]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 39
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> set password for 'root'@'localhost'= password('neverforget');
Query OK, 0 rows affected (0.00 sec)
5. Create a new database 'myolddb'and 'mynewdb'.
- take a mysql dump of the database 'myolddb'
- restore dump to this newly created database
- create a username 'Catherine' and assign full privileges for the user 'Catherine' to the database 'mynewdb'.
- take a mysql dump of the database 'myolddb'
- restore dump to this newly created database
- create a username 'Catherine' and assign full privileges for the user 'Catherine' to the database 'mynewdb'.
To Create Databases:
mysql> create database myolddb;
Query OK, 1 row affected (0.00 sec)
mysql> create database myolddb;
Query OK, 1 row affected (0.00 sec)
To Create Dump of myolddb:
[root@40 ~]# cd /var/lib/mysql
[root@40 mysql]# ls -l | grep myolddb
drwx------ 2 mysql mysql 4096 May 17 19:39 myolddb
[root@40 mysql]# mysqldump myolddb > myolddb.sql
[root@40 mysql]# vi myolddb.sql
To Restore dump in mynewdb:
[root@40 mysql]# cd /var/lib/mysql
[root@40 mysql]# ls -l | grep mynewdb
drwx------ 2 mysql mysql 4096 May 17 19:40 mynewdb
[root@40 mysql]# mysqldump mynewdb < myolddb.sql
-- MySQL dump 10.11
--
-- Host: localhost Database: mynewdb
-- ------------------------------ ------------------------
-- Server version 5.0.77
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@ CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@ CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@ COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_ CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@ FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_ FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_ CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_ CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_ CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_ COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2010-05-17 15:52:19
To Create user and Grant Privileges:
[root@40 ~]# useradd catherine
[root@40 ~]# passwd catherine
Changing password for user catherine.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@40 ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 30
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> grant all privileges on mynewdb.* to catherine@192.168.2.40 identified by 'catherine';
Query OK, 0 rows affected (0.03 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Install postnuke and set it as your index page
Installation:
Extract the files from the PostNuke archive to a directory on your hard drive called PostNuke.
Since .psd files are not allowed on the CGI server, we must move a few of them out of their directory. Go into the PostNuke/html/themes/PostNukeBlue/images directory and move (not copy) the following files to the PostNuke directory itself. You'll then have an html directory, a phoenix-sql directory, and 5 .psd files in the PostNuke directory. Here are the files to move:
Banner.psd
BannerBott.psd
BlockRTop.psd
HeaderBottom.psd
TRcorner.psd
We are now ready to upload. Log into your cgi server (this is normally cgi.yourdomain.com where yourdomain.com represents your actual domain name). Next create a postnuke directory (be sure that there are no upper-case letters, for best results). You can actually name the directory anything you wish, but for this tutorial we are assuming you named the directory postnuke.
Transfer all the files from inside your PostNuke/html directory on your hard drive to the postnukewithin it. NOTE: The upload process will take a little under one hour if you are on a broadband connection. If you are on dialup, it will be much longer. The amount of files to upload totals 8.37 MB. directory on your cgi server. Note that you do not want to upload the html directory itself, but the files and directories
Change the file permissions of config.php and config-old.php to 666.
Change the file permissions of the following directories within the pnTemp directory to 777:
pnRender_compiled
pnRender_cache
Xanthia_compiled
Xanthia_cache
Xanthia_Config
Installation is finished. You can now proceed to the Configuration.
Configuration:
In your web browser, visit: http://cgi.yourdomain.com/postnuke/install.php substituting yourdomain.com with your actual domain name.
Select your default language and click the Set Language button.
Click the Next button after you have read and agreed with the GPL License.
On the next page, if you see a red check mark next to any files or directories in the list, then log back into your cgi server and change the file permissions accordingly. All green check marks mean all is ok. Press Continue button when done.
The next page is the Configuration Setup. Here are the items you need to change. Note that you should replace yourdomaincom with your actual domain name but without the dot in your domain name.Database Host:localhostDatabase Username:yourdomaincomDatabase Password:MySQL Database PasswordDatabase Name:yourdomaincomTable Prefix (for Table Sharing):postnuke_Database Type:MySQL (Default)Database Table Type:MyISAM (Default)Site is for intranet or
other local (non-internet) use:Leave UNchecked
Press Submit button
Click the New installation button
Click the Start button. NOTE: You do not have root access so leave the Create the Database check box UNchecked.
If all went well, you should now see a message that says in red No database made and a list of tables that start with postnuke_. Click on the Continue button.
Change your login username, password, email and site URL and click the Set Login button.
The next page will show another list of tables starting with postnuke_. Click the Finish button.
Log into your CGI server and remove the install.php file and the install folder from your postnuke directory.
Install phpbb forum under your site .com so that, your forum can be accessed using .com/forum/
Quick install:
If you have basic knowledge of using FTP and are sure your hosting service or server will run phpBB3 you can use these steps to quickly get started.
Decompress the phpBB3 archive to a local directory on your system.
Upload all the files contained in this archive (retaining the directory structure) to a web accessible directory on your server or hosting account.
Change the permissions on config.php to be writable by all (666 or -rw-rw-rw- within your FTP Client)
Change the permissions on the following directories to be writable by all (777 or -rwxrwxrwx within your FTP Client):
store/,cache/,files/andimages/avatars/upload/.
Using your web browser visit the location you placed phpBB3 with the addition of install/index.php or pointing directly to install/, e.g. http://www.mydomain.com/phpBB3/install/, http://www.mydomain.com/forum/ install/ etc.
Click the INSTALL tab, follow the steps and fill out all the requested information.
Change the permissions on config.php to be writable only by yourself (644 or -rw-r--r-- within your FTP Client)- phpBB3 should now be available.
Install Mysql and perform actions like create database, create tables, grant privileges, select particular data from table, insert data into a tables, update data from a table field etc .
To Install :
yum install mysql
To Create the Database File:
mysql> create database sapna;
Query OK, 1 row affected (0.00 sec)
Query OK, 1 row affected (0.00 sec)
The command creates the the database, sapna. If successful, you should receive a response like the one shown above.
The command creates the the database, sapna. If successful, you should receive a response like the one shown above.
After the database is created, we must select it to continue with our database building.
mysql> use sapna;
Database changed
mysql>
Database changed
mysql>
Now with our database selected, we are ready for the next step.
To Create a Table:
Next, you need to create a database table to hold your data. The SQL here defines a table. Below is the command and the output from the command. The database created below will be used in a web guestbook application.
mysql> create table guestTbl
-> (msgID int not null primary key auto_increment,
-> name varchar(30),
-> email varchar(30),
-> msgFrom varchar(30),
-> msgDate timestamp(14),
-> msgBody text);
Query OK, 0 rows affected (0.11 sec)
-> (msgID int not null primary key auto_increment,
-> name varchar(30),
-> email varchar(30),
-> msgFrom varchar(30),
-> msgDate timestamp(14),
-> msgBody text);
Query OK, 0 rows affected (0.11 sec)
mysql>
In this example, the create command creates a table named guestTbl. The table has six fields described below.
msgID - a unique number assigned to each entry. The field hold an integer value that is automatically incremented each time an entry is added.
name - a 30 character field holding the name of the guest.
email - a 30 character field holding the email address of the guest.
msgFrom - a 30 character field holding the location of the guest.
msgDate - the date and time the entry is added to the database.
msgBody - a text field holding a text message entered by the guest.
Our next step is to add data to the table.
To Insert data to the Table:
Now we need to add some sample data to the table, so we can actually run some queries against it.
mysql> insert into guestTbl
-> (msgID, name, email, msgFrom, msgDate, msgBody) values
-> (NULL, 'Test User1', 'testuser@test.com',' Smallville USA',now(),
-> 'This is the body for message 1.');
Query OK, 1 row affected (0.27 sec)
-> (msgID, name, email, msgFrom, msgDate, msgBody) values
-> (NULL, 'Test User1', 'testuser@test.com','
-> 'This is the body for message 1.');
Query OK, 1 row affected (0.27 sec)
mysql>
The above command adds one row to the database. If we repeat this process for three other users, we have enough data to perform a query on the table.
To Query the Database:
Now we can query our database. To retrieve all the data in the table, perform the following command.
mysql> select * from guestTbl;
+-------+------------+-------- ------------+----------------+
----------------+------------- --------------------+
| msgID | name | email |
msgFrom | msgDate | msgBody |
+-------+------------+-------- ------------+----------------+
----------------+------------- --------------------+
| 1 | Test User1 | testuser@test.com |
Smallville USA | 20001117154626 | This is the body for message 1. |
| 2 | Test User2 | testuser2@test.com |
Smalltown USA | 20001117155043 | This is the body for message 2. |
| 3 | Test User3 | testuser3@test.com |
Smallcity CA | 20001117155201 | This is the body for message 3. |
| 4 | Test User4 | testuser4@test.com |
LittleTown CO | 20001117155319 | This is the body for message 4. |
+-------+------------+-------- ------------+----------------+
----------------+------------- --------------------+
4 rows in set (0.06 sec)
----------------+-------------
| msgID | name | email |
msgFrom | msgDate | msgBody |
+-------+------------+--------
----------------+-------------
| 1 | Test User1 | testuser@test.com |
Smallville USA | 20001117154626 | This is the body for message 1. |
| 2 | Test User2 | testuser2@test.com |
Smalltown USA | 20001117155043 | This is the body for message 2. |
| 3 | Test User3 | testuser3@test.com |
Smallcity CA | 20001117155201 | This is the body for message 3. |
| 4 | Test User4 | testuser4@test.com |
LittleTown CO | 20001117155319 | This is the body for message 4. |
+-------+------------+--------
----------------+-------------
4 rows in set (0.06 sec)
mysql>
First off, you'll notice that if the data does not fit on a line, it is wrapped. All the data entered for the four test users is there. We can get cleaner looking output by selecting a couple of fields.
For example:
mysql> select name,email,msgFrom from guestTbl; +------------+--------------------+----------------+ | name | email | msgFrom | +------------+---------------- ----+----------------+ | Test User1 | testuser@test.com | Smallville USA | | Test User2 | testuser2@test.com | Smalltown USA | | Test User3 | testuser3@test.com | Smallcity CA | | Test User4 | testuser4@test.com | LittleTown CO | +------------+---------------- ----+----------------+ 4 rows in set (0.05 sec) mysql>
To Grant Privileges:
mysql> grant all privileges on neethu.* to sapna@localhost identified by 'sapna';
Query OK, 0 rows affected (0.00 sec)
Subscribe to:
Posts (Atom)