Monthly Archives: July 2011

win2k3 server does not stream FLV videos

Windows 2003 Server does not stream FLV videos

When Flash Player movie files that stream external FLV files (Flash videos) are placed on a Microsoft Windows 2003 server and then viewed in a browser, the SWF file plays correctly, but the FLV video does not stream. These files work correctly if tested on other operating systems.

solutios is for this kind of issues

On the Windows 2003 server, open the Internet Information Services Manager.

Expand the Local Computer Server.

Right-click the local computer server and select Properties.

Select the MIME Types tab.

Click New and enter the following information:

Associated Extension box: .FLV

MIME Type box:flv-application/octet-stream

Click OK.

Restart the World Wide Web Publishing service.

diskpart command to add,delete,extend partitions

The diskpart command is a Recovery Console command used to create or delete partitions on hard drives.

You can use Diskpart to convert a basic disk to a dynamic disk. The basic disk can either be empty or contain either primary partitions or logical drives. The basic disk can be a data disk or system or boot drive. The basic disk cannot have fault-tolerant disk driver (FtDisk) sets such as stripes or mirrors.

You can use Diskpart to convert a dynamic disk to a basic disk. You must delete any dynamic volumes before the conversion process. It is recommended that you delete all volumes on the drive, and then convert the disk to basic. You must delete all dynamic data partitions. Also, never mix the basic primary and dynamic partitions on the same drive.

DISKPART> help

Microsoft DiskPart version 5.1.3565

ADD         – Add a mirror to a simple volume.
ACTIVE      – Marks the current basic partition as an active boot partition.
ASSIGN      – Assign a drive letter or mount point to the selected volume.
BREAK       – Break a mirror set.
CLEAN       – Clear the configuration information, or all information, off the
disk.
CONVERT     – Converts between different disk formats.
CREATE      – Create a volume or partition.
DELETE      – Delete an object.
DETAIL      – Provide details about an object.
EXIT        – Exit DiskPart
EXTEND      – Extend a volume.
HELP        – Prints a list of commands.
IMPORT      – Imports a disk group.
LIST        – Prints out a list of objects.
INACTIVE    – Marks the current basic partition as an inactive partition.
ONLINE      – Online a disk that is currently marked as offline.
REM         – Does nothing. Used to comment scripts.
REMOVE      – Remove a drive letter or mount point assignment.
REPAIR      – Repair a RAID-5 volume.
RESCAN      – Rescan the computer looking for disks and volumes.
RETAIN      – Place a retainer partition under a simple volume.
SELECT      – Move the focus to an object.

DISKPART> list disk

Disk ###  Status      Size     Free     Dyn  Gpt
——–  ———-  ——-  ——-  —  —
* Disk 0    Online        75 GB      0 B

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> detail disk

ST380815AS
Disk ID: D42AD42A
Type   : IDE
Bus    : 0
Target : 0
LUN ID : 0

Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
———-  —  ———–  —–  ———-  ——-  ———  ——–
Volume 1     C                NTFS   Partition     65 GB  Healthy    System
Volume 2     D   HP_RECOVERY  NTFS   Partition     10 GB  Healthy

DISKPART> select volume 1

Volume 1 is the selected volume.

DISKPART> detail volume

Disk ###  Status      Size     Free     Dyn  Gpt
——–  ———-  ——-  ——-  —  —
* Disk 0    Online        75 GB      0 B

Using Diskpart.exe to extend a data volume in Windows Server 2003 and XP

Conditions for extending a drive

The volume must be formatted with the NTFS file system.
For Basic volumes, the unallocated space for the extension must be the next contiguous space on the same disk.
For Dynamic Volumes, the unallocated space can be any empty area on any Dynamic disk on the system.
Only the extension of data volumes is supported. System or boot volumes may be blocked from being extended, and you may receive the following error:
Diskpart failed to extend the volume. Please make sure the volume is valid for extending
You cannot extend the partition if the system page file is located on the partition. Move the page file to a partition that you do not want to extend.

At a command prompt, type diskpart.exe.

Type list volume to display the existing volumes on the computer.

Type Select volume volume number where volume number is number of the volume that you want to extend.

Type extend [size=n] [disk=n] [noerr]. The following describes the parameters:
size=n
The space, in megabytes (MB), to add to the current partition. If you do not specify a size, the disk is extended to use all the next contiguous unallocated space.

disk=n
The dynamic disk on which to extend the volume. Space equal to size=n is allocated on the disk. If no disk is specified, the volume is extended on the current disk.

Type exit to exit Diskpart.exe.

microsoft silverlight

What is Silverlight?

