Named
===========
RNDC - /scripts/fixndc
adding an entry - /etc/hosts
for a hostname
Mysql
======
pass - /root/.my.cnf
conf /etc/my.cnf
repair all the databases == mysqlcheck --user=xteenage --password=20Doll --all-databases --auto-repair
with the user as root
check the status = mysqladmin ver -i5 processlist status
Make sure the permission of tmp is 777
-------------------
050929 18:13:05 mysqld started
050929 18:13:05 Warning: Asked for 196608 thread stack, but got 126976
050929 18:13:05 InnoDB: Started
050929 18:13:05 /usr/sbin/mysqld: Can't open file: 'user.MYI'. (errno: 145)
050929 18:13:05 Fatal error: Can't open privilege tables: Can't open file: 'user.MYI'. (errno: 145)
050929 18:13:05 Aborting
Solution: run myisamchk on the databases *.myi
http://dev.mysql.com/doc/mysql/en/repair.html
$db = mysql_connect('localhost', 'mysql_user', 'mysql_pass');?
Checking MyISAM file: user.MYI
Data records: 1076 Deleted blocks: 15
myisamchk: warning: Table is marked as crashed
myisamchk: warning: 1 client is using or hasn't closed the table properly
- check file-size
- check record delete-chain
myisamchk: error: Record at pos: 36560 is not remove-marked
myisamchk: error: record delete-link-chain corrupted
- check key delete-chain
- check index reference
- check data record references index: 1
myisamchk: error: Can't read key from filepos: 32768
- check record links
myisamchk: error: Record-count is not ok; is 1077 Should be: 1076
myisamchk: warning: Found 880 deleted space. Should be 988
myisamchk: warning: Found 13 deleted blocks Should be: 15
MyISAM-table 'user.MYI' is corrupted
Fix it using switch "-r" or "-o"
---------------------
ftp
====
/scripts/ftpup
/var/log/messages
/usr/local/apache/domlogs/ftp.domain name
File permissions related to umask in conf which causes the files to have a said permission
RPM
=====
install - rpm -ivh
upgrade - rpm -Uvh
To check rpm modules
=====================
rpm -qa
chatattr -i /var/lib/rpm
If corrupted - rm -rf /var/lib/rpm/_db*
Eximstats
===================
Bin - /usr/local/cpanel/bin/eximstats
Awstats
=======
to enable for user change in home /username/tmp/awstats
Link creation
==================
ln -s target source
mail
=======
/var/log/exim_mainlog
/etc/exim_conf
/etc/valiases - redirection
/etc/vfilters - All accounts upon cating which gives the filter enabled
/var/spool/exim/input - Mail queue
/var/log/mailmon.log - a software that gives much info on the mails send to n fro server..
: can get it sorted on particular user..
: easy to find spammers
: paid softwar
/var/log/mailmon.junk : to view blocked mails
MX entry- once added check in local domain for no entry and confirm is present inremote domain
check for entry in local domains undrer the domain name
Check for entries in /etc/valises and if not please enter he user name
Squirrel mail not working fatal error- If no create it by the following command
========
touch /var/cpanel/usecpphp
If the file is exist, run the following commands,
cp -p /usr/local/cpanel/base/3rdparty/squirrelmail/config/config_default.php /usr/local/cpanel/base/3rdparty/squirrelmail/conf
ig/config.php
I hope this will solve your problem. If problem exists run the following commands.
/scripts/updatenow
/scripts/makecpphp
mail size option - (location) php.ini
550 Administrative prohibition - Verify the existance of email senders uncheck the option in the whm
retry time not reached for any host = rfc1413_query_timeout = 2s(exim.conf) increase may be an option
host lookup did not complete = check /etc/resolve.conf
===
There was a problem logging onto your mail server. Your Password was rejected. Account: 'user@domain.com', Server: 'Server', P
rotocol: POP3, Server Response: '-ERR The requested item could not be found.', Port: 110, Secure(SSL): No, Server Error: 0x800
CCC90, Error Number: 0x800CCC92
Tweak settings = Tweak (Include a list of Pop before SMTP senders in the X-PopBeforeSMTP header when relaying mail. (exim 4.34
-30+ required)
http://support.microsoft.com/default.aspx?scid=kb;en-us;315963
===
remote host address is the local host
lowest numbered MX record points to local host - /etc/localdomains
Email forging using : http://www.ez-web-hosting.com/support/sp-knowledgebase-questiondetails-283.htm
421 Unexpected failure error = check disk usage on /var parition
===============================================================================================================
Apache
========
Access - /usr/local/apache/logs/access_logs
Error - /usr/local/apache/logs/error_log
Domain - /usr/local/apache/domlogs/domainname
Handlers - add extensions to the label Addhandler
Restart problems- log files size exceeded delete
ipcs > ipsc.txt
cat ipsc.txt | awk '{ print$2 } ' > ips1.txt
for i in `cat ips1.txt` ; do ipcrm -s $i ;done
checks apace syntax=/usr/local/apache/bin/httpd -t
site not working = /etc/rc.d/init.d/ipaliases retart = since the ip being listed must be down
Secure - /var/logs/secure
To increase - in httpd.conf option for max clients
the connections
chmod the ./ and ../ in the folder is the error - (13)Permission denied: access to /403.shtml failed because search permission
s are missing on a component of the path
Modsecurity issue >>
=====================
Check the audit_log files for pattern matches and then remove it from the modsecurity.conf file
======================================================================================================
Php
============
Backup - httpd.conf
/usr/local/apache/libexec/libphp.so
location pf phphinfo - /usr/local/apache/htdocs
Phpinfo - <?
phpinfo();
?>
open_basedir restriction in effect - change the safemod off in the php.ini link found in phpinfo
Fatal error: Call to undefined function: pg_connect() in --- recompile apache with the postgres module in php module
To parse the html pages as php add the following to the .htaccess file and then rename the .html to .php
AddType application/x-httpd-php .php .php3 .phtml .html
link : http://www.elise.com/mt/archives/000886converting_to_php.php
=====
Error encountered = php: error while loading shared libraries: libmysqlclient.so.12: cannot open shared object file: No such f
ile or directory
Upgrading mysql to a new version, then the php searches for the file libmysqlclient.so.12 or correspoding version.What is requ
ired to create link from libmysqlclient.so.12 to /usr/lib/libmysqlclient.so which is the library file or copying the /usr/lib/
libmysqlclient.so file to libmysqlclient.so.12 will do it
====
PHP eaccelerator
----------------
http://www.vbulletin.com/forum/showthread.php?t=75878
php errors= check modules on both the servers, and then recompile based on the modules or try copying the php.ini
PHP Fatal error: Call to undefined function: imagettftext() in / = try compiling with Freetype
=============================================================================
Perl
=========
shell - cpan
Status check fot harddisk
==========================
/scripts/smartcheck
tmp show -64z -- umount tmp and then run fsck -f partition and then mount the partition
l/tool
named
======
if the named dile doesn't exist - /usr/sbin/named -u named -c /etc/named.conf
If named seems to have restaring difficulties comment this int he named.conf
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
If the ip doesn;t seems to be listened on the server .......add the server Ip to the starting entry of named file after local
host
Load
=====
/proc/loadaveg
Harddisk check
================
/scripts/smartcheck/
linux Distribution
===================
/etc/redhat-release
mysql
========
can't connect to mysql --error regarding the change in version
error 1045 - change the password through WHM
Solution (not a perfect solution)
type: killall -9 mysqld
type: cd /etc/rc.d/init.d
type: safe_mysqld --skip-grant-tables &
type: exit
type: mysqladmin status << need to be using WHM for this command
my.cnf-allow access to a site
eg: mysqldump -c -a -v --add-drop-table -u hospede -p hospede_admin > /home/hospede/public_html/hospede_admin.sql
and change ownership to export a file
ssh
===
/etc/ssh/sshd_config
Check
======
last
/var/log/cron
Kernel compilation
==========================
http://www.webhostingtalk.com/showthread.php?s=&threadid=232664&highlight=compiling
http://kernel.org/pub/linux/kernel/v2.6/
File System protection- select all
Kernel Auditing-
-Resource logging
-(Un)mount logging
-Fork failure logging
-Time change logging
Executable Protection-
- dmesg restriction
- Randomized PIDs
Network Protection-
-Larger entropy pools
-Randomized Ip IDs
-Randomized TCP source ports
Sysctl Support
Logging Option- 3 sec
Speeds
---------
hdaparm -d1 disk-DMA
hdaparm -t disk -checks
crontab
============
syntax :-
A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval.
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (1 - 7) (monday = 1)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
* Indicates all possible values as in braces for that column.
Couldn't spawn child process
=============================
check for the semid using = ipcs
then kill the process under nobody = ipcrm -s id
We apologize for the delay. In order to prevent the public having access to the full directory you need to turn off the direc
tory listing. For this modify the file.
/usr/local/apache/conf/access.conf
This file contains an options directive. You need to add a ' - ' symbol infront of the indexes parameter.
Hope this helps. Please let us know if you want us to do this for you in case of any difficulty. We are always happy to help y
ou
=====================================
To disable root access
=================
to disable direct root access.
For this add an entry 'PermitRootLogin no' in the file /etc/ssh/sshd_config and restart your SSH daemon using the command '/
etc/init.d/sshd restart' .
========================================
On telnet if the results re not found , please check with restarting the Ipalaises
service ipaliases restart - mayeb done and clients complain on webiste not found and mail not working
======================================
zcat: stdout: Broken pipe : http://forums.cpanel.net/showthread.php?t=30468&highlight=zcat%3A+stdout%3A+Broken+pipe
Awstats---- http://forum.voxtreme.com/showthread.php?t=8206
Error: LogFile parameter is not defined in config/domain file Setup
====================================
Eximstats fail: http://forum.ev1servers.net/showthread.php?t=54893
Exim - remove mailtrap , /etc/eximmailtrap,
WHM >> Remove the option from exim conf >> Verify the existence of mail
2005-09-20 00:20:15 1EHZc7-0005pZ-GH <= test@nirmal.ca U=nirmalf P=local S=678 id=1605.61.11.46.224.1127190015.squirrel@nirmal
.ca
2005-09-20 00:20:15 1EHZc7-0005pZ-GH failed to expand condition "${perl{checkspam}}" for lookuphost router: Gid 32058 is not p
ermitted to relay mail at /etc/exim.pl line 365.
2005-09-20 00:20:15 1EHZc7-0005pZ-GH failed to expand condition "${perl{checkspam}}" for literal router: Gid 32058 is not perm
itted to relay mail at /etc/exim.pl line 365.
2005-09-20 00:20:15 1EHZc7-0005pZ-GH ** test007@linuxmail.org R=fail_remote_domains: unrouteable mail domain "linuxmail.org"
2005-09-20 00:20:15 1EHZc7-0005pe-I6 <= <> R=1EHZc7-0005pZ-GH U=mailnull P=local S=1534
2005-09-20 00:20:15 1EHZc7-0005pZ-GH Completed
======================================
Test download
10MB = http://test.tampabay.rr.com/http.10m.sav
50MB =http://test.tampabay.rr.com/http.50m.sav
==================================================
.htaccess
==========
http://altlab.com/htaccess_tutorial.html=
================
Clamav
=====
Inastall throught WHM , addon modules
========================
Frontpage
========
http://www.e-gineer.com/v1/instructions/install-frontpage-extensions-for-apache-on-linux.htm
================
Nameserver - /etc/nameserverips
======
Log for last entries
===============
/var/log/wtmp
======================
=============================
DUMPING AND RESTORING
To copy a db
mysqldump dbname > dbname.sql
To drop a database
mysqladmin drop dbname
To create a database
mysqladmin create dbname
To restore a backup
mysql dbname < /path/to/dbname.sql
To dump a table only
mysqldump dbname tablename > /path/to/file.txt
msqldump --create-options --compatible=mysql40 databasename > database_backup_file.sql
============================
chkconfig --list = Helps to set which process to start in which mode in start up and then to start the service we use
"chkconfig servicename on/off
/etc/inittabb = Helps to decide which mode to choose
====================================
Link for server security along with the installation : http://www.webhostgear.com/
SPF
==========
Link = http://www.linuxjournal.com/article/7327
========================
stats
=====
Error: LogFile parameter is not defined in config/domain file
Setup ('/home/fletcher/tmp/awstats/awstats.fletcherbmw.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Check disk usage for the user
=========================
Postgres
==========
Cannot create database
-------------------------------------
Modify /var/lib/pgsql/data/pg_hba.conf from 'md5' to 'trust'
It should contain the following:
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
Restart postgres:
# service postgresql restart
=================
Editor error- pico
====================
crontab -e
/bin/sh: line 1: pico: command not found
crontab: "pico" exited with status 127
root@server01 [~]# EDITOR=vi
root@server01 [~]# export EDITOR
root@server01 [~]# VISUAL=vi
root@server01 [~]# export VISUAL
Install pico = http://www.dedicated-resources.com/guide/22/How-To-Install-PICO-Editor.html
========================================
fortesting perl script
put cgihelper.pl in cgi-bin
http://domainname/cgi-bin/cgihelper.pl
testing a scripts code error
perl -w scriptname.pl