1)Configure host name lookup.
---------------
192.168.0.4 mail.yourdomain mail
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
---------------
2)Install system-switch-mail
---------------
yum install system-switch-mail
---------------
and configure MTA as postfix
3)Install and setup Postfix SMTP server.
-----------------
yum install postfix*
Edit '/etc/postfix/main.cf' and enter they following details.
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
home_mailbox = Maildir/
After doing this, restart postfix
/etc/init.d/postfix restart
/sbin/chkconfig postfix on
4)Install and setup Dovecot POP3 and IMAP server.
yum install dovecot*
Edit /etc/dovecot.conf' and enter the following entries.
protocols = pop3 pop3s imap imaps
mail_location = maildir:~/Maildir/
pop3_uidl_format = %08Xu%08Xv
imap_client_workarounds = delay-newmail outlook-idle netscape-eoh
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
After doing this, restart dovecot
/etc/init.d/dovecot restart
/sbin/chkconfig dovecot on
5)Install and setup SquirrelMail WebMail.
yum install squirrelmail*
From a Terminal window, type in /usr/share/squirrelmail/config/conf.pl and press Enter. This will launch the SquirrelMail Configuration utility.
Type in D and press Enter to select the Set pre-defined settings for specific IMAP servers menu. Type in dovecot and press Enter.
6) Relay Mails via gmail.
Installed postfix and removed sendmail:
# yum install postfix
# yum remove sendmail
Install openssl and openssl-perl are installed so we can generate certificates and create SSL connections to GMail
# yum install openssl openssl-perl
Create a Certificate Authority (if you don’t already have one):
# cd /etc/pki/tls/misc
# ./CA.pl -newca
You will be prompted for the file name (just hit Enter). Then you will be asked for a PEM pass phrase, which you need to remember. You can fill out the Country Name, State or Province Name, Locality Name, Organization Name, and Organizational Unit Name to your liking (or take the defaults). You need to remember the Organization Name (if you changed it) as it must match one in a key we create later. For the Common Name, fill in “CA” (without quotes). Take defaults for everything else and when prompted to enter the pass phrase you need to enter the same one you did above.
Create a client key that is sent to GMail to start the SSL encryption:
# cd /etc/pki/tls
# mkdir gmail_relay
# cd gmail_relay
# openssl genrsa -out server.key 1024
# openssl req -new -key server.key -out server.csr
# openssl ca -out server.pem -infiles server.csr
Add the following to the bottom of the file /etc/postfix/main.cf
#### GMail SSL SMTP Relay
relayhost = [smtp.gmail.com]:587
#auth
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
#tls
smtp_use_tls = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
tls_random_source = dev:/dev/urandom
smtp_tls_scert_verifydepth = 5
smtp_tls_key_file=/etc/pki/tls/gmail_relay/server.key
smtp_tls_cert_file=/etc/pki/tls/gmail_relay/server.pem
smtpd_tls_ask_ccert = yes
smtpd_tls_req_ccert =no
smtp_tls_enforce_peername = no
Create /etc/postfix/sasl_passwd file with your GMail login credentials that looks like below:
gmail-smtp.l.google.com user@gmail.com:password
smtp.gmail.com user@gmail.com:password
Create /etc/postfix/sasl_passwd.db file using the following command.
postmap hash:/etc/postfix/sasl_passwd
/etc/init.d/postfix restart
7) Fetch mails from gmail using fetchmail.
# vi /home/user/.fetchmailrc
Put a cron to download mails every minute.
#crontab -e
*/1 * * * * user fetchmail -k &> /dev/null
8) Login to webmail and check mails :)
Wednesday, February 29, 2012
Monday, February 6, 2012
Installing Oracle Developer 6i release 2 on Fedora 10(d2k6irelease2.tar)
Steps to install forms6i in Linux.
1)Download the following files.
a) d2k6irelease2.tar
http://download.oracle.com/otn/linux/forms/d2k6irelease2.tar
b) openmotif-2.1.30-4_MLI.i386.rpm
and openmotif-devel-2.1.30-4_MLI.i386.rpm
ftp://ftp.pbone.net/mirror/ftp.gwdg.de/pub/linux/misc/metrolink/openmotif/2.1.30-4/openmotif-2.1.30-4_MLI.i386.rpm
ftp://ftp.pbone.net/mirror/ftp.gwdg.de/pub/linux/misc/metrolink/openmotif/2.1.30-4/openmotif-devel-2.1.30-4_MLI.i386.rpm
2)Create an user “oradev” and group “dba”
#groupadd dba
#useradd oradev -g dba
#psswd oradev
(Enter the passwork you wish to give here)
3) Copy d2k6irelease2.tar file to “/home/oradev/” and extract it.
#cp -r /home/youruser/Download/d2k6irelease2.tar /home/oradev/
#tar -xvf d2k6irelease2.tar
4)If /etc/oratab already exist, please rename it.
#mv /etc/oratab /etc/oratab.bck
5) Check whether these libraries exist in /usr/X11R6/lib
# locate libX11.so
# locate libX11.so
# locate libXext.so
# locate libXmu.so
# locate libXp.so
# locate libXpm.so
# locate libXt.so
# locate libXtst.so
#locate libXm.a
# locate libXt.a
# locate libX11.a
If these libraries are not install or installed in another location, please install it and create and symbolic link to /usr/X11R6/lib/
# ln -s /usr/lib/libXmu.so /usr/X11R6/lib/
6)change the directory to /home/oradev/orainst/, the installation should start from this folder. Execute the following command to start installation.
#cd /home/oradev/orainst/
#./orainst
7)This will show a GUI for installing Forms6i
a) Select the installation method:Default Install
b)Select the Installer activity: Install, Upgrade, or De-Install Software
c) Select the Installer option: Install New Product - Do Not Create DB Objects
d) Environment Variables :Confirm, change, or enter values for the environment variables
set ORACLE_BASE:as /home/oradev/app and ORACLE_HOME=/home/oradev/app/oracle/product/8.0.5
e) Software Asset Manager : Oracle Forms Server and Forms and Oracle Reports Server and Reports.
To Select these 2 option, keep the curser to the position Oracle Forms Server and Forms and press enter, move down the curser to Oracle Reports Server and Reports and press enter. After doing this press letter 'r' and then press letter 'i'.
f) Please enter the directory where the X-Windows libraries : /usr/X11R6/lib/
g)Please enter the directory where the MOTIF library (libXm.a) is located: /usr/X11R6/lib/
h) GUI choice : check all items:
i)In the Component Selection (for Forms), select all the items except the first:
[] Form Server for Web deployment
[X] Motif Bitmapped Interface
[X] Designer and Generater Executables
[X] Character Mode Interface
Click on OK.
j)In the Component Selection (for Reports), select all the items except the first:
[] Reports Multitier Server for Web deployment
[X] Motif Bitmapped Interface
[X] Report Designer and Converter Executables
[X] Character Mode Interface
Click on OK.
8)After installation correct the tnsnames.ora file.
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.246)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PLSExtProc)
)
)
orcl=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
9)Set environment parameters correctly. Add these entries to .bash_profile file.
export PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:
/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oradev/bin:/home/oradev/app/oracle/product/8.0.5/bin
export ORACLE_HOME=/home/oradev/app/oracle/product/8.0.5
export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:/usr/X11R6/lib:
/home/oradev/app/oracle/product/8.0.5/network/jre11/lib/linux/native_threads:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386
export ORACLE_TERM=vt220
10) To open the file from linux PC, please browse the binary path f60runm. Now onwards you can open the fmx file without any issue
1)Download the following files.
a) d2k6irelease2.tar
http://download.oracle.com/otn/linux/forms/d2k6irelease2.tar
b) openmotif-2.1.30-4_MLI.i386.rpm
and openmotif-devel-2.1.30-4_MLI.i386.rpm
ftp://ftp.pbone.net/mirror/ftp.gwdg.de/pub/linux/misc/metrolink/openmotif/2.1.30-4/openmotif-2.1.30-4_MLI.i386.rpm
ftp://ftp.pbone.net/mirror/ftp.gwdg.de/pub/linux/misc/metrolink/openmotif/2.1.30-4/openmotif-devel-2.1.30-4_MLI.i386.rpm
2)Create an user “oradev” and group “dba”
#groupadd dba
#useradd oradev -g dba
#psswd oradev
(Enter the passwork you wish to give here)
3) Copy d2k6irelease2.tar file to “/home/oradev/” and extract it.
#cp -r /home/youruser/Download/d2k6irelease2.tar /home/oradev/
#tar -xvf d2k6irelease2.tar
4)If /etc/oratab already exist, please rename it.
#mv /etc/oratab /etc/oratab.bck
5) Check whether these libraries exist in /usr/X11R6/lib
# locate libX11.so
# locate libX11.so
# locate libXext.so
# locate libXmu.so
# locate libXp.so
# locate libXpm.so
# locate libXt.so
# locate libXtst.so
#locate libXm.a
# locate libXt.a
# locate libX11.a
If these libraries are not install or installed in another location, please install it and create and symbolic link to /usr/X11R6/lib/
# ln -s /usr/lib/libXmu.so /usr/X11R6/lib/
6)change the directory to /home/oradev/orainst/, the installation should start from this folder. Execute the following command to start installation.
#cd /home/oradev/orainst/
#./orainst
7)This will show a GUI for installing Forms6i
a) Select the installation method:Default Install
b)Select the Installer activity: Install, Upgrade, or De-Install Software
c) Select the Installer option: Install New Product - Do Not Create DB Objects
d) Environment Variables :Confirm, change, or enter values for the environment variables
set ORACLE_BASE:as /home/oradev/app and ORACLE_HOME=/home/oradev/app/oracle/product/8.0.5
e) Software Asset Manager : Oracle Forms Server and Forms and Oracle Reports Server and Reports.
To Select these 2 option, keep the curser to the position Oracle Forms Server and Forms and press enter, move down the curser to Oracle Reports Server and Reports and press enter. After doing this press letter 'r' and then press letter 'i'.
f) Please enter the directory where the X-Windows libraries : /usr/X11R6/lib/
g)Please enter the directory where the MOTIF library (libXm.a) is located: /usr/X11R6/lib/
h) GUI choice : check all items:
i)In the Component Selection (for Forms), select all the items except the first:
[] Form Server for Web deployment
[X] Motif Bitmapped Interface
[X] Designer and Generater Executables
[X] Character Mode Interface
Click on OK.
j)In the Component Selection (for Reports), select all the items except the first:
[] Reports Multitier Server for Web deployment
[X] Motif Bitmapped Interface
[X] Report Designer and Converter Executables
[X] Character Mode Interface
Click on OK.
8)After installation correct the tnsnames.ora file.
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.246)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PLSExtProc)
)
)
orcl=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
9)Set environment parameters correctly. Add these entries to .bash_profile file.
export PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:
/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oradev/bin:/home/oradev/app/oracle/product/8.0.5/bin
export ORACLE_HOME=/home/oradev/app/oracle/product/8.0.5
export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:/usr/X11R6/lib:
/home/oradev/app/oracle/product/8.0.5/network/jre11/lib/linux/native_threads:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386
export ORACLE_TERM=vt220
10) To open the file from linux PC, please browse the binary path f60runm. Now onwards you can open the fmx file without any issue
Sunday, November 27, 2011
Steps to Install Oracle10g Developer Suit in Linux(Fedora 10)
1. Download Oracle Developer Suite10g for Linux.
This includes the full distribution of Oracle Developer Suite 10g
- Oracle Forms Developer
- Oracle Reports Developer
- Oracle JDeveloper
File Segments
as_linux_x86_ids_101202_disk1.cpio (620,520,448 bytes) (cksum - 3772729309)
as_linux_x86_ids_101202_disk2.cpio (176,651,776 bytes) (cksum - 1501472911)
2. Create user in which you wish to install Developement suit.
# useradd oradev
# passwd oradev
Changing password for user oradev
New UNIX password:
Retype new UNIX password:
passwd: all authentication
tokens updated successfully
4. Install Location
Suppose you're installing it in /home/oradev directory, copy the cpio files to these location.
Extract each uncompressed downloadable using "cpio" as root user.
# cat as_linux_x86_ids_101202_disk1.cpio | cpio -icd
# cat as_linux_x86_ids_101202_disk2.cpio | cpio -icd
8. runInstaller
1. Log in as oradev and runInstaller
# cd Disk1
# ./runInstaller
If you are asked to run any scripts while installation to change permissions and create directories, please run that script. Another error you might get during installation is relink error. Please run this script if you get any relink error.
/home/oradev/OraHome_1/bin/OracleAS_Relink_Patch.sh
Post Installation.
Set the following environment variables.
export ORACLE_HOME=/home/oradev/OraHome_1
export LD_LIBRARY_PATH=/home/oradev/OraHome_1/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/home/oradev/OraHome_1/jdk/jre/lib/i386/native_threads:/home/oradev/OraHome_1/jdk/jre/lib/i386/client:/home/oradev/OraHome_1/jre/1.4.2/lib/i386/client:/home/oradev/OraHome_1/jre/1.4.2/lib/i386/server
export MALLOC_CHECK_=0
The installation of Developer Suite 10g was successful. You can access it using the following scripts.
Form Builder:
$ORACLE_HOME/bin/frmbld.sh
Report Builder:
$ORACLE_HOME/bin/rwbuilder.sh
Start OC4J:
$ORACLE_HOME/j2ee/DevSuite/startinst.sh
Stop OC4J:
$ORACLE_HOME/j2ee/DevSuite/stopinst.sh
This includes the full distribution of Oracle Developer Suite 10g
- Oracle Forms Developer
- Oracle Reports Developer
- Oracle JDeveloper
File Segments
as_linux_x86_ids_101202_disk1.cpio (620,520,448 bytes) (cksum - 3772729309)
as_linux_x86_ids_101202_disk2.cpio (176,651,776 bytes) (cksum - 1501472911)
2. Create user in which you wish to install Developement suit.
# useradd oradev
# passwd oradev
Changing password for user oradev
New UNIX password:
Retype new UNIX password:
passwd: all authentication
tokens updated successfully
4. Install Location
Suppose you're installing it in /home/oradev directory, copy the cpio files to these location.
Extract each uncompressed downloadable using "cpio" as root user.
# cat as_linux_x86_ids_101202_disk1.cpio | cpio -icd
# cat as_linux_x86_ids_101202_disk2.cpio | cpio -icd
8. runInstaller
1. Log in as oradev and runInstaller
# cd Disk1
# ./runInstaller
If you are asked to run any scripts while installation to change permissions and create directories, please run that script. Another error you might get during installation is relink error. Please run this script if you get any relink error.
/home/oradev/OraHome_1/bin/OracleAS_Relink_Patch.sh
Post Installation.
Set the following environment variables.
export ORACLE_HOME=/home/oradev/OraHome_1
export LD_LIBRARY_PATH=/home/oradev/OraHome_1/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/home/oradev/OraHome_1/jdk/jre/lib/i386/native_threads:/home/oradev/OraHome_1/jdk/jre/lib/i386/client:/home/oradev/OraHome_1/jre/1.4.2/lib/i386/client:/home/oradev/OraHome_1/jre/1.4.2/lib/i386/server
export MALLOC_CHECK_=0
The installation of Developer Suite 10g was successful. You can access it using the following scripts.
Form Builder:
$ORACLE_HOME/bin/frmbld.sh
Report Builder:
$ORACLE_HOME/bin/rwbuilder.sh
Start OC4J:
$ORACLE_HOME/j2ee/DevSuite/startinst.sh
Stop OC4J:
$ORACLE_HOME/j2ee/DevSuite/stopinst.sh
Friday, November 18, 2011
Steps to Install Oracle 10g in Linux(Fedora 13)
1) Create the new groups and users for installation
$ groupadd oinstall
$ groupadd dba
$ useradd -g oinstall -G dba oracle
$ passwd oracle
2) Fedora Core Packages required for Installation
$ yum install setarch-*
$ yum install tcl-*
$ yum installlibXau-devel-* libXp-*
$ yum installcompat-db-*
$ yum install compat-libstdc++-33*
$ yum install compat-libf2c-34-*
$ yum install compat-gcc-34-*
$ yum install libaio-*
$ yum install compat-gcc-34-c++-*
$ yum install compat-libstdc++-296*
$ yum install compat-libgcc-296*
$ rpm -Uvh openmotif21-2.1.30-14.i386.rpm
3) Checking Memory and Swap Space
Oracle recommends at least 512MB of RAM and 1GB of swap space or twice the size of RAM on the
system. For testing purpose, you can work even with 256MB as well.
To check the size of physical memory, run the following command.
$ grep MemTotal /proc/meminfo
To check the size of swap space, run the following command.
$ grep SwapTotal /proc/meminfo
What if you don’t have enough swap space?
You can add temporary swap space to your system by creating a temporary swap file instead of using
a raw device. Below is the procedure.
Login as root (su - root)
$ dd if=/dev/zero of=tmpswap bs=1k count=900000
$ chmod 600 tmpswap
$ mkswap tmpswap
$ swapon tmpswap
You can also disable the temporary swap space using the following commands.
Login as root (su - root)
$ swapoff tmpswap
$ rm tmpswap
4) Checking temporary (/tmp) Space
Oracle recommends that you should have up to 400 MB space.
To check the space in /tmp, run the following command.
$ df /tmp
What if I don’t have enough temporary space?
If you do not have enough space in the /tmp filesystem, you can temporarily create a tmp directory in
another file system. Below is the procedure to create it.
Login as root (su - root)
$ mkdir //tmp # e.g. mkdir /u02/tmp
$ chown root.root //tmp
$ chmod 1777 //tmp
$ export TEMP=/ # This is used by Oracle
$ export TMPDIR=/ # This is used by Linux programs like the linker "ld"
After Oracle installation is done, you can remove the temporary /tmp directory. I would recommend to
shutdown Oracle first.
Login as root (su - root)
$ rmdir //tmp
$ unset TEMP
$ unset TMPDIR
5) Set Kernel Parameters
Perform the following changes in the kernel parameters.
i. Add the following lines to the /etc/sysctl.conf file.
Login as root (su - root)
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
6) Run the following command to change the current kernel parameters.
$ /sbin/sysctl -p
7) Add the following lines to the /etc/security/limits.conf file.
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
8) Add the following line to the /etc/pam.d/login file, if it does not already exist.
session required /lib/security/pam_limits.so
9) Disable secure linux in the /etc/selinux/config file. You can do by setting value of SELINUX as
follows.
SELINUX=disabled
10) Copy the oracle zip file to "/home/oracle/"
Downloading the software and unpacking installation files
"10201_database_linux32.zip" (668,734,007 bytes) (cksum - 2737423041)
11) Uncompress the file using unzip
$ unzip 10201_database_linux32.zip
You should now have a single directory (db/Disk1) containing installation files.
12) Paste the following lines in /home/oracle/.bash_profile
--------------------------
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/home/oracle/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=ORCL; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export
CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
--------------------------
13) Change the redhat release information
Edit the /etc/redhat-release file replacing the current release information (Fedora 13) with the following. You can copy the original file somewhere else as it will be required after
installation.
redhat-4
14) Start the Oracle Universal Installer (OUI)
As Oracle user, go to the Disk1 directory and start the Oracle Universal Installer (OUI) by issuing the
following command.
$ ./runInstaller
15)Once successfully installed we can access it using the the following URL.
iSQL*Plus URL:
http://localhost:5560/isqlplus
iSQL*Plus DBA URL:
http://localhost:5560/isqlplus/dba
Enterprise Manager 10g Database Control URL:
http://localhost:1158/em
Post Installation Steps
------------------------
1) Edit the '/etc/oratab' file to as given below.
orcl:/home/oracle/oracle/product/10.2.0/db_1:Y
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME::
2) Edit "/home/oracle/oracle/product/10.2.0/db_1/bin/dbstart" file.
Please make sure that oracle home is set correctly in this file.
I am pasting few lines of the orginal script.
=====================
#Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
if [ ! $ORACLE_HOME_LISTNER ] ; then
echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
else
LOG=$ORACLE_HOME_LISTNER/listener.log
# Start Oracle Net Listener
if [ -f $ORACLE_HOME_LISTNER/bin/tnslsnr ] ; then
echo "$0:
=====================
#Correct the ORACLE_HOME_LISTNER path as your ORACLE_HOME, I have given this as
ORACLE_HOME_LISTNER=/home/oracle/oracle/product/10.2.0/db_1
3) Create a start up script to start all oracle related services.
File name : /etc/init.d/dbora
===============================================================
#!/bin/bash
#
# chkconfig: 12345 99 10
# description: Oracle auto start-stop script
# --------------------------------------------------------------------------
# File: oracle
#
# Purpose: Oracle auto start-stop script
#
# Location: /etc/init.d
#
# Certified: Oracle 10.2.0.3 on Enterprise Linux 5
# --------------------------------------------------------------------------
# Variables
ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_BASE=/home/oracle/oracle; export ORACLE_BASE
ORACLE_SCRIPTS_DIR=$ORACLE_BASE/product/10.2.0/db_1/bin; export ORACLE_SCRIPTS_DIR
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
RETVAL=0
prog="oracle"
start() {
echo -n $"Starting $prog: "
if [ ! -f $ORACLE_SCRIPTS_DIR/dbstart ]
then
echo "Oracle not started (no dbstart script)"
else
# Start RDBMS
su - $ORACLE_OWNER -c $ORACLE_SCRIPTS_DIR/dbstart
# Start Enterprise Manager Console
su - $ORACLE_OWNER $ORACLE_HOME/bin/emctl start dbconsole
# Start iSQL*Plus
su - $ORACLE_OWNER $ORACLE_HOME/bin/isqlplusctl start
fi
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/oracle
return $RETVAL
}
stop() {
echo -n $"Shutting down $prog: "
if [ ! -f $ORACLE_SCRIPTS_DIR/dbshut ]
then
echo "Oracle not stopped (no dbshut script)"
else
# Stop iSQL*Plus
su - $ORACLE_OWNER $ORACLE_HOME/bin/isqlplusctl stop
# Stop Enterprise Manager Console
su - $ORACLE_OWNER $ORACLE_HOME/bin/emctl stop dbconsole
# Stop RDBMS
su - $ORACLE_OWNER -c $ORACLE_SCRIPTS_DIR/dbshut
fi
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/oracle
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
esac
exit $RETVAL
===============================================================
4) Then add the script in chkconfig.
su - root
chkconfig --add oracle
chkconfig --list oracle
--------------------------------------------------------------
Done! Nothing more to do.
Reboot your machine and check whether enterprise manager is running :)
$ groupadd oinstall
$ groupadd dba
$ useradd -g oinstall -G dba oracle
$ passwd oracle
2) Fedora Core Packages required for Installation
$ yum install setarch-*
$ yum install tcl-*
$ yum installlibXau-devel-* libXp-*
$ yum installcompat-db-*
$ yum install compat-libstdc++-33*
$ yum install compat-libf2c-34-*
$ yum install compat-gcc-34-*
$ yum install libaio-*
$ yum install compat-gcc-34-c++-*
$ yum install compat-libstdc++-296*
$ yum install compat-libgcc-296*
$ rpm -Uvh openmotif21-2.1.30-14.i386.rpm
3) Checking Memory and Swap Space
Oracle recommends at least 512MB of RAM and 1GB of swap space or twice the size of RAM on the
system. For testing purpose, you can work even with 256MB as well.
To check the size of physical memory, run the following command.
$ grep MemTotal /proc/meminfo
To check the size of swap space, run the following command.
$ grep SwapTotal /proc/meminfo
What if you don’t have enough swap space?
You can add temporary swap space to your system by creating a temporary swap file instead of using
a raw device. Below is the procedure.
Login as root (su - root)
$ dd if=/dev/zero of=tmpswap bs=1k count=900000
$ chmod 600 tmpswap
$ mkswap tmpswap
$ swapon tmpswap
You can also disable the temporary swap space using the following commands.
Login as root (su - root)
$ swapoff tmpswap
$ rm tmpswap
4) Checking temporary (/tmp) Space
Oracle recommends that you should have up to 400 MB space.
To check the space in /tmp, run the following command.
$ df /tmp
What if I don’t have enough temporary space?
If you do not have enough space in the /tmp filesystem, you can temporarily create a tmp directory in
another file system. Below is the procedure to create it.
Login as root (su - root)
$ mkdir /
$ chown root.root /
$ chmod 1777 /
$ export TEMP=/
$ export TMPDIR=/
After Oracle installation is done, you can remove the temporary /tmp directory. I would recommend to
shutdown Oracle first.
Login as root (su - root)
$ rmdir /
$ unset TEMP
$ unset TMPDIR
5) Set Kernel Parameters
Perform the following changes in the kernel parameters.
i. Add the following lines to the /etc/sysctl.conf file.
Login as root (su - root)
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
6) Run the following command to change the current kernel parameters.
$ /sbin/sysctl -p
7) Add the following lines to the /etc/security/limits.conf file.
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
8) Add the following line to the /etc/pam.d/login file, if it does not already exist.
session required /lib/security/pam_limits.so
9) Disable secure linux in the /etc/selinux/config file. You can do by setting value of SELINUX as
follows.
SELINUX=disabled
10) Copy the oracle zip file to "/home/oracle/"
Downloading the software and unpacking installation files
"10201_database_linux32.zip" (668,734,007 bytes) (cksum - 2737423041)
11) Uncompress the file using unzip
$ unzip 10201_database_linux32.zip
You should now have a single directory (db/Disk1) containing installation files.
12) Paste the following lines in /home/oracle/.bash_profile
--------------------------
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/home/oracle/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=ORCL; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export
CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
--------------------------
13) Change the redhat release information
Edit the /etc/redhat-release file replacing the current release information (Fedora 13) with the following. You can copy the original file somewhere else as it will be required after
installation.
redhat-4
14) Start the Oracle Universal Installer (OUI)
As Oracle user, go to the Disk1 directory and start the Oracle Universal Installer (OUI) by issuing the
following command.
$ ./runInstaller
15)Once successfully installed we can access it using the the following URL.
iSQL*Plus URL:
http://localhost:5560/isqlplus
iSQL*Plus DBA URL:
http://localhost:5560/isqlplus/dba
Enterprise Manager 10g Database Control URL:
http://localhost:1158/em
Post Installation Steps
------------------------
1) Edit the '/etc/oratab' file to as given below.
orcl:/home/oracle/oracle/product/10.2.0/db_1:Y
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:
2) Edit "/home/oracle/oracle/product/10.2.0/db_1/bin/dbstart" file.
Please make sure that oracle home is set correctly in this file.
I am pasting few lines of the orginal script.
=====================
#Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
if [ ! $ORACLE_HOME_LISTNER ] ; then
echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
else
LOG=$ORACLE_HOME_LISTNER/listener.log
# Start Oracle Net Listener
if [ -f $ORACLE_HOME_LISTNER/bin/tnslsnr ] ; then
echo "$0:
=====================
#Correct the ORACLE_HOME_LISTNER path as your ORACLE_HOME, I have given this as
ORACLE_HOME_LISTNER=/home/oracle/oracle/product/10.2.0/db_1
3) Create a start up script to start all oracle related services.
File name : /etc/init.d/dbora
===============================================================
#!/bin/bash
#
# chkconfig: 12345 99 10
# description: Oracle auto start-stop script
# --------------------------------------------------------------------------
# File: oracle
#
# Purpose: Oracle auto start-stop script
#
# Location: /etc/init.d
#
# Certified: Oracle 10.2.0.3 on Enterprise Linux 5
# --------------------------------------------------------------------------
# Variables
ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_BASE=/home/oracle/oracle; export ORACLE_BASE
ORACLE_SCRIPTS_DIR=$ORACLE_BASE/product/10.2.0/db_1/bin; export ORACLE_SCRIPTS_DIR
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
RETVAL=0
prog="oracle"
start() {
echo -n $"Starting $prog: "
if [ ! -f $ORACLE_SCRIPTS_DIR/dbstart ]
then
echo "Oracle not started (no dbstart script)"
else
# Start RDBMS
su - $ORACLE_OWNER -c $ORACLE_SCRIPTS_DIR/dbstart
# Start Enterprise Manager Console
su - $ORACLE_OWNER $ORACLE_HOME/bin/emctl start dbconsole
# Start iSQL*Plus
su - $ORACLE_OWNER $ORACLE_HOME/bin/isqlplusctl start
fi
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/oracle
return $RETVAL
}
stop() {
echo -n $"Shutting down $prog: "
if [ ! -f $ORACLE_SCRIPTS_DIR/dbshut ]
then
echo "Oracle not stopped (no dbshut script)"
else
# Stop iSQL*Plus
su - $ORACLE_OWNER $ORACLE_HOME/bin/isqlplusctl stop
# Stop Enterprise Manager Console
su - $ORACLE_OWNER $ORACLE_HOME/bin/emctl stop dbconsole
# Stop RDBMS
su - $ORACLE_OWNER -c $ORACLE_SCRIPTS_DIR/dbshut
fi
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/oracle
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
esac
exit $RETVAL
===============================================================
4) Then add the script in chkconfig.
su - root
chkconfig --add oracle
chkconfig --list oracle
--------------------------------------------------------------
Done! Nothing more to do.
Reboot your machine and check whether enterprise manager is running :)
Sunday, October 31, 2010
Linux Plesk Backend Files
Plesk root directory : /usr/local/psa
Version : /usr/local/psa/version
Admin password is stored : /etc/psa/.psa.shadow
Plesk configuration file : /etc/psa/psa.conf
Restart Plesk : /etc/rc.d/init.d/plesk restart
Apache
Main httpd configuration file : /etc/httpd/conf/httpd.conf
Plesk httpd : /etc/httpd/conf.d/zz010_psa_httpd.conf
Include conf files are under : /etc/httpd/conf.d (depends on the location specified in main httpd)
Startup script for plesk apache : /usr/local/psa/admin/bin/httpsdctl start
Apache main log files under : /var/log/httpd
PHP
Php configuration file : /etc/php.ini
Php extension modules are taken from : /etc/php.d
Named
Conf file located : /var/named/run-root/etc/named.conf
DB record : /var/named/run-root/var/domain.com
Log file : /var/log/messages
Service to restart : /etc/init.d/named restart
FTP
Conf file : /etc/proftpd.conf
Log file : /var/log/messages
Mysql
Databases are located at : /var/lib/mysql
Configuration file : /etc/my.cnf
Mysql log : /var/log/mysqld.log
Mail Server
Location of qmail directory : /var/qmail
Mail directory of a domain : /var/qmail/mailnames/domain.com
Mail log : /var/log/maillog or /usr/local/psa/var/log/maillog
Home directory of a domain
Home directory : /var/www/vhosts/domain.com
Httpd conf file of a domain : /var/www/vhosts/domain.com/conf/httpd.include
document root directory : /var/www/vhosts/domain.com/httpdocs
Document root directory of secure website : /var/www/vhosts/domain.com/httpdsdocs
Subdomains are created under : /var/www/vhosts/domain.com/subdomains
Domain specific logs are under : /var/www/vhosts/domain.com/statistics/ logs
==============================================
To log in to plesk use
https: :8443
There are four login levels for plesk
They are
1) Administrator
2)Client/Reseller
3) Domain owner
4) Email user
Each level has got its own functions
Administrator
This login is used to by hosting administators to manage the server items . Client/reseller,Domain owner,Email user creation can be done by using this account.
Note : We cannot use the root password for login to this account as in Cpanel. To login to this account use
Username : admin
Password : (will be stored in fiel /etc/psa/.psa.shadow )
Client/Reseller
This is the second tier account . Domain owner accounts and Email user accounts can be managed from this account.
Domain owner
Everything related to one domain can be managed by using this account. usually client/reseller creates a Domain owner account.
mail user
This is the fourth tier account. Here users are allowed to manage their mail account. Only mail related functions are allowed here such as sending mails ,seting spam filters etc.
Software componets of plesk.
The following software components are used with plesk.
DNS server : bind
Webserver : Apache
FTP server : proftpd
Mail server : Mysql,mssql,postgresql
IMAP/POP : courier-IMAP
Mailing list: Mailman
Statistical softwares : Webalizer, AWstats
Types of hosting
In plesk, 3 modes of hosting are avaliable
They are
Physical hosting
The domain is actually hosted on that server.
Standard Hosting
Here url is redirected such that browser url will be changed to destination url
Frame forward
Here also redirection takes place. But browser url doesnot change
PSA DATABASE
*****************
Plesk has a database called psa. We can use the administrator username(admin) and password to login to psa database.
>Tables in psa database are
1. Domains
2. Clients
3. db_users
4.db_bases
5. disk_spaces
6.mail
7.lockout
8. web_users
Backup
> To back up all data
/plesk_installation_directory/bin/pleskbackup all name>
> To back up all user accounts with all users’ sites,
/plesk_installation_directory/bin/pleskbackup clients
Version : /usr/local/psa/version
Admin password is stored : /etc/psa/.psa.shadow
Plesk configuration file : /etc/psa/psa.conf
Restart Plesk : /etc/rc.d/init.d/plesk restart
Apache
Main httpd configuration file : /etc/httpd/conf/httpd.conf
Plesk httpd : /etc/httpd/conf.d/zz010_psa_httpd.conf
Include conf files are under : /etc/httpd/conf.d (depends on the location specified in main httpd)
Startup script for plesk apache : /usr/local/psa/admin/bin/httpsdctl start
Apache main log files under : /var/log/httpd
PHP
Php configuration file : /etc/php.ini
Php extension modules are taken from : /etc/php.d
Named
Conf file located : /var/named/run-root/etc/named.conf
DB record : /var/named/run-root/var/domain.com
Log file : /var/log/messages
Service to restart : /etc/init.d/named restart
FTP
Conf file : /etc/proftpd.conf
Log file : /var/log/messages
Mysql
Databases are located at : /var/lib/mysql
Configuration file : /etc/my.cnf
Mysql log : /var/log/mysqld.log
Mail Server
Location of qmail directory : /var/qmail
Mail directory of a domain : /var/qmail/mailnames/domain.com
Mail log : /var/log/maillog or /usr/local/psa/var/log/maillog
Home directory of a domain
Home directory : /var/www/vhosts/domain.com
Httpd conf file of a domain : /var/www/vhosts/domain.com/conf/httpd.include
document root directory : /var/www/vhosts/domain.com/httpdocs
Document root directory of secure website : /var/www/vhosts/domain.com/httpdsdocs
Subdomains are created under : /var/www/vhosts/domain.com/subdomains
Domain specific logs are under : /var/www/vhosts/domain.com/statistics/ logs
==============================================
To log in to plesk use
https:
There are four login levels for plesk
They are
1) Administrator
2)Client/Reseller
3) Domain owner
4) Email user
Each level has got its own functions
Administrator
This login is used to by hosting administators to manage the server items . Client/reseller,Domain owner,Email user creation can be done by using this account.
Note : We cannot use the root password for login to this account as in Cpanel. To login to this account use
Username : admin
Password : (will be stored in fiel /etc/psa/.psa.shadow )
Client/Reseller
This is the second tier account . Domain owner accounts and Email user accounts can be managed from this account.
Domain owner
Everything related to one domain can be managed by using this account. usually client/reseller creates a Domain owner account.
mail user
This is the fourth tier account. Here users are allowed to manage their mail account. Only mail related functions are allowed here such as sending mails ,seting spam filters etc.
Software componets of plesk.
The following software components are used with plesk.
DNS server : bind
Webserver : Apache
FTP server : proftpd
Mail server : Mysql,mssql,postgresql
IMAP/POP : courier-IMAP
Mailing list: Mailman
Statistical softwares : Webalizer, AWstats
Types of hosting
In plesk, 3 modes of hosting are avaliable
They are
Physical hosting
The domain is actually hosted on that server.
Standard Hosting
Here url is redirected such that browser url will be changed to destination url
Frame forward
Here also redirection takes place. But browser url doesnot change
PSA DATABASE
*****************
Plesk has a database called psa. We can use the administrator username(admin) and password to login to psa database.
>Tables in psa database are
1. Domains
2. Clients
3. db_users
4.db_bases
5. disk_spaces
6.mail
7.lockout
8. web_users
Backup
> To back up all data
/plesk_installation_directory/bin/pleskbackup all
> To back up all user accounts with all users’ sites,
/plesk_installation_directory/bin/pleskbackup clients
Wednesday, October 27, 2010
Windows Plesk backend.
Webserver:
To switch Plesk Control Panel web provider you can use the following commands:
-------------------
IIS to Apache
"%plesk_bin%\reconfigurator.exe" --switch-plesk-web-server --new-provider=apache
Apache to IIS
"%plesk_bin%\reconfigurator.exe" --switch-plesk-web-server --new-provider=iis
To install hosting for a domain
websrvmng.exe --install-vhost --vhost-name=
To remove hosting for a domain
websrvmng.exe --remove-vhost --vhost-name=
To reconfigure hosting for a domain
websrvmng.exe --reconfigure-vhost --vhost-name=
To reconfigure a subdomain
websrvmng.exe --update-subdomain --vhost-name= --subdomain=
Passwords for system user and IIS user can be unsynchronized or synchronised using
websrvmng.exe --update-anon-password --domain-name=
To reconfigure webmail
websrvmng.exe --reconfigure-webmail
defpackagemng.exe" --fix --type=webmail
Re-configure FTP configuration
For a particular domain.
"%plesk_bin%\ftpmng.exe" --remove-vhost --vhost-name=yourdomain.com
"%plesk_bin%\ftpmng.exe" --reconfigure-vhost --vhost-name=yourdomain.com
For all domains in the server.
"%plesk_bin%\ftpmng.exe" --remove-all
"%plesk_bin%\ftpmng.exe" --reconfigure-all
To switch Plesk Control Panel web provider you can use the following commands:
-------------------
IIS to Apache
"%plesk_bin%\reconfigurator.exe" --switch-plesk-web-server --new-provider=apache
Apache to IIS
"%plesk_bin%\reconfigurator.exe" --switch-plesk-web-server --new-provider=iis
To install hosting for a domain
websrvmng.exe --install-vhost --vhost-name=
To remove hosting for a domain
websrvmng.exe --remove-vhost --vhost-name=
To reconfigure hosting for a domain
websrvmng.exe --reconfigure-vhost --vhost-name=
To reconfigure a subdomain
websrvmng.exe --update-subdomain --vhost-name=
Passwords for system user and IIS user can be unsynchronized or synchronised using
websrvmng.exe --update-anon-password --domain-name=
To reconfigure webmail
websrvmng.exe --reconfigure-webmail
defpackagemng.exe" --fix --type=webmail
Re-configure FTP configuration
For a particular domain.
"%plesk_bin%\ftpmng.exe" --remove-vhost --vhost-name=yourdomain.com
"%plesk_bin%\ftpmng.exe" --reconfigure-vhost --vhost-name=yourdomain.com
For all domains in the server.
"%plesk_bin%\ftpmng.exe" --remove-all
"%plesk_bin%\ftpmng.exe" --reconfigure-all
Sunday, October 24, 2010
Windows shortcuts from Run
Add/Remove Programs - appwiz.cpl
Check Disk Utility - chkdsk
Command Prompt - cmd
Component Services - dcomcnfg
Computer Management - compmgmt.msc
Date and Time Properties - timedate.cpl
Device Manager - devmgmt.msc
Disk Management - diskmgmt.msc
Disk Partition Manager - diskpart
Display Properties - desk.cpl
Event Viewer - eventvwr.msc
Fonts control - fonts
Group Policy Editor -gpedit.msc
Local Security Settings - secpol.msc
Local Users and Groups - lusrmgr.msc
Network Connections - ncpa.cpl
Performance Monitor - perfmon.msc
Performance Monitor - perfmon
Power Configuration - powercfg.cpl
Registry Editor - regedit
Remote Desktop - mstsc
Services - services.msc
SQL Client Configuration - cliconfg
System Configuration Utility - msconfig
System File Checker Utility (Scan Immediately) - sfc /scannow
System File Checker Utility (Scan Once At Next Boot) - sfc /scanonce
System File Checker Utility (Scan On Every Boot) - sfc /scanboot
System File Checker Utility (Return to Default Set - sfc /purgecache
System File Checker Utility (Set Cache Size to size x) - sfc /cachesize=x
System Properties - sysdm.cpl
Task Manager - taskmgr
Utility Manager - utilman
Windows Firewall - firewall.cpl
Windows Management Infrastructure - wmimgmt.msc
Windows System Security Tool - syskey
Check Disk Utility - chkdsk
Command Prompt - cmd
Component Services - dcomcnfg
Computer Management - compmgmt.msc
Date and Time Properties - timedate.cpl
Device Manager - devmgmt.msc
Disk Management - diskmgmt.msc
Disk Partition Manager - diskpart
Display Properties - desk.cpl
Event Viewer - eventvwr.msc
Fonts control - fonts
Group Policy Editor -gpedit.msc
Local Security Settings - secpol.msc
Local Users and Groups - lusrmgr.msc
Network Connections - ncpa.cpl
Performance Monitor - perfmon.msc
Performance Monitor - perfmon
Power Configuration - powercfg.cpl
Registry Editor - regedit
Remote Desktop - mstsc
Services - services.msc
SQL Client Configuration - cliconfg
System Configuration Utility - msconfig
System File Checker Utility (Scan Immediately) - sfc /scannow
System File Checker Utility (Scan Once At Next Boot) - sfc /scanonce
System File Checker Utility (Scan On Every Boot) - sfc /scanboot
System File Checker Utility (Return to Default Set - sfc /purgecache
System File Checker Utility (Set Cache Size to size x) - sfc /cachesize=x
System Properties - sysdm.cpl
Task Manager - taskmgr
Utility Manager - utilman
Windows Firewall - firewall.cpl
Windows Management Infrastructure - wmimgmt.msc
Windows System Security Tool - syskey
Wednesday, July 7, 2010
Some Plesk
1. Getting all the domain account information from Plesk
------------------------------------------------------------------------
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e "select
login,password,home from sys_users INNER JOIN accounts on
accounts.id=sys_users.account_id;"
2. Get client login details from Plesk.
-----------------------------------------------
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e "select
login,password from clients INNER JOIN accounts on
accounts.id=clients.account_id;"
3. Getting all mail account login information
--------------------------------------------------------
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e "SELECT
CONCAT_WS('@',mail.mail_name,domains.name) as email ,accounts.password
FROM domains,mail,accounts WHERE domains.id=mail.dom_id AND
accounts.id=mail.account_id ORDER BY domains.name ASC,mail.mail_name ASC;"
4. Creating/deleting/updating mail accounts using command line
---------------------------------------------------------------------------------
create mail account
/usr/local/psa/bin/mail -c USER@DOMAIN.COM -passwd PASSWORD -mailbox
true -cp-access true
update mail account
/usr/local/psa/bin/mail -u USER@DOMAIN.COM -passwd NEWPASS
remove mail account
/usr/local/psa/bin/mail --remove USER@DOMAIN.COM
5. Mailing list management
----------------------------------
creating mailing list
/usr/local/psa/bin/maillist --create MYLIST -domain DOMAIN.COM
-passwd_type plain -passwd PASS -notify false -email LISTADMIN@DOMAIN.COM
Adding/removing members to the mailing list.
/usr/local/psa/bin/maillist -u MYLIST -domain DOMAIN.COM -members
add:NEW@DOMAIN.COM
/usr/local/psa/bin/maillist -u MYLIST -domain DOMAIN.COM -members
del:NEW@DOMAIN.COM
Getting list members
/usr/local/psa/bin/maillist -i MYLIST -domain DOMAIN.COM
Removing list
/usr/local/psa/bin/maillist -r MYLIST -domain DOMAIN.COM
6. Managing databases.
------------------------------
create database
/usr/local/psa/bin/database --create DBNAME -domain DOMAIN.COM -server
localhost:3306 -add_user DBUSER -passwd PASS
remove database
/usr/local/psa/bin/database -r DBNAME
------------------------------------------------------------------------
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e "select
login,password,home from sys_users INNER JOIN accounts on
accounts.id=sys_users.account_id;"
2. Get client login details from Plesk.
-----------------------------------------------
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e "select
login,password from clients INNER JOIN accounts on
accounts.id=clients.account_id;"
3. Getting all mail account login information
--------------------------------------------------------
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e "SELECT
CONCAT_WS('@',mail.mail_name,domains.name) as email ,accounts.password
FROM domains,mail,accounts WHERE domains.id=mail.dom_id AND
accounts.id=mail.account_id ORDER BY domains.name ASC,mail.mail_name ASC;"
4. Creating/deleting/updating mail accounts using command line
---------------------------------------------------------------------------------
create mail account
/usr/local/psa/bin/mail -c USER@DOMAIN.COM -passwd PASSWORD -mailbox
true -cp-access true
update mail account
/usr/local/psa/bin/mail -u USER@DOMAIN.COM -passwd NEWPASS
remove mail account
/usr/local/psa/bin/mail --remove USER@DOMAIN.COM
5. Mailing list management
----------------------------------
creating mailing list
/usr/local/psa/bin/maillist --create MYLIST -domain DOMAIN.COM
-passwd_type plain -passwd PASS -notify false -email LISTADMIN@DOMAIN.COM
Adding/removing members to the mailing list.
/usr/local/psa/bin/maillist -u MYLIST -domain DOMAIN.COM -members
add:NEW@DOMAIN.COM
/usr/local/psa/bin/maillist -u MYLIST -domain DOMAIN.COM -members
del:NEW@DOMAIN.COM
Getting list members
/usr/local/psa/bin/maillist -i MYLIST -domain DOMAIN.COM
Removing list
/usr/local/psa/bin/maillist -r MYLIST -domain DOMAIN.COM
6. Managing databases.
------------------------------
create database
/usr/local/psa/bin/database --create DBNAME -domain DOMAIN.COM -server
localhost:3306 -add_user DBUSER -passwd PASS
remove database
/usr/local/psa/bin/database -r DBNAME
Tuesday, July 6, 2010
OpenVZ Commands
Introduction
====================
vz -> recommends ext3 file system
PIM -> IP:4643
PMC -> mangaing h/w node
PPP -> for managing a single container
All the above things need a license from parallel
====================
Templates
====================
OS template -> vzpkg (cache needs to created before creating the container)
EZ template -> points to the repository that contains packages that constitute the template
Application template -> mysql template
====================
To create a container
====================
vzctl create
the container ID > 100
32 -bit integer
ID - 0 -> h/w node
ID -1 -> service container
/etc/vz/conf -> for the sample file names (only use the main part of the file name)
vzctl set - configure the container
vzctl exec - run anything on the container
vzctl status/vzlist 101
vzpkg - for adding application templates on h/w node (/vz/templates)
- the same command can be used for installing/removing the template into a the container.
Virtuozzo - User's guide
OS virtualization - (1-2% of is spent on the virtualization s/w)
VZFS - allows sharing of common files among containers
Hardware node & Containers
/etc/vz/vz.conf
/etc/vz/conf/
/etc/vzbackup.conf
Standard migration
vzmigrate
Zero downtime migration
vzmigrate --online --require-realtime my_node.com 101
Move the container within the h/w node
vzmlocal
Backup & restore
vzabackup/vzarestore
Reinstall container
vzctl recover -> restores the VZFS symlinks
vzctl reinstall -> creates new private area for the container, copies the old private area to /old dir
- vps.configure, vps.reinstall
Delete the container
vzctl destroy
Disabling the container
vzctl set
Suspending the container
vzctl suspend
Setting up resources
disk quotas - first level(how much files or disk space the container can use) and second level (quotaugidlimit > no of entries in /etc/passwd or group files)
Container must be restarted to come this changes into effect
vzquota - to check the status of the quota info
Cleaning up containers - to move identical files from contrainers to /vz/template/vc folder
vzcache
Linking container files with application templates
vzpkg link
vzpkglink
vzpkgls
Managing CPU - cpu share and the number of processors the node can make use of.
vzcpucheck
Network traffic
/etc/vz/conf/networks_classes - after any changes, you need to service vz accrestart
class 0 - no accounting will be performed
class 1 - defined by containers to match any IP address
vznetstat
Bandwidth management (outgoing traffic)
service vz shaperon, shaperrestart, shaperoff
BANDWIDTH -> kilobites per second
TOTALRATE ->::
For container
RATE ->::
RATEBOUND -> to specify if the bandwidth is limited to the RATEBOUND
====================
Monitoring tools
====================
vzstat
vzps
vzpid
vztop
vzsetxinetd
Virtuozzo networks
vznetcfg if list
vznetcfg vlan add eth0 5
vznetcfg vlan del eth0.5
vznetcfg net addif vznetwork1 eth0
vznetcfg net delif eth0
vznetcfg net new vznetwork1
vznetcfg net del vznetwork1
vznetcfg net list
venet0 --?
License
vzlicload
vzlicupdate
vzlicview
Keeping system up2date
The h/w node can be updated using the normal update procedures without affecting virtuozzo
vzup2date - /etc/sysconfig/vzup2date/vzup2date.conf
vzup2date -m batch install --core
vzup2date -t -m batch install --all-os
Updating the containers
vzpkg update 101 redhat-el5-x86
vzpkg update 101
vzpkg update cache fedora-core-8-x86
Loading iptables modules
/etc/sysconfig/iptables-config
/etc/vz/vz.conf
/etc/vz/conf/.conf
VZFS-v2
Virtuozzo - Templates management guide
/vz/template
/vz/private/
/vz/root/
vzpkg - for managing VZ template
vzpkgls - for listing standard template
vzpkg install -p 110 yum
Virtuozzo - Managing UBC Resources
vzcfgvalidate
VE0CPUUNITS
SLM parameters
i-node setups
ext3 - 1 inode per every 4K
====================
vz -> recommends ext3 file system
PIM -> IP:4643
PMC -> mangaing h/w node
PPP -> for managing a single container
All the above things need a license from parallel
====================
Templates
====================
OS template -> vzpkg (cache needs to created before creating the container)
EZ template -> points to the repository that contains packages that constitute the template
Application template -> mysql template
====================
To create a container
====================
vzctl create
the container ID > 100
32 -bit integer
ID - 0 -> h/w node
ID -1 -> service container
/etc/vz/conf -> for the sample file names (only use the main part of the file name)
vzctl set - configure the container
vzctl exec - run anything on the container
vzctl status/vzlist 101
vzpkg - for adding application templates on h/w node (/vz/templates)
- the same command can be used for installing/removing the template into a the container.
Virtuozzo - User's guide
OS virtualization - (1-2% of is spent on the virtualization s/w)
VZFS - allows sharing of common files among containers
Hardware node & Containers
/etc/vz/vz.conf
/etc/vz/conf/
/etc/vzbackup.conf
Standard migration
vzmigrate
Zero downtime migration
vzmigrate --online --require-realtime my_node.com 101
Move the container within the h/w node
vzmlocal
Backup & restore
vzabackup/vzarestore
Reinstall container
vzctl recover -> restores the VZFS symlinks
vzctl reinstall -> creates new private area for the container, copies the old private area to /old dir
- vps.configure, vps.reinstall
Delete the container
vzctl destroy
Disabling the container
vzctl set
Suspending the container
vzctl suspend
Setting up resources
disk quotas - first level(how much files or disk space the container can use) and second level (quotaugidlimit > no of entries in /etc/passwd or group files)
Container must be restarted to come this changes into effect
vzquota - to check the status of the quota info
Cleaning up containers - to move identical files from contrainers to /vz/template/vc folder
vzcache
Linking container files with application templates
vzpkg link
vzpkglink
vzpkgls
Managing CPU - cpu share and the number of processors the node can make use of.
vzcpucheck
Network traffic
/etc/vz/conf/networks_classes - after any changes, you need to service vz accrestart
class 0 - no accounting will be performed
class 1 - defined by containers to match any IP address
vznetstat
Bandwidth management (outgoing traffic)
service vz shaperon, shaperrestart, shaperoff
BANDWIDTH -> kilobites per second
TOTALRATE ->
For container
RATE ->
RATEBOUND -> to specify if the bandwidth is limited to the RATEBOUND
====================
Monitoring tools
====================
vzstat
vzps
vzpid
vztop
vzsetxinetd
Virtuozzo networks
vznetcfg if list
vznetcfg vlan add eth0 5
vznetcfg vlan del eth0.5
vznetcfg net addif vznetwork1 eth0
vznetcfg net delif eth0
vznetcfg net new vznetwork1
vznetcfg net del vznetwork1
vznetcfg net list
venet0 --?
License
vzlicload
vzlicupdate
vzlicview
Keeping system up2date
The h/w node can be updated using the normal update procedures without affecting virtuozzo
vzup2date - /etc/sysconfig/vzup2date/vzup2date.conf
vzup2date -m batch install --core
vzup2date -t -m batch install --all-os
Updating the containers
vzpkg update 101 redhat-el5-x86
vzpkg update 101
vzpkg update cache fedora-core-8-x86
Loading iptables modules
/etc/sysconfig/iptables-config
/etc/vz/vz.conf
/etc/vz/conf/
VZFS-v2
Virtuozzo - Templates management guide
/vz/template
/vz/private/
/vz/root/
vzpkg - for managing VZ template
vzpkgls - for listing standard template
vzpkg install -p 110 yum
Virtuozzo - Managing UBC Resources
vzcfgvalidate
VE0CPUUNITS
SLM parameters
i-node setups
ext3 - 1 inode per every 4K
Monday, January 25, 2010
Hspere files
-- To find the php version
/hsphere/shared/php4/bin/php-cli -v
PHP 4.4.9 (cli) (built: Aug 20 2008 15:07:03)
-- Paths to php.ini
/hsphere/local/config/httpd/php4/php.ini for PHP4
/hsphere/local/config/httpd/php4/php.ini for PHP5
Http:
~~~
-- Document root for each domain:
/hsphere/local/home//
-- Main conf file:
/hsphere/local/config/httpd/httpd.conf
-- Conf file for all sites:
/hsphere/local/config/httpd/sites
Each virtualhost entries will be under different files xxxx.conf.
xxxx is a random numbers.
-- Main Log files: /hsphere/local/var/httpd/logs/
For each domain
~~~~~~~~~~
-- TransferLog /hsphere/local/home//logs//domain.com
-- CustomLog /hsphere/local/home//logs//referrer_log
-- ErrorLog /hsphere/local/home//logs//error_log
MYSQL:
~~~~~
-- /var/lib/mysql
-- /var/log/mysql/error.log
Mail:
~~~
-- mail box path
/hsphere/local/var/vpopmail/domains//
-- log file
/var/log/maillog
-- Qmail related file
/hsphere/local/var/qmail
Named
~~~~~
-- Conf file
/etc/named.conf
-- Zone files
/hsphere/local/var/named
This folder contains many sub-folders. Find the zone file using grep command
Eg: /hsphere/local/var/named/zones17/12/domain.com
-- Proftp Conf
/hsphere/local/config/ftpd/proftpd.conf
-- proftp referrer logs
/hsphere/local/var/proftpd/xferlog
-- Proftod logs are in this directory
/var/log/proftpd/
-- Webalizer config file
/hsphere/local/config/webalizer/webalizer.cfg
/hsphere/shared/php4/bin/php-cli -v
PHP 4.4.9 (cli) (built: Aug 20 2008 15:07:03)
-- Paths to php.ini
/hsphere/local/config/httpd/php4/php.ini for PHP4
/hsphere/local/config/httpd/php4/php.ini for PHP5
Http:
~~~
-- Document root for each domain:
/hsphere/local/home/
-- Main conf file:
/hsphere/local/config/httpd/httpd.conf
-- Conf file for all sites:
/hsphere/local/config/httpd/sites
Each virtualhost entries will be under different files xxxx.conf.
xxxx is a random numbers.
-- Main Log files: /hsphere/local/var/httpd/logs/
For each domain
~~~~~~~~~~
-- TransferLog /hsphere/local/home/
-- CustomLog /hsphere/local/home/
-- ErrorLog /hsphere/local/home/
MYSQL:
~~~~~
-- /var/lib/mysql
-- /var/log/mysql/error.log
Mail:
~~~
-- mail box path
/hsphere/local/var/vpopmail/domains/
-- log file
/var/log/maillog
-- Qmail related file
/hsphere/local/var/qmail
Named
~~~~~
-- Conf file
/etc/named.conf
-- Zone files
/hsphere/local/var/named
This folder contains many sub-folders. Find the zone file using grep command
Eg: /hsphere/local/var/named/zones17/12/domain.com
-- Proftp Conf
/hsphere/local/config/ftpd/proftpd.conf
-- proftp referrer logs
/hsphere/local/var/proftpd/xferlog
-- Proftod logs are in this directory
/var/log/proftpd/
-- Webalizer config file
/hsphere/local/config/webalizer/webalizer.cfg
Reset Wordpress admin password from Database
Enter into mysql
--------------------
mysql> use dbuser;
Database changed
mysql> show databases;
+-----------------------+
| Database |
+-----------------------+
| information_schema |
| cpuser_wordpress |
+-----------------------+
3 rows in set (6.52 sec)
mysql> use cpuser_wordpress
Database changed
mysql> show tables;
+---------------------------------+
| Tables_in_cpuser_wordpress |
+---------------------------------+
| wp_comments |
| wp_links |
| wp_options |
| wp_postmeta |
| wp_posts |
| wp_term_relationships |
| wp_term_taxonomy |
| wp_terms |
| wp_usermeta |
| wp_users |
+---------------------------------+
10 rows in set (0.00 sec)
mysql> select * from wp_users\G;
*************************** 1. row ***************************
ID: 1
user_login: admin
user_pass: $P$B2BPfEOCFZzwbL.NRoGpxzbo/Hz8Gz1
user_nicename: admin
user_email: admin@domain.com
user_url:
user_registered: 1/1/10
user_activation_key:
user_status: 0
display_name: admin
1 row in set (0.03 sec)
mysql> update wp_users set user_pass=md('newpass') where user_login='admin';
--------------------
--------------------
mysql> use dbuser;
Database changed
mysql> show databases;
+-----------------------+
| Database |
+-----------------------+
| information_schema |
| cpuser_wordpress |
+-----------------------+
3 rows in set (6.52 sec)
mysql> use cpuser_wordpress
Database changed
mysql> show tables;
+---------------------------------+
| Tables_in_cpuser_wordpress |
+---------------------------------+
| wp_comments |
| wp_links |
| wp_options |
| wp_postmeta |
| wp_posts |
| wp_term_relationships |
| wp_term_taxonomy |
| wp_terms |
| wp_usermeta |
| wp_users |
+---------------------------------+
10 rows in set (0.00 sec)
mysql> select * from wp_users\G;
*************************** 1. row ***************************
ID: 1
user_login: admin
user_pass: $P$B2BPfEOCFZzwbL.NRoGpxzbo/Hz8Gz1
user_nicename: admin
user_email: admin@domain.com
user_url:
user_registered: 1/1/10
user_activation_key:
user_status: 0
display_name: admin
1 row in set (0.03 sec)
mysql> update wp_users set user_pass=md('newpass') where user_login='admin';
--------------------
Sunday, January 24, 2010
Reset database user password
Enter into mysql
----------
SET PASSWORD FOR 'brian_btball'@'localhost' = OLD_PASSWORD('604074');
FLUSH PRIVILEGES;
----------
----------
SET PASSWORD FOR 'brian_btball'@'localhost' = OLD_PASSWORD('604074');
FLUSH PRIVILEGES;
----------
Repair Database
To repair database from shell
---------
cd /var/lib/mysql/datbase name
myisamchk --recover *.MYI
---------
---------
cd /var/lib/mysql/datbase name
myisamchk --recover *.MYI
---------
Site infected
Run this script there in root ....ull seee infected files :)
Dont forget to change the username
------------
#!/bin/bash
pattern='r0nin|m0rtix|upl0ad|r57shell|c99shell|shellbot|phpshell|void\.ru|phpremoteview|directmail|bash_history|\.ru/|brute *force|multiviews|cwings|bitchx|eggdrop|guardservices|psybnc|dalnet|undernet|vulnscan|spymeta|raslan58|deface|defacing|defacer|MSRml'
searchpath=/home/lhemail/
find $searchpath \( -regex '.*\.php$' -o -regex '.*\.cgi$' -o -regex '.*\.inc$' -o -regex '.*\.pl' \) -print0 | xargs -0 egrep -il "$pattern" /dev/null | sort >> report.$$
cat report.$$
------------
Dont forget to change the username
------------
#!/bin/bash
pattern='r0nin|m0rtix|upl0ad|r57shell|c99shell|shellbot|phpshell|void\.ru|phpremoteview|directmail|bash_history|\.ru/|brute *force|multiviews|cwings|bitchx|eggdrop|guardservices|psybnc|dalnet|undernet|vulnscan|spymeta|raslan58|deface|defacing|defacer|MSRml'
searchpath=/home/lhemail/
find $searchpath \( -regex '.*\.php$' -o -regex '.*\.cgi$' -o -regex '.*\.inc$' -o -regex '.*\.pl' \) -print0 | xargs -0 egrep -il "$pattern" /dev/null | sort >> report.$$
cat report.$$
------------
Cpanel --- Ensim
==================
/etc/proftpd.conf---/home/virtual/ < your domain >/etc/prpftpd.conf
/etc/passwd --- /home/virtual/ < your domain >/etc/passwd
/etc/valiases/domain --- /home/virtual/ < your domain >/etc/aliases
/usr/local/apache/conf/httpd.conf --- /etc/httpd/domain.comconf/virtual/< site number >
/etc/exim.conf --- /home/virtual/ < your domain>/etc/sendmail.cf
/var/named/domain .db --- /var/named/db.domain
/usr/local/apache/logs/error_logs --- /home/virtual//var/log/httpd/error_log
/usr/local/apache/logs/access_logs --- /home/virtual/< domain >/var/log/httpd/access_logs
-------------------
Location of home directory in cpanel and ensim
In cpanel the home directory is located at /home/user name
In ensim its /home/virtual/domain name
-------------------
Temporary URL used in cpanel servers ,when the domain name is not active.
http://server ip address/~user name
-------------------
Temporary URL used in ensim servers ,when the domain name is not active
http://srv02.behosted.com/~admin< number >/
-------------------
Accessing shared ssl in cpanel
https://server ip/~user name
-------------------
Accessing sharhttps://www.dfwairparts.com/admin/categories.php?osCAdminID=74db583034663bf2f61754044bbcea4ded ssl in ensim
https://server ip/~admin < number>
-------------------
Anonymous ftp login path in cpanel
/home/user name/public_ftp/
-------------------
Anonymous ftp login path in ensim
/home/virtual/< domain name >/var/ftp
-------------------
In cpanel ftp users are created under the path
/home/user name/public_html
-------------------
In ensim the ftp users are created under the path
/home/virtual/< domain name > /home
-------------------
In cpanel all the mail accounts are located at
/home/user name/mail
In ensim all the mail accounts are located at
/home/virtual/< domain name >/var/mail
-------------------
In cpanel webmail is accessed using the link
http:// domain name or ip :2095
-------------------
In ensim you access mail using
http://domain name/squirrelmail
-------------------
In cpanel servers we have to use user name as username@domain.com while connecting using ftp.
In ensim also we have to use username@domain.com while connecting using ftp.
In cpanel servers we use user name as just user name while connecting to the server using shell access
ie ssh -l user name domain.com
In ensim we use the user name as username#domain.com
eg: ssh -l username#domain.com domain
-------------------
In cpanel the mail queue is located at the path
/var/Spool/exim/input
-------------------
In ensim there is mailqueue for each domain.
The path is /home/virtual/< domain > /var/spool/mqueue
-------------------
Public_html and cgi-bin folder in cpanel servers are located at
/home/user name/public_html
/home/user name/public_html/cgi-bin
-------------------
In ensim the document root are at
/home/virtual/< domain name > /var/www/html
/home/virtual/< domain name >/var/www/cgi-bin
-------------------
In cpanel we use vfilters to block a mail from a particular mail account .The path is /etc/vfilters/domain name
In ensim we use access file to block a mail from a particular mail account. The path is /home/virtual/site[x]/fst/etc/mail/access
format is
spam@spammer.com REJECT
-------------------
Cpanel can be restarted using the command
/etc/rc.d/init.d/cpanel3
Ensim can also be restarted using the commands
/etc/rc.d/init.d/webppliance
==================
/etc/proftpd.conf---/home/virtual/ < your domain >/etc/prpftpd.conf
/etc/passwd --- /home/virtual/ < your domain >/etc/passwd
/etc/valiases/domain --- /home/virtual/ < your domain >/etc/aliases
/usr/local/apache/conf/httpd.conf --- /etc/httpd/domain.comconf/virtual/< site number >
/etc/exim.conf --- /home/virtual/ < your domain>/etc/sendmail.cf
/var/named/domain .db --- /var/named/db.domain
/usr/local/apache/logs/error_logs --- /home/virtual/
/usr/local/apache/logs/access_logs --- /home/virtual/< domain >/var/log/httpd/access_logs
-------------------
Location of home directory in cpanel and ensim
In cpanel the home directory is located at /home/user name
In ensim its /home/virtual/domain name
-------------------
Temporary URL used in cpanel servers ,when the domain name is not active.
http://server ip address/~user name
-------------------
Temporary URL used in ensim servers ,when the domain name is not active
http://srv02.behosted.com/~admin< number >/
-------------------
Accessing shared ssl in cpanel
https://server ip/~user name
-------------------
Accessing sharhttps://www.dfwairparts.com/admin/categories.php?osCAdminID=74db583034663bf2f61754044bbcea4ded ssl in ensim
https://server ip/~admin < number>
-------------------
Anonymous ftp login path in cpanel
/home/user name/public_ftp/
-------------------
Anonymous ftp login path in ensim
/home/virtual/< domain name >/var/ftp
-------------------
In cpanel ftp users are created under the path
/home/user name/public_html
-------------------
In ensim the ftp users are created under the path
/home/virtual/< domain name > /home
-------------------
In cpanel all the mail accounts are located at
/home/user name/mail
In ensim all the mail accounts are located at
/home/virtual/< domain name >/var/mail
-------------------
In cpanel webmail is accessed using the link
http:// domain name or ip :2095
-------------------
In ensim you access mail using
http://domain name/squirrelmail
-------------------
In cpanel servers we have to use user name as username@domain.com while connecting using ftp.
In ensim also we have to use username@domain.com while connecting using ftp.
In cpanel servers we use user name as just user name while connecting to the server using shell access
ie ssh -l user name domain.com
In ensim we use the user name as username#domain.com
eg: ssh -l username#domain.com domain
-------------------
In cpanel the mail queue is located at the path
/var/Spool/exim/input
-------------------
In ensim there is mailqueue for each domain.
The path is /home/virtual/< domain > /var/spool/mqueue
-------------------
Public_html and cgi-bin folder in cpanel servers are located at
/home/user name/public_html
/home/user name/public_html/cgi-bin
-------------------
In ensim the document root are at
/home/virtual/< domain name > /var/www/html
/home/virtual/< domain name >/var/www/cgi-bin
-------------------
In cpanel we use vfilters to block a mail from a particular mail account .The path is /etc/vfilters/domain name
In ensim we use access file to block a mail from a particular mail account. The path is /home/virtual/site[x]/fst/etc/mail/access
format is
spam@spammer.com REJECT
-------------------
Cpanel can be restarted using the command
/etc/rc.d/init.d/cpanel3
Ensim can also be restarted using the commands
/etc/rc.d/init.d/webppliance
Tuesday, January 19, 2010
Maximum emails for a domain
To change the default maximum emails per hour of a server.
------------
[root@server ~]#vi /var/cpanel/maxemailsperhour
------------
To set maximum emails per hour for a particular domain.
-------------
[root@server ~]# vi /var/cpanel/maxemails
# If you update this file you must run /scripts/build_maxemails_config
emails.com=500
domain.net=1000
[root@server ~]#/scripts/build_maxemails_config
After this command, a file automatically get created under the directory [var/cpanel/maxemailsperdomain/]with the email value you've set for those particular domains.
Just to check, type the following which should return the value that you entered in the previous file.
-------------
------------
[root@server ~]#vi /var/cpanel/maxemailsperhour
------------
To set maximum emails per hour for a particular domain.
-------------
[root@server ~]# vi /var/cpanel/maxemails
# If you update this file you must run /scripts/build_maxemails_config
emails.com=500
domain.net=1000
[root@server ~]#/scripts/build_maxemails_config
After this command, a file automatically get created under the directory [var/cpanel/maxemailsperdomain/]with the email value you've set for those particular domains.
Just to check, type the following which should return the value that you entered in the previous file.
-------------
Subscribe to:
Posts (Atom)
