Tuesday, November 23, 2010

Windows Server - grant the Logon as a batch job privilege

Question: How do I grant the Logon as a batch job privilege to my user account?
Answer: On Windows, this privilege is granted through the Local or Domain Security Policy. To do this using the Local Security Policy, follow these steps.
  1. In the Control Panel, open Administrative Tools, then Local Security Policy.
  2. Beneath Security Settings, open Local Policies and highlight User Rights Assignment.
  3. Locate Log on as a batch job. Open the properties and add any users that need this right.
  4. When finished, save your changes and close the Local Security Settings window.
Your changes should take effect immediately. To make changes to the Domain Security Policy, on a domain controller, use the Domain Security Policy utility in the Control Panel.

Source: http://www.brooksnet.com/faq/117-02.html

Friday, November 12, 2010

Sendmail

resend deferred mail immediately
sendmail -OTimeout.hoststatus=0m -q -v

Monday, September 20, 2010

Linux - Ksplice Uptrack Installation

Installing Ksplice Uptrack on CentOS

Please use the same access key on all of your systems. If you don't remember it, you can get it from the web interface.

Download the Ksplice Uptrack repository installation RPM package and run the following commands as root:
wget https://www.ksplice.com/yum/uptrack/centos/ksplice-uptrack-release.noarch.rpm 
rpm -i ksplice-uptrack-release.noarch.rpm
yum -y install uptrack 

Edit /etc/uptrack/uptrack.conf and insert your access key.

Please use the same access key for all of your systems. Once you've done that, please run the following command as root to bring your kernel up to date:
uptrack-upgrade -y

Wednesday, September 8, 2010

WEB Admin

Site to test page compression
http://www.gidnetwork.com/tools/gzip-test.php

Tuesday, September 7, 2010

Windows issues

Windows Keep Check Disk at startup

"fsutil dirty query d: ". This queries the drive, and more than likely it will tell you that it is dirty.

"CHKNTFS /X D:". The X tells Windows to NOT check that particular drive on the next reboot. At this time, manually reboot your computer, it should not do a Chkdsk and take you directly to Windows.

Once Windows has fully loaded, bring up another CMD prompt and type and now you want to do a Chkdsk manually by typing "Chkdsk /f /r d:".
This should take you through 5 stages of the scan and will unset that dirty bit.

Finally, type "fsutil dirty query d:" and Windows will confirm that the dirty bit is not set on that drive.

source: http://forums.cnet.com/5208-10149_102-0.html?threadID=113089

Installing Wordpress

Download wordpress from its website

Install MYsql and create a database

$ mysql -u adminusername -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql> CREATE DATABASE databasename;
Query OK, 1 row affected (0.00 sec)
 
mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname"
    -> IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
  
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

mysql> EXIT
Bye
$ 

DNS

#Refresh Interval

The refresh interval is the number of seconds at which the secondary domain name
server will try to synchronize its records with the primary domain name server.

Varnish - HTTP Accelerator

Start Varnish
varnishd -f /usr/local/etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000

Linux Command

#Remove Entire Directory
rm -rf varnish-2.1.3/


#Secure Copy

scp /usr/local/bin/varnishsizes root@192.168.130.109:/usr/local/bin/

/usr/local/bin/varnishsizes => local file
/usr/local/bin/             => destination file

Display number of CPUs
cat /proc/cpuinfo | grep processor | wc -l