Total Pageviews

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

Frame forwarding

To create a file of specific size

bash-3.1$ dd if=/dev/zero of=test.png bs=1024 count=128

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';

--------------------

Sunday, January 24, 2010

To show data and time of history

export HISTTIMEFORMAT="%D %T"

Install SPF for a domain

/usr/local/cpanel/bin/spf_installer Cpanelusername

Reset database user password

Enter into mysql

----------

SET PASSWORD FOR 'brian_btball'@'localhost' = OLD_PASSWORD('604074');

FLUSH PRIVILEGES;

----------