Leaderboard (728 x 90)

Thursday, August 26, 2010

Changing your default language for redhat-based Linux Distribution

Gnome GUI
method 1. Go to System => Administration => Language then change your default language.
method 2. Open terminal then run system-config-language then change your default language.


Manually Edit Configuration
1. cd /etc/sysconfig

Make backup copy of your language setting file
2. cp i18n i18n.bak

Edit language setting file to allow english as default
3. vi i18n
5. Edit the file to include these lines as the first three lines of the file:
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
SUPPORTED="en_US.UTF-8:en_US:en"

6. Save the file and restart system. If you can not restart the system you need to have permission to restart init.d

Thursday, August 5, 2010

Where is default configuration path for spamassassin?

The default rules directory is /usr/share/spamassassin
The site rules directory is /etc/mail/spamassassin
The updated rules directory is /var/lib/spamassassin

Clarification of changes on "allow-recursion" and "allow-query-cache" in BIND 9.4.1

Everyone upgrading from older BIND versions to BIND 9.4.1 or newer should check if this change has effects on the nameserver:

There has been some confusion surrounding the changes to the "allow-recursion" and "allow-query-cache" options made with BIND 9.4.1-P1.

This document will attempt to clarify the change and the impact that it makes on BIND servers.

In BIND 9.3, there was no segregation of queries between cache and authoritative data.

The release of BIND 9.4 added fine-grained differentiation between queries against authoritative data ("allow-query") and cached data ("allow-query-cache"). This allows more precise control, particularly if you do not want your clients to use any cached data, for example, in an authoritative-only nameserver.

Prior to the release of BIND 9.4.1-P1, the default action of "allow-recursion" and "allow-query-cache" was to permit the query. The P1 patch to BIND 9.4.1 caused two changes in this behavior:

1) If not explicitly set, the ACLs for "allow-query-cache" and "allow-recursion" were set to "localnets; localhost;".

2) If either "allow-query-cache" or "allow-recursion" was set, the other would be set the same value.

Upgrading from the BIND 9.3 branch to BIND 9.4.1-P1 will significantly restrict those servers that were previously recursive servers for more than "localhost; localnets;" unless configuration changes are made.

To retain the behavior prior to BIND 9.4.1-P1, the following entries should be created in your named.conf file:
Code:

options {
...
allow-recursion { any; };
allow-query { any; };
allow-query-cache { any; };
...
};

We strongly advise against this configuration because clients spoofing queries can use your servers to launch distributed denial-of-service attacks.

The recommended method is to create ACLs that match hosts that should be allowed access to cache and recursion on the servers. For example, if you wanted to provided recursion and access to the cache to clients you trusted, you could list them in an ACL such as the following:
Code:

acl "trusted" {
192.168.0.0/16;
10.153.154.0/24;
localhost;
localnets;
};
options {
...
allow-query { any; };
allow-recursion { trusted; };
allow-query-cache { trusted; };
...
};

This example ACL includes 192.168.0.0/16 and 10.153.154.0/24 as sample networks that would require access. You must replace these sample networks with networks that correctly reflect your environment. This will allow anyone to query your server for authoritative data, but only those hosts within the "trusted" ACL access to your cache and recursion.

Wednesday, August 4, 2010

How to list running application pool in IIS 6.0?

You can use the command-line script iisapp.vbs, which is stored in systemroot\system32, to view any worker processes that are currently running. This command is often used for troubleshooting.

The computer issuing the command must be running Windows XP or a member of the Windows Server 2003 family. The computer that the command affects must be running a member of the Windows Server 2003 family with IIS 6.0.

!!! Important