Microsoft Silverlight is an application framework for writing and running rich internet applications.It is a new cross-browser, cross-platform implementation of the .NET Framework for building and delivering media experiences and Rich Interactive Applications(RIA) for the web and mobile  such as streaming, Multimedia gaming , Graphics and Animation.

It runs in all popular browsers,Microsoft Internet Explorer, Mozilla Firefox, Apple Safari, Opera and Chrome.

It is combination of different technolgoies into a single development platform with features and purposes similar to those of Adobe Flash.

Advantages of Silverlight using
——————————-

Highest Quality Video Experience : prepare to see some of the best quality videos , all embedded in highly graphical websites. The same research and technology that was used for VC-1, the codec that powers BluRay and HD DVD, is used by Microsoft today with its streaming media technologies.

Developers and Graphic Designers can play together! : Developers familiar with Visual Studio, Microsoft.net will be able to develop amazing Silverlight applications very quickly, and they will work on Mac’s and Windows. Developers will finally be able to strictly focus on the back end of the application core, while leaving the visuals to the Graphic Design team using the power of XAML.

Cheaper : Silverlight is now the most inexpensive way to stream video files over the internet at the best quality possible. No Licensing, all you need is IIS in Windows Server.

Support for 3rd Party Languages : Using the power of the new Dynamic Language Runtime, developers will now be able to use Ruby, Python, and EcmaScript! This means a Ruby developer can develop Silverlight applications, and leverage the .net Framework!

Cross-Platform, Cross-Browser Remote Debugging : Debug an application running on a Mac

Silverlight offers copy protection : Silverlight have the features enabling content providers complete control over their rich media content! Streaming television

Extreme Speed :There is a dramatic improvement in speed for AJAX-enabled websites that begin to use Silverlight, leveraging the Microsoft .net framework.

Cross-Platform, Cross-Browser : Finally build web applications that work on any browser, and on any operating system. At release, Silverlight will work with Mac as well as Windows!  The Mono project has also already promised support for Linux!.

NOTE!:- Moonlight is a free and open source implementation of Microsoft’s Silverlight for Linux and other Unix based operating systems, developed by the Mono Project. Like Silverlight, Moonlight is a web application framework that provides functionalities similar to those in Adobe Flash, integrating multimedia, graphics, animations and interactivity into a single runtime environment.

Codec supported
—————
Silverlight supports H.264 video, Advanced Audio Coding, Windows Media Video (WMV), Windows Media Audio (WMA) ,VC-1 video and MPEG Layer III (MP3) media content across all supported browsers without requiring Windows Media Player, the Windows Media Player ActiveX control or Windows Media browser plug-ins.

Current version: Microsoft Silverlight Version: 4.0.60531.0  and beta version is 5

Getting Started With SilverLight
——————————–
http://www.silverlight.net/

change 2k8 productkey using command

When ever you are not able to change the product key try command utility from your Server 2008

Step1 > Open the command prompt and change working directory to System32 directory

c:\ cd c:\windows\system32

Step2 > Clears and KMS entry

c:\windows\system32>slmgr.vbs -ckms

Step3 > Removes any installed product key

c:\windows\system32> slmgr.vbs -upk

Step4 > Use the new key

c:\windows\system32> slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

Step5 > Activate the key

c:\windows\system32> slmgr.vbs -ato

Step6 > check Windows Server 2008 show up as activated.

SSH Server in Windows Server 2008

SSH Server in Windows Server 2008

SSH is the secure shell,Preferrable remote connections network protocol in unix platform.It opens up a secure channel between two devices using TCP port 22. This channel can also be used for SFTP and SCP (secure FTP and secure copy, respectively).

There are two components one is a secure server and a client

Advantages of usages
———————
> Remotely access the command line of your Windows 2008 Server
> Control the Server over the network, even if  GUI interface fails
> Remotely manage Win2008 Server from any device that has a SSH Client
> Encrypted connection that securely traverse the Internet

Available Server for windows 2008
———————————
SSH.com – Free non-commercial SSH Server
SSH.com – SSH Tectia Client and Server (commercial)
OpenSSH – Free non-commercial SSH Server
Van Dyke – vShell 3.0 Server (commercial)
Free SSHd
WinSSHd (commercial)
Kpym Telnet/SSH Server
copSSH for Windows (a modified build of OpenSSH)
Sysax Multi-Server (SSH Server) for Windows

Client
——
PuTTY
Van Dyke – SecureCRT (commercial)

defragment command

In hard disks data stored randomly on the surface of the disk.de frangmentation is the process to arrange them in an order and free up space in the disk.Advantages of defragmentation is to utilize the free space and to increase the capacity of the drive as well as the speed.

Disk Defragmenter(defragmenting volumes that use the FAT, FAT32, or NTFS file system.) is a utility in Microsoft Windows designed to increase access speed by rearranging files stored on a disk to occupy contiguous storage locations.

