Labels
In order to generate of users for your customer's needs, you may run the DS* set of tools that are included with the administrative tools for Windows 2003 and 2008. These built-in command line tools can grab user content based on the criteria you pass to the command. The following examples below are a few useful ones that can be redirected into a text file for viewing:
Get a User List for a Particular Customer
dsquery user -limit 1000 | dsget user -fn -ln -display -desc -pwdneverexpires -acctexpires -disabled
Get a User List of Inactive Users for a Particular Customer (Over 13 Weeks of Inactivity)
dsquery user -inactive 13 -limit 1000 | dsget user -fn -ln -display -desc -pwdneverexpires -acctexpires -disabled
Get a User List of Users Who Haven't Changed Their Passwords for a Particular Customer (Over 45 days)
dsquery user -stalepwd 45 -limit 1000 | dsget user -fn -ln -display -desc -pwdneverexpires -acctexpires -disabled
There are many more combinations that you can pull out from Active Directory. You just need to review the list by running the DS* command with a /? for the additional options.
For Active Directory, there are a few command line tools in gathering up data for objects as well creating and deleting objects. For exports and imports, you can use the following tools:
- CSVDE - command line tool that creates a CSV or similarly delimited file with existing data gathered from Active Directory
- LDIFDE - command line tool that creates a LDF file that gives more flexibility in how data is gathered from Active Directory and summarily imported back into Active Directory
Alternatively, for scripted actions as well as one-off actions that an administrator wants to perform (reporting on group membership for example), you can use the following set of commands:
- DSQUERY - Queries an object(s) for information
- DSGET - Sets operational target to the selected object
- DSADD - Adds an object to Active Directory
- DSMOVE - Moves an object from one location to another
- DSMOD - Modifies an existing Active Directory object
- DSRM - Removes an object(s) from Active Directory
For more information on how to use the command line tools above, you may go to the following link:
http://www.computerperformance.co.uk/Logon/Logon_CSVDE.htm
http://www.computerperformance.co.uk/Logon/Logon_LDIF.htm
http://www.computerperformance.co.uk/Logon/DSadd_DSmod_DSrm.htm
Ubuntu- Server to install DHCP Server
#app-get Install dhcp3-Server or sudo apt-get install isc-dhcp-server
Red hat/fedora/centos - Server to install dhcp Server
#yum install dhcp
configuration file for dhcpRedhat/fedora/centos linux DHCP configuration file
/etc/dhcp/dhcpd.conf
ubuntu linux configuration file
/etc/dhcp/dhcpd.conf
add below entires scope for dhcp-server and lease-time
default-lease-time 600;
max-lease-time 7200;
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.3 10.1.1.254;
}
subnet 192.168.0.0 netmask 255.255.0.0 {
}
configuration of host configuration
host printer {
hardware ethernet 00:16:d3:b7:8f:86;
fixed-address 10.1.1.100;
}
host web-server {
hardware ethernet 00:17:a4:c2:44:22;
fixed-address 10.1.1.200;
}
configuration of dhcp-server relay agent
# apt-get install isc-dhcp-relay
Then create a configuration file /etc/default/isc-dhcp-relay with two lines:
SERVERS="192.168.5.5"
INTERFACES="eth1"
Bootp Support for pxe Server
host bootp {
hardware ethernet 00:00:2e:55:12:09;
fixed-address Server address;
filename "/path/to/tftpboot/bootp.boot";
}
how to enable options in dhcp
add the line that
options 60 or so on on dhcp conf file
Network Configuration can be done by couple of ways
use the following commands
Ifconfig : display the network Setting
Ifconfig –a : display all the adaptors/settings/configurations
ifconfig eth0 down ; power down the Ethernet adaptor eth0
ifconfig eth0 up : power up the Ethernet adaptor eth0
ifconfig eth0 192.168.1.1 : set eth0 adaptor to ip address to 192.168.1.1
ifconfig eth0 netmask 255.255.255.0 : set eth0 adaptor to subnet mask to 255.255.255.0
ifconfig eth0 broadcast 192.168.2.255 :Change Broadcast address of the interface eth0.
ifconfig eth0 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255 : Assign ip-address, net mask and broadcast at the same time to interface eht0.
to perform things in advance configuration you can also use Network Configuration File
Redhat linux : vi /etc/sysconfig/network-scripts/ifcfg-eth0
Ubuntu : sudo vi /etc/network/interfaces
Entries needed to be like this
DEVICE=eth0
BOOTPROTO=STATIC
IPADDR=192.168.0.5
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
ONBOOT=yes
Service Restart Need
Redhat
$ sudo /etc/init.d/network stop
$ sudo /etc/init.d/network start
ubuntu
# sudo /etc/init.d/networking restart
# service NetworkManager stop
3 chkconfig NetworkManager off
Confirmation
###### /sbin/chkconfig network
for binding two different network adaptor as teaming > create Virtual adaptor and make two or more physical adaptor as slave’s and edit the following files like below
#/etc/modprobe.conf
#added for bonding
alias bond0 bonding mode=5 miimon=100
#/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
#/etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
#/etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.0.1
NETMASK=255.255.255.0
USERCTL=no
Note : the mode for the load balance is different on your infrastructure- please check for yourself accordingly
Mode=0 : round robin policy
mode=1 : active -backup policy
mode=2 : balance-xor depedingin on traffic of destination mac address
mode=3 : broadcast polocy
mode=4 : dynamic link aggregation
Mode=5 : load balanced on transmiting package mode
Mode=6 : adaptive load balancing
____________________________________________________________________________________________________________________________________________________
Ubuntu: https://help.ubuntu.com/community/NetworkConfigurationCommandLine/Automatic
Redhat :http://unix.stackexchange.com/questions/52474/setup-static-ip-in-redhat-6
____________________________________________________________________________________________________________________________________________________
# Import the NetAdapter module. This step is provided for clarity. It is not needed due to the new module autoloading feature in Windows PowerShell 3.0
Import-Module NetAdapter
# Retrieve the network adapter that you want to configure.
$netadapter = Get-NetAdapter -Name Ethernet
# Disable DHCP.
$netadapter | Set-NetIPInterface -DHCP Disabled
# Configure the IP address and default gateway.
$netadapter | New-NetIPAddress -AddressFamily IPv4 -IPAddress 10.0.1.100 -PrefixLength 24 -Type Unicast -DefaultGateway 10.0.1.1
# Configure the DNS client server IP addresses.
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses 10.0.1.10
Linux
System Details: This installation has been done on following environment. This can be replicated on RedHat server as well.
OS: CentOS release 5.5
Perl: Perl, v5.8.8
Web Server: Apache/2.2.3 (installed in "/etc/httpd")
1. Download Awstats:
Download the awstats tarball and untar the file into /usr/local/ directory (you may have your own choice).
Steps:
# cd /usr/local
# wget http://prdownloads.sourceforge.net/awstats/awstats-7.0.tar.gz
# tar -xzvf awstats-7.0.tar.gz
# mv awstats-7.0.tar.gz /tmp
# mv awstats-7.0/ awstats
# cd awstats
2. Configure Awstats:
To configure the awstats we need to execute the "awstats_configure.pl" script from /usr/local/awstats/tools directory. It will ask following questions:
Config file path ('none' to skip web server setup):
>/etc/httpd/conf/httpd.conf (your apache configuration file path).
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ? y (if you want to create a new config file for a http VirtualHost(for your URL))
Your web site, virtual server or profile name:
>myurl (Use your website name as profile name).
In which directory do you plan to store your config file(s) ?
Default: /etc/awstats
Directory path to store config file(s) (Enter for default): (I'm keeping this default)
That's it for initial setup. Now we need to configure the config file, which was created during above setup( in /etc/awstats directory).
Press the Entre twice now. It will show you the following important information.
You can do it manually by adding the following command to your cron:
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=>
Or if you have several config files and prefer having only one command:
/usr/local/awstats/tools/awstats_updateall.pl now
A SIMPLE config file has been created: /etc/awstats/awstats.myurl.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for '>' with command:
The "awstats.myurl.conf" if the configuration file which can be used to configure to enable/disable the required parameters in awstats for the particular URL. The default option would be enabled and configured automatically. Please check following parameters:
DirData="/var/lib/awstats"
LogFile="/var/log/httpd/access.log"
Configuration changes made in apache config "/etc/httpd/conf/httpd.conf"
#. Directives to allow use of AWStats as a CGI
Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"
#. This is to permit URL access to scripts/files in AWStats directory.
<Directory "/usr/local/awstats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Create the data directory mentioned above.
#mkdir /var/log/awstats
#chown -R apache:apache /var/log/awstats
#/etc/init.d/httpd restart
Now access the following URL to access the awstats report.
http://www.yourdomain.com/awstats/awstats.pl?config=myurl
Thanks for reading this ![]()
Windows (in progress)
System Details: This installation has been done on following environment.
OS: Windows 2008 64 bit R2 ENT
Perl(ActieState 64 bit): Perl v5.16
Web Server (64 bit): Apache/2.4.9 trusted safe(installed in "E:/apache24")
Compiler (64 bit): Visual C++ 2010 SP1
PHP (64 bit):5.3
Awstats: 7.3
Jawstats: 0.7 (beta)
C:\Windows\system32>E:\awstats-7.3\tools\awstats_configure.pl
C:\Windows\system32>E:\awstats-7.3\tools\awstats_configure.pl
----- AWStats awstats_configure 1.0 (build 20140126) (c) Laurent Destailleur ---
--
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
- You are not an administrator user,
- You want to analyze downloaded log files without web server,
- You want to analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all possible ways to use AWStats...
Read the AWStats documentation (docs/index.html).
-----> Running OS detected: Windows
-----> Check for web server install
awstats_configure did not find your Apache web main runtime.
Please, enter full directory path of your Apache web server or
'none' to skip this step if you don't have local web server or
don't have permission to change its setup.
Example: c:\Program files\apache group\apache
Apache Web server path ('none' to skip):
> E:\Apache24
Now, enter full config file path of your Web server.
Example: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conf
Example: c:\Program files\apache group\apache\conf\httpd.conf
Config file path ('none' to skip web server setup):
> E:\Apache24\conf\httpd.conf
-----> Check and complete web server config file 'E:\Apache24\conf\httpd.conf'
Add 'Alias /awstatsclasses "E:/awstats-7.3/wwwroot/classes/"'
Add 'Alias /awstatscss "E:/awstats-7.3/wwwroot/css/"'
Add 'Alias /awstatsicons "E:/awstats-7.3/wwwroot/icon/"'
Add 'ScriptAlias /awstats/ "E:/awstats-7.3/wwwroot/cgi-bin/"'
Add '<Directory>' directive
AWStats directives added to Apache config file.
-----> Update model config file 'E:/awstats-7.3\wwwroot\cgi-bin\awstats.model.co
nf'
File awstats.model.conf updated.
-----> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ? y
-----> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:
> mytestsite.com
-----> Create config file 'E:/awstats-7.3\wwwroot\cgi-bin\awstats.mytestsite.
com.conf'
Config file E:/awstats-7.3\wwwroot\cgi-bin\awstats.mytestsite.conf creat
ed.
-----> Add update process inside a scheduler
Sorry, for Windows users, if you want to have statistics to be
updated on a regular basis, you have to add the update process
in a scheduler task manually (See AWStats docs/index.html).
Press ENTER to continue...
A SIMPLE config file has been created: E:/awstats-7.3\wwwroot\cgi-bin\awstats.mytestsite.com.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'mytestsite.com' with comman
d:
> perl awstats.pl -update -config=mytestsite.com
You can also read your statistics for 'mytestsite.com' with URL:
> http://localhost/awstats/awstats.pl?config=mytestsite.com
Press ENTER to finish...
Ever need to create a more detailed log for Windows 2008 failover clustering? Well, it became much easier for you. Just run the following command and then go into the directory C:\Windows\Cluster\Reports to get the cluster.log file:
cluster log /g /level:5
For more information, please read the link below:
http://blogs.msdn.com/b/clustering/archive/2008/09/24/8962934.aspx
his applies to all the version of tomcat and this feature enabled for NimsoftSD and helped a lot to improve their application performance.
What is GZIP?
It is a compression format created by Jean-Loup Gailly and Mark Adler. Version 0.1 was first publicly released on October 31, 1992.
GZIP is based on the DEFLATE algorithm, which is a combination of LZ77 and Huffman coding. DEFLATE was intended as a replacement for LZW and other patent-encumbered data compression algorithms which, at the time, limited the usability of compress and other popular archives.
How does it helps in improving performance of my web page?
Modern browser like Internet Explorer, Firefox, Opera etc supports gzip compressed content. These browsers are capable of uncompressing gzip data into plain text. Servers like Apache, Tomcat, JBoss etc supports gzip compression too. Hence if gzip is enabled in such servers, the response if first compressed and then send to client. Hence this increase performance by many folds.
How to enable GZIP in my tomcat server?
Here is how to enable GZIP compression on Tomcat: edit file /conf/server.xml and add to the HTTP Connector configuration something like this:
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"
An example of a HTTP Connector configuration with compression enabled could be:
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"/>
The short answer is "yes" however its not recommended nor supported. If you choose to perform this option, you have to go in and just like any standalone Windows box first unjoin it and then rejoin the cluster nodes to the Active Directory domain you are looking for.