You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /User:MyComputer\Administrator cmd to open a command window with administrator rights and then type cscript.exeScriptName (include the script's full path and any parameters).

This topic includes the following information:

Syntax: The order in which you must type a command and any arguments and options that follow it.

Parameters: The values that are given to variables in the command.

Examples: Sample code and an explanation of the results.

Syntax

iisapp [/a AppPoolName | /p PID]

Parameters

/aAppPoolName

Optional. Specifies the name of a particular application pool.

/pPID

Optional. Specifies an application pool by its ID number.

Examples

Example 1:

The following command displays all of the application pools that are running on the local computer:

iisapp

In response, iisapp displays all of the currently running applications, identifying each application pool by its process ID (PID) and application pool ID (AppPoolID). Iisapp omits all of the optional parameters and accepts the default values.

W3wp.exe PID: 2232 AppPoolID: DefaultAppPool

W3wp.exe PID: 2608 AppPoolID: MyAppPool

Example 2:

Use the following command to view a specific application by entering its PID:

iisapp /p 2608

In response, iisapp displays the specified application.

W3wp.exe PID: 2608 AppPoolID: MyAppPool

Tuesday, August 3, 2010

how to upgrade CPAN module for perl

run these command

perl -MCPAN -e 'shell'

then enter these command
# install Bundle::CPAN
# reload cpan

how to install perl module

method 1:

run command

perl -MCPAN -e 'install Module::Name'

or run

perl -MCPAN -e 'shell'

then enter these command
# install Module::Name

Module::Name is name of module which need to install

method 2:

download module source code you need to install

- extract source code archive (untar and unzip)
- change directory to source code path
- run these commands.
# perl MakeFile.PL
# make
# make test
# make install

Prereq 'v0.002.1' for 'Net::DNS::Resolver::Programmable' is not supported by Module::Build::Compat

Problem:

When I run

perl -MCPAN -e 'install Mail::SPF'

I get this

CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Sat, 06 Feb 2010 07:43:02 GMT
Running install for module Mail::SPF
Running make for J/JM/JMEHNLE/mail-spf/Mail-SPF-v2.007.tar.gz
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok
Checksum for /root/.cpan/sources/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v2.007.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Mail-SPF-v2.007
Mail-SPF-v2.007/MANIFEST
Mail-SPF-v2.007/TODO
Mail-SPF-v2.007/CHANGES
Mail-SPF-v2.007/META.yml
Mail-SPF-v2.007/MANIFEST.SKIP
Mail-SPF-v2.007/INSTALL
Mail-SPF-v2.007/README
Mail-SPF-v2.007/Makefile.PL
Mail-SPF-v2.007/LICENSE
Mail-SPF-v2.007/Build.PL
Mail-SPF-v2.007/SIGNATURE
Mail-SPF-v2.007/lib
Mail-SPF-v2.007/lib/Mail
Mail-SPF-v2.007/lib/Mail/SPF.pm
Mail-SPF-v2.007/lib/Mail/SPF
Mail-SPF-v2.007/lib/Mail/SPF/Server.pm
Mail-SPF-v2.007/lib/Mail/SPF/Util.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mod.pm
Mail-SPF-v2.007/lib/Mail/SPF/Result.pm
Mail-SPF-v2.007/lib/Mail/SPF/Request.pm
Mail-SPF-v2.007/lib/Mail/SPF/MacroString.pm
Mail-SPF-v2.007/lib/Mail/SPF/SenderIPAddrMech.pm
Mail-SPF-v2.007/lib/Mail/SPF/Exception.pm
Mail-SPF-v2.007/lib/Mail/SPF/Base.pm
Mail-SPF-v2.007/lib/Mail/SPF/Term.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mech.pm
Mail-SPF-v2.007/lib/Mail/SPF/Record.pm
Mail-SPF-v2.007/lib/Mail/SPF/v1
Mail-SPF-v2.007/lib/Mail/SPF/v1/Record.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mod
Mail-SPF-v2.007/lib/Mail/SPF/Mod/Redirect.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mod/Exp.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mech
Mail-SPF-v2.007/lib/Mail/SPF/Mech/PTR.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mech/A.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mech/All.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mech/IP6.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mech/MX.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mech/Include.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mech/Exists.pm
Mail-SPF-v2.007/lib/Mail/SPF/Mech/IP4.pm
Mail-SPF-v2.007/lib/Mail/SPF/v2
Mail-SPF-v2.007/lib/Mail/SPF/v2/Record.pm
Mail-SPF-v2.007/debian
Mail-SPF-v2.007/debian/libmail-spf-perl.install
Mail-SPF-v2.007/debian/spf-tools-perl.postinst
Mail-SPF-v2.007/debian/rules
Mail-SPF-v2.007/debian/compat
Mail-SPF-v2.007/debian/changelog
Mail-SPF-v2.007/debian/watch
Mail-SPF-v2.007/debian/spf-tools-perl.prerm
Mail-SPF-v2.007/debian/copyright
Mail-SPF-v2.007/debian/spf-tools-perl.install
Mail-SPF-v2.007/debian/control
Mail-SPF-v2.007/bin
Mail-SPF-v2.007/bin/spfquery
Mail-SPF-v2.007/t
Mail-SPF-v2.007/t/Mail-SPF-Test-lib.pm
Mail-SPF-v2.007/t/90-author-pod-validation.t
Mail-SPF-v2.007/t/00.01-class-util.t
Mail-SPF-v2.007/t/10.00-rfc4408.t
Mail-SPF-v2.007/t/rfc4408-tests.yml
Mail-SPF-v2.007/t/10.01-rfc4406.t
Mail-SPF-v2.007/t/00.04-class-server.t
Mail-SPF-v2.007/t/00.05-class-macrostring.t
Mail-SPF-v2.007/t/00.00-class-misc.t
Mail-SPF-v2.007/t/00.02-class-request.t
Mail-SPF-v2.007/t/rfc4406-tests.yml
Mail-SPF-v2.007/t/00.99-class-misc.t
Mail-SPF-v2.007/t/00.03-class-result.t
Mail-SPF-v2.007/sbin
Mail-SPF-v2.007/sbin/spfd
Removing previously used /root/.cpan/build/Mail-SPF-v2.007

CPAN.pm: Going to build J/JM/JMEHNLE/mail-spf/Mail-SPF-v2.007.tar.gz

# running Build.PL
Creating new 'MYMETA.yml' with configuration results
Creating new 'Build' script for 'Mail-SPF' version 'v2.7.0'
Prereq 'v0.002.1' for 'Net::DNS::Resolver::Programmable' is not supported by Module::Build::Compat
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install

Resolution:

run this command

perl -MCPAN -e 'install Bundle::CPAN'

with successfully installed