How your server should send you a mail incase you log generates a typical error meaasge
how a network device comes alive on Linux
executable file
script file or argument
environment variable file
directory
The following init activities are focussed on how a network device
comes alive and are deduced from a functioning RedHat 5.0 installation:
As the kernel boots into memory, it discovers network interfaces
such as eth and pi. The final step is to launch
/sbin/initwhich (as the man page says) is "the father of all processes".
initis responsible for initializing the whole show, much like
autoexec.bat did for DOS. Primarily, it creates processes using
the script file
/etc/inittab./etc/inittab
:has information for the various runlevels but before dropping into the
default, id:n:initdefault: (run level<n> is 3 for full multiuser
or 5 for X11) it executes the line si:sysinit:
/etc/rc.d/rc.sysinitThis is where system initialization activities occur.
/etc/rc.d/rc.sysinit
:sets env variables from
/etc/sysconfig/network if it exists,else it sets NETWORKING=no, HOSTNAME=localhost.
/sbin/swapon -a starts swappingsets and echos HOSTNAME (got it from
/etc/sysconfig/network) domainname sets the NIS domain name (or none) /sbin/fsck checks root filesystem, than mounts read only /sbin/quoaton sets user/group quotas mount mounts /proc /sbin/isapnp sets up ISA PNP devices mount remounts the / filesystem rwenters / and /proc into mtab
if kernel uses modules it does
/sbin/depmod -a -nuses
/etc/conf.modules (or modules.conf) to load sound modules /sbin/kerneld is started to handle module requests /sbin/fsck checks remaining filesystems /bin/mount -a -t nonfs.proc mounts them /sbin/quoaton -a turns on user and group quotasand cleans up after itself (/etc/~mtab etc)
/etc/sysconfig/clock is sourcedif /sbin/
hwclock exists it sets clock, else /sbin/clock(symlink to hwclock) swapon enaples swap space /etc/rc.d/rc.serial is sourced for serial ports /etc/rc.d/rc.modules?? loads modules /sbin/modprobe loads any SCSI tape module /etc/rc.d/init.d/random startsinittab then instructs init to use the files in /etc/rc.d/rc<n>.d to
change to the runlevel shown in its id:(n):initdefault line
/etc/rc,d/rc<n>.d
directories have K* or S* links which normallypoint to /etc/rc.d/init.d scripts which can Kill or Start
the appropriate processes by passing
start or stop as anargument to them. The order these scripts are called
in depends upon the number following the K's (called first) or
S's. Lower numbers are called first. The runlevel editor in
X plays with these.
Network start
For the sake of these notes, I'm now only following the networking
S10network
(start) process on my installation.It is a symlink to
/etc/rc.d/init.d/network./etc/rc.d/init.d/network
(start)executes
/etc/rc.d/init.d/functionssources
/etc/sysconfig/network (if it exists else exits)sources
/etc/sysconfig/pcmcia if it existschecks that
NETWORKING is set and /sbin/ifconfig exists (else exits)cd's into directory /etc/sysconfig/network-scripts and
searches (with
/bin/ls) for each interface(except loopback)with a config file of the form '1fcfg-xyz0', where xyz is the device
type (xyz) and 0 is the number. eg. eth0 is type eth and number 0:
(
start)runs on every interface found (in the order
that /bin/ls found them above, this might be important)
now, following imaginary interface xyz0:
run .
/ifup ifcfg-xyz0 bootsources
network-functionssets
CONFIG = ifcfg-xyz0if
./ifcfg-xyz0 exists and user not root then execs /usr/sbin/usernetctl CONFIG up to determine if user haspermission to bring thatinterface up
/etc/rc.d/init/d/functions:source_configsources the
ifcfg-xyz0 file (if exists else complains.since it found it before.)
now,
DEVICE=xyz0 IPADDRESS= a.b.c.detc.
if variable
ifcfg-xyz0:ONBOOT = 'no' then exitsruns
./ifup-xyz ifcfg-xyz0 boot if ifup-xyz exists(notice no trailing number, this is a
file which (generally by using variables
from ifcfg-xyz0) does anything special that
the interface needs, beyond what happens
below). eth doesn't happen to need one.
special handling for
ALIAS, BOOTPROTO,DHCP and SLAVE (not followed) /sbin/ifconfig xyz0 ($MACADDR for eth if set) $IPADDRESS netmask $NETMASK broadcast $BROADCAST (looks like IPADRESS, NETMASK and BROADCAST better all be valid) /sbin/route add -host $IPADDR xyz0 /sbin/route add default gw $GATEWAY xyz0 (if GATEWAY set you get a default) /sbin/update /etc/resolv.conf based on $DNSSRVS and $SEARCH if setif no
$HOSTNAME set HOSTNAME=$BOOTPHOSTNAMEruns .
/ifup-post ifcfg-xyz0source
./network-functionssources
ifcfg-xyz0run
./ifup-routes xyz0if it it exists, reads
/etc/sysconfig/static-routes static-routes has entries: $device $arguments/sbin/route
add $device $arguments for lines with device=xyz0(
ISALIAS=yes not followed)$
host > /etc/HOSTNAME (under some condition or other, I'm too tiredto figure this one out...)
/sbin/netreport notifies programs that have requested it /bin/touch /ver/lock/subsys/network (timestamp on file shows time networking up)DONE
with network start (for one interface anyway)
Spamd options
- %u -- replaced with the full name of the current user, as sent by spamc.
- %l -- replaced with the 'local part' of the current username. In other words, if the username is an email address, this is the part before the
@
sign.
- %d -- replaced with the 'domain' of the current username. In other words, if the username is an email address, this is the part after the
@
sign.
- %% -- replaced with a single percent sign (%).
- %l -- replaced with the 'local part' of the current username. In other words, if the username is an email address, this is the part before the
So for example, if /vhome/users/%u/spamassassin
is specified, and spamc sends a virtual username of jm@example.com
, the directory /vhome/users/jm@example.com/spamassassin
will be used.
The set of characters allowed in the virtual username for this path are restricted to:
A-Z a-z 0-9 - + _ . , @ =
All others will be replaced by underscores (_
).
This path must be a writable directory. It will be created if it does not already exist. If a file called user_prefs exists in this directory (note: not in a .spamassassin
subdirectory!), it will be loaded as the user's preferences. The auto-whitelist and/or Bayes databases for that user will be stored in this directory.
Note that this requires that -x is used, and cannot be combined with SQL- or LDAP-based configuration.
The pattern must expand to an absolute directory when spamd is running daemonized (-d).
apache - (13)Permission denied: access to
--
How to connect from a remote mail server to a dedicated spamassissin server
perl -MCPAN -e 'install Mail::SpamAssassin'
vi /etc/mail/spamassassin/local.cf
rewrite_header Subject *****SPAM*****
trusted_networks 216.185.xx
now to start spamd so that remote mail server can connect through
spamc ( client )
spamd -u spamd -d -i -s /var/log/spamd.log --allowed-ips 216.xx.xx.xx
-d is saemonize spamd
-i is interface
-s sys logging
see if the the interfaces and ipaddress are allowed.
[root@vps1 ~]# netstat -nap |grep tcp
tcp 0 0 0.0.0.0:783 0.0.0.0:*
LISTEN 8181/spamd.log --al
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN 23902/httpd
tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN 23849/sshd
tcp 0 0 216.185.xx.xx:783 216.xx.xx.55:4317
CLOSE_WAIT 8183/spamd child
chk the ps
ps -aux |grep spam
--
Linux: image tag
<IMG SRC="next.jpg">
</A<A HREF="http://www.pageresource.com">
<IMG SRC="next.jpg">
</A
--
how to install drupal on debian etch
<VirtualHost *>
# Basic setup
ServerAdmin webmaster@test-server.com
ServerName drupal.test-server.com
ServerAlias drupal.test-server.com
DocumentRoot /var/www/drupal/
# HTML documents, with indexing.
<Directory />
Options +Includes
</Directory>
# CGI Handling
# ScriptAlias /cgi-bin/ /home/www/www.foo.com/cgi-bin/
# <Location /cgi-bin>
# Options +ExecCGI
# </Location>
#Logfiles
ErrorLog /var/log/test-server.com/drupla/error.log
CustomLog /var/log/test-server.com/drupal/access.log combined
</VirtualHost>
--
how to install ajaxim on debian etch - web chat client
$sql_user = 'agnello';
$sql_pass = 'agnello';
$sql_host = 'localhost';
$sql_db = 'ajaxim';
<VirtualHost *>
# Basic setup
ServerAdmin webmaster@test-server.com
ServerName www.messenger.test-server.com
ServerAlias messenger.test-server.com
DocumentRoot /var/www/ajaxim/
# HTML documents, with indexing.
<Directory />
Options +Includes
</Directory>
# CGI Handling
# ScriptAlias /cgi-bin/ /home/www/www.foo.com/cgi-bin/
# <Location /cgi-bin>
# Options +ExecCGI
# </Location>
#Logfiles
ErrorLog /var/log/test-server.com/ajaxim/error.log
CustomLog /var/log/test-server.com/ajaxim/access.log combined
</VirtualHost>
MySQL database tips
mysqladmin -u root -p create joomla
how to delete user assigned for a particular database*
DELETE FROM user WHERE User='Dude3' AND Host='localhost';
how to delete permisission for particular db
DELETE FROM user WHERE User='Dude3' AND Host='localhost';
how to grant all ( permission) to a certain database for a particular user to use this DB
GRANT ALL ON joomla.* to 'joomla'@'localhost' IDENTIFIED BY '';
delete databse
DROP DATABASE dbname
--
How to install joomla on debian etch
<?php
include("config.php");
mysql_connect("$dbhost", "$dbuname", "$dbpass");
mysql_select_db("$dbname");
echo mysql_error();
phpinfo();
?>
mysqladmin -u root -pthepassword create joomla
mysql -u root -p
Enter Password:
mysql> GRANT ALL ON joomla.* to 'joomla'@'localhost' IDENTIFIED BY '';
quit;
$mosConfig_absolute_path = '/var/www/joomla'; // No trailing slash
$mosConfig_live_site = 'http://test-server.com'; // No trailing slash
$mosConfig_sitename = 'Joomla'; // Name of Joomla site
$mosConfig_shownoauth = '0'; // Display links & categories users don't have access to
$mosConfig_useractivation = '1'; // Send new registration passwords via e-mail
$mosConfig_uniquemail = '1'; // Require unique email adress for each user
$mosConfig_offline_message = 'This site is down for maintenance.<br /> Please check back again soon.';
$mosConfig_lifetime = '900'; // Frontend Session time
$mosConfig_session_life_admin = '1800'; // Admin Session Time
$mosConfig_MetaDesc = 'Joomla - the dynamic portal engine and content management system';
$mosConfig_MetaKeys = 'joomla';
$mosConfig_MetaTitle = '1';
$mosConfig_MetaAuthor = '1';
$mosConfig_debug = '0';
$mosConfig_locale = 'en_GB';
$mosConfig_offset = '0'; // Server Local Time
$mosConfig_offset_user = '0'; // User Local Time
$mosConfig_hideAuthor = '0';
$mosConfig_hideCreateDate = '0';
$mosConfig_hideModifyDate = '0';
$mosConfig_hidePdf = '0';
$mosConfig_hidePrint = '0';
$mosConfig_hideEmail = '0';
$mosConfig_enable_log_items = '0';
$mosConfig_enable_log_searches = '0';
$mosConfig_enable_stats = '0';
$mosConfig_sef = '0';
$mosConfig_vote = '0';
$mosConfig_gzip = '0';
$mosConfig_multipage_toc = '0';
$mosConfig_allowUserRegistration = '1';
$mosConfig_error_reporting = -1;
$mosConfig_error_message = 'This site is temporarily unavailable.<br />Please contact your System Administrator.';
$mosConfig_link_titles = '0';
$mosConfig_list_limit = '30';
$mosConfig_caching = '0';
$mosConfig_cachepath = '/var/www/joomla/install/cache';
$mosConfig_cachetime = '900';
$mosConfig_mailer = 'mail';
$mosConfig_mailfrom = '';
$mosConfig_fromname = '';
$mosConfig_sendmail = '/usr/sbin/sendmail';
$mosConfig_smtpauth = '0';
$mosConfig_smtpuser = '';
$mosConfig_smtppass = '';
$mosConfig_smtphost = 'localhost';
$mosConfig_back_button = '1';
$mosConfig_item_navigation = '1';
$mosConfig_secret = 'FBVtggIk5lAzEU9H'; //Change this to something more secure
$mosConfig_pagetitles = '1';
$mosConfig_readmore = '1';
$mosConfig_hits = '1';
$mosConfig_icons = '1';
$mosConfig_favicon = 'favicon.ico';
$mosConfig_fileperms = '';
$mosConfig_dirperms = '';
$mosConfig_helpurl = 'http://help.joomla.org';
$mosConfig_mbf_content='0';
$mosConfig_editor = 'tinymce';
$mosConfig_admin_expired = '1';
$mosConfig_frontend_login = '1';
$mosConfig_frontend_userparams = '1';
$mosConfig_itemid_compat = '0';
setlocale (LC_ALL, $mosConfig_locale); // Country locale
# Basic setup
ServerAdmin webmaster@test-server.com
ServerName test.debain.com
DocumentRoot /var/www/joomla/
# HTML documents, with indexing.
<Directory />
Options +Includes
</Directory>
# CGI Handling
# ScriptAlias /cgi-bin/ /home/www/www.foo.com/cgi-bin/
# <Location /cgi-bin>
# Options +ExecCGI
# </Location>
#Logfiles
ErrorLog /var/log/test-server.com/joomla/error.log
CustomLog /var/log/test-server.com/joomla/access.log combined
</VirtualHost>
restart apache 2
now try http://www.test-server.com/administrator/ -----> admin login
http://www.test-server.com -----> your site
all holds true if DNS settinga are changed ( i have used a internal DNS server )
--