Using methods

Open My Computer > Right-click the local disk volume that you want to defragment, and then click Properties > On the Tools tab, click Defragment Now > Click Defragment.

OR

Start Computer Management MMC (Compmgmt.msc) > Click Disk Defragmenter > Click the volume that you want to defragment > then click Defragment.

OR

Start Disk Defragmenter MMC (Dfrg.msc) > Click the volume that you want to defragment > then click Defragment.

OR

c:\defrag
Windows Disk Defragmenter
Copyright (c) 2001 Microsoft Corp. and Executive Software International, Inc.
Usage:
defrag <volume> [-a] [-f] [-v] [-?]
volume  drive letter or mount point (d: or d:\vol\mountpoint)
-a      Analyze only
-f      Force defragmentation even if free space is low
-v      Verbose output
-?      Display this help text

Eg. defrag c: -f -v

Scheduling defragmentation using command ‘at’

at 07:00 /interactive /every:M,T,W,Th,F,S,Su “defrag c: -f”
for running it every day 07 AM

at 07:00 /interactive /next:Thursdy “defrag c: -f”
defrag it on next thursday 7 AM

for more informations about using at command type at/?

AD log files to another drive

Moving AD log files to another drive

Restart the domain controller (DC).
Press F8 at the Startup menu when the system displays the list of OSs.
Select Directory Services Restore Mode.
Select the appropriate installation, if more than one exists, and then log on as an administrator at the logon prompt.
Start a command prompt (Start, Run, cmd.exe).
Start the NTDS utility, ntdsutil.exe.
At the ntdsutil prompt, type “files” as shown below:

ntdsutil: files

At the file maintenance prompt, type the following:
file maintenance: move logs to [new location for file]

To view the log files, at the file maintenance prompt, type “info”:
file maintenance: info

Type “quit” (without the quotation marks) twice to return to a C prompt.
Restart the computer in Normal mode.

user mandatory profile

Mandatory profile

A mandatory user profile is a preconfigured user profile. The user can still modify the desktop, but the changes are not saved when the user logs off. The next time the user logs on, the mandatory user profile is downloaded again. User profiles become mandatory when you rename the NTuser.dat file on the server to NTuser.man. This extension makes the user profile read-only.

How to do
———

Active Directory Users and Computers > domain > container or OU
Then User account >  Properties  > Profile tab

In Profile path, type the path information ending with the .man file name extension and full path in each user account \\Server\ShareName\UserName

How to use NFS with RSYNC

Here is a document describes what is a NFS share and how to use with RSYNC

What is NFS

Prerequisites
Procedure

NFS using with RSYNC

Network File System (NFS)

NFS defines a method of sharing files in which files residing on one or
more remote servers can be accessed on a local client system in a manner
that makes them appear as local files and directories.

Prerequisites
Server NFS daemons:                   Client NFS daemons:
Portmap                                 nlockmgr
Mountd                                  status
nfsd
rquotad
nlockmgr
status

To start the NFS services, run the startup scripts:

/etc/rc.d/init.d/portmap start
/etc/rc.d/init.d/nfs start
/etc/rc.d/init.d/nfslock start

To make sure that the RPC services are running:
/usr/sbin/rpcinfo -p

Easy method on Server: command terminal type setup and select services – NFS,NETFS,NFSLOCK,PORTMAP,YPBIND select and restart.
Easy method on Client: command terminal type setup and select services – NETFS,NFSLOCK,PORTMAP,YPBIND select and restart.

The portmap  holds the port, service number and version numbers
for each RPC service. If the portmap goes down, then all services
need to be restarted after the portmap is restarted.
Procedure and implementation.

Mounting a remote file system over NFS:

Client                         Server
mount    — RPC request —>  portmapper

mount    <– port number —   portmapper

mount    — RPC request —>   mountd

mount    <– respond ——–   mountd
I/O (Read/Write) access

Client                         Server
write()  —- I/O ————–>  nfsd

write()  <– ACK upon complete—  nfsd
A server exports a file system to the specified hosts and allows
them to mount it.

NFS Server side
Create a dir for nfs share and mount
mkdir /mnt/nfsdir
edit /etc/exports with

/mnt/nfsdir    *(rw,sync)
Type automount command to mount the volume(or you can doit manually)
mount –a   or      mount /mnt/nfsdir

Every time when you modify /etc/exports file, run
/usr/sbin/exportfs -r
or
/usr/sbin/exportfs -a
to preserve any manual exports

To verify exports, run
/usr/sbin/exportfs -v
or
/usr/sbin/showmount -e

To start NFS services at bootup time, run ntsysv,
and check-in portmap, nfs and nfslock. Alternatively,

