Tuesday, December 30, 2008

How to find the php.ini path?

php -i | grep php.ini

Wednesday, December 24, 2008

Using suphp To Secure A Shared Server

http://blog.stuartherbert.com/php/2008/01/18/using-suphp-to-secure-a-shared-server/

Thursday, December 18, 2008

How do I set up mail forwarding for individual email addresses on a domain through Plesk?

To set up mail forwarding for individual email addresses on a domain through Plesk:

  1. Log in to Plesk as "admin"
  2. Under General, select Domains.
  3. Select the domain you want to forward mail for.
  4. Under Services, select the Mail icon.
  5. Under the Mail tab, select New Address. The Create mail name window displays.
  6. Enter the name of the email address you want to forward to.
  7. Deselect the Mailbox checkbox.
  8. Click OK.
OR

To set up forwarder for an individual email like roshith@example.com

Fisrt we need the root access. After login in the shell edit following file

vi /var/qmail/mailnames/example.com/roshith/.qmail

Insert the following line in the .qmail
|/usr/bin/php -q /home/supportpro/public_html/folder/parser/parser.php

For more details refer

http://octeth.com/kb/oempro3/mailing-list-management/bounce-tracking-module-%E2%80%93-piping-installation-instructions/

http://octeth.com/data/downloads/manuals/oemPro_Piping_Setup.pdf

After setting restart qmail

How do I create a cronjob in Plesk?

  1. Open a web browser and connect to your Plesk Control Panel located at https://ip address:8443.
  2. Login as the Administrator using the information sent to you in your setup email.
  3. Click Server from the System menu.
  4. Click Crontab under the Services section.
  5. Click Add New Task under the Tools section.
  6. Click Enable / Disable.
  7. Enter the appropriate information:
    Note: * indicates leaving the field empty
    • Minute: 0 - 59 or *
    • Hour: 0 - 23 or *
    • Day of the Month: 1 - 31 or *
    • Month: 1 - 12 or *
    • Day of the Week: 0 - 6 (0 is Sunday) or *
    • Command: enter the command that is to be executed
  8. Click Ok.

Wednesday, October 22, 2008

To get the number of files in a directory

ll | wc -l

Wednesday, October 15, 2008

cronjobs of user roshith

After login to the server to get the cronjobs of user roshith

vi /var/spool/cron/roshith

or

crontab -e -u roshith


To get cron log
---------------

tail -f /var/log/cron

cat /var/log/cron | grep iscripts

To list the last run cron jobs
----------------------------

vi /var/log/cron

Thursday, September 25, 2008

Find a file in the linux

find . -name admindemo.tar.gz

find / -name admindemo.tar.gz

Repair mysql table

root@servername [/var/lib/mysql/databasename]# myisamchk -r -S *.MYI

mysql> use ;
mysql> REPAIR TABLE `table1`,`table2`;

Monday, September 22, 2008

Change system date in Linux

set new date to 22 Sept 2008 18:00:00, type the following command as root user:

# date -s "2 OCT 2006 18:00:00"

Saturday, September 6, 2008

Restarting Apache

/etc/init.d/httpd restart

Tuesday, August 12, 2008

Editing Samba

Edit Samba
vi /etc/samba/smb.conf

Restarting Samba
/etc/init.d/smb restart

Monday, July 28, 2008

MySQL - Restoring a Single Table from a Huge mysqldump File

http://blog.tsheets.com/2008/tips-tricks/mysql-restoring-a-single-table-from-a-huge-mysqldump-file.html

Restoring a single table in Mysql

Take a backup of the table which your looking to restore using mysqldump.
mysqldump -u -p >

ex:mysqldump -usridhar -pthajes testdb usermas > /home/sridhar/mysqldump/tablebackup.txt

where we get only usermas table backup.

for restoring to another db. use
mysql < /home/sridhar/mysqldump/tablebackup.txt
ex: mysql restDB < /home/sridhar/mysqldump/tablebackup.txt .

Note: If restDB has already usermas table, pls drop before restoring.

Saturday, July 12, 2008

Starting mysql

/etc/init.d/mysqld start

Restarting a cronjob

/etc/init.d/crond restart

How to do scp

scp file.zip root@cxcxcc.com:/home/cxcxcc/public_html/data/cxcxccxc/