chkconfig –level 3 portmap on
chkconfig –level 3 nfs on
chkconfig –level 3 nfslock on
NFS client side

NFS clients mount directories exported to them from the NFS servers.

To verify that the server allows you to access its RPC (including NFS)
services, run
/usr/sbin/rpcinfo -p server_name

To check what directories it exports to you, run
/usr/sbin/showmount -e server_name

To unmount a directory, you can run command
umount /mnt/nfs

Create emptydir in  /(where ever) named nfsdir
edit /etc/fstab with

Server name or IP address:/mnt/nfsdir  /nfsdir    nfs    default 0 0

Type automount command to mount the volume
mount -a

When /etc/fstab has been modified, you can run
mount –a  or    mount –r      or reboot the machine

Using with RSYNC

shows how NFS with RSYNC for accessing Wiki Images
RSYNC is using for sync datas

Install rsync or check RSYNC is running
#/usr/bin/rsync

To check it is started
#Service rsync status

Start service
#Service rsync start

Put it for initscript automaticall run when it restart
#chkconfig rsync on

Using rsync with ssh
#rsync -avz -e “ssh -i /RSA/DSAkeyfile location” remoteuser@remotehost:/remote_dir  /local_dir

File in /etc/fstab
10.1.1.12:/usr/local/wikiimages /wikiimages  nfs  defaults 0 0

Installing Lighty+php+memcache+eaccelerator on ubuntu

Installing Lighy+php+memcache+eaccelerator on ubuntu

sudo -i
apt-get update
aptitude install lighttpd
aptitude install php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
vim /etc/php5/cgi/php.ini
add this cgi.fix_pathinfo = 1
vim /etc/lighttpd/lighttpd.conf
server.modules              = (
“mod_access”,
“mod_alias”,
“mod_accesslog”,
“mod_compress”,
“mod_fastcgi”,
“mod_rewrite”,
#           “mod_redirect”,
#           “mod_evhost”,
#           “mod_usertrack”,
#           “mod_rrdtool”,
#           “mod_webdav”,
#           “mod_expire”,
#           “mod_flv_streaming”,
#           “mod_evasive”
)

and end
fastcgi.server = ( “.php” => ((
“bin-path” => “/usr/bin/php5-cgi”,
“socket” => “/tmp/php.socket”,
“max-procs” => 1,
“bin-environment” => (
“PHP_FCGI_CHILDREN” => “4”,
“PHP_FCGI_MAX_REQUESTS” => “1000”
),
)))

/etc/init.d/lighttpd restart

vim /var/www/info.php
add this
<?php
phpinfo();
?>

test it

apt-get install memcached

edit vim /etc/memcached.conf
-u www-data(ubuntu default user for running apache)

vim /etc/php5/cgi/php.ini change
;session.save_path = /var/lib/php5
;session.save_path = tcp://hostip:port
session.save_path = tcp://hostip:11211

apt-get install make
apt-get install php5-dev
pecl install memcache    and add vim /etc/php5/cgi/php.ini extension=memcache.so”

/etc/init.d/memcached start
netstat -lnp
/etc/init.d/lighttpd restart
vim /etc/php5/cgi/conf.d/memcache.ini

aptitude install build-essential
aptitude install bzip2
wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2
tar -xjvf eaccelerator-0.9.5.3.tar.bz2
cd eaccelerator-0.9.5.3
phpize
./configure
make
make install
it will show Installing shared extensions:     /usr/lib/php5/20060613+lfs/  eaccelerator.so
vim /etc/php5/cgi/php.ini and add eaccelerator.so

/etc/init.d/lighttpd restart
check http://server/info.php

https config for lighty
+++++++++++++++++++++++++++++
# mkdir /etc/lighttpd/ssl/domain.com -p
# cd /etc/lighttpd/ssl/domain.com
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# chown lighttpd:lighttpd /etc/lighttpd/ssl -R
# chmod 0600 /etc/lighttpd/ssl/domain.com
# vi /etc/lighttpd/lighttpd.conf

$SERVER[“socket”] == “192.168.0.2:443” {
server.document-root = “/var/www/”
ssl.engine = “enable”
ssl.pemfile = “/etc/lighttpd/ssl/domain.com/server.pem”
}

server.document-root       = “/var/www/”

# lighttpd -t -f /etc/lighttpd/lighttpd.conf
# /etc/init.d/lighttpd restart
# netstat -tulpn | grep :443

maxconnection setting in light.conf
server.max-keep-alive-requests = 15
server.max-keep-alive-idle = 15
server.max-read-idle     = 15
server.max-write-idle    = 15
connection.kbytes-per-second = 0
server.kbytes-per-second = 0
server.max-fds         = 512
server.max-connections = 1024

%d bloggers like this: