Thursday, December 30, 2010

MS Exchange 2010 windows roles

PowerShell

On the Start menu, navigate to All Programs > Accessories > Windows PowerShell. Open an elevated Windows PowerShell console, and run the following command.
Import-Module ServerManager

Use the Add-WindowsFeature cmdlet to install the necessary operating system components:

For a server that will have the typical installation of the Client Access, Hub Transport, and Mailbox server roles.
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart

For a server that will host the Client Access, Hub Transport, Mailbox, and Unified Messaging server roles.
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy,Desktop-Experience -Restart

For a server that will host the Client Access and Hub Transport server roles.
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart

For a server that will host the Hub Transport and Mailbox server roles.
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server -Restart

For a server that will host the Client Access and Mailbox server roles.
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart

For a server that will host only the Client Access server role.
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart

For a server that will host the Hub Transport or the Mailbox server role.
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server -Restart

For a server that will host only the Unified Messaging server role.
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Desktop-Experience -Restart

For a server that will host the Edge Transport server role.
Add-WindowsFeature NET-Framework,RSAT-ADDS,ADLDS -Restart

On servers that will have the Client Access server role installed, after the system restarts, log on as an administrator, open an elevated Windows PowerShell console, and configure the Net.Tcp Port Sharing Service for automatic startup by running the following command.
Set-Service NetTcpPortSharing -StartupType Automatic

Friday, December 10, 2010

Mount windows share from linux with write access

sudo mount -t cifs //netbiosname/sharename /media/sharename -o username=winusername,password=winpassword,iocharset=utf8,file_mode=0777,dir_mode=0777

Tuesday, November 30, 2010

Asterisk recording IN/OUT script

vi /var/www/html/admin/modules/core/agi-bin/recordingcheck

$agi->set_variable("CALLFILENAME","g{$exten}-{$timestamp}-{$uniqueid}");
For OUT:
$agi->set_variable("CALLFILENAME","OUT{$exten['data']}-{$timestamp}-{$uniqueid}");
For IN:
$agi->set_variable("CALLFILENAME","IN{$exten['data']}-{$timestamp}-{$uniqueid}");

Friday, November 26, 2010

Ajaxplorer + lame + sox + bash scripts

Ajaxplorer - http://www.ajaxplorer.info/wordpress/download/

lame (for sox, to have mp3 conversion support) - http://lame.sourceforge.net/

sox - http://sox.sourceforge.net/ - MUST BE version 14.0.1

************************************************************************************************
#ftpput.sh

#!/bin/bash
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
PIPESTATUS=([0]="0")
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"'
PS1='[\H \W]# '
PS2='> '
PS4='+ '
PWD=/var/spool/asterisk/monitor
SHELL=/bin/bash
TERM=xterm
USER=root
consoletype=pty


DATE=`date +%d%m%Y`
cd /var/spool/asterisk/monitor
mkdir $DATE
cp /var/spool/asterisk/monitor/*.wav /var/spool/asterisk/monitor/$DATE
tar -cvf /var/spool/asterisk/monitor/$DATE.tar.gz $DATE

ftp -inv xxx.xxx.xxx.xxx <user 'username' 'password'
cd 511
lcd /var/spool/asterisk/monitor
binary
mput *.tar.gz
bye
EOF

rm -f /var/spool/asterisk/monitor/*.tar.gz

*****************************************************************************************
#untar.sh

#!/bin/bash
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
PIPESTATUS=([0]="0")
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"'
PS1='[\H \W]# '
PS2='> '
PS4='+ '
PWD=/var/spool/asterisk/monitor
SHELL=/bin/bash
TERM=xterm
USER=root
consoletype=pty

cd /u02/511
tar -xvf /u02/511/*.tar.gz
rm -f *.tar.gz

cd /u02/
chown -R trix:trix 511


***********************************************************************************

#gsm_to_mp3.sh

#!/bin/bash
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
PIPESTATUS=([0]="0")
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"'
PS1='[\H \W]# '
PS2='> '
PS4='+ '
PWD=/var/spool/asterisk/monitor
SHELL=/bin/bash
TERM=xterm
USER=root
consoletype=pty

cd /u02/511
DATE=`date +%d%m%Y --date=yesterday`
cd $DATE
for x in *.gsm ; do sox "${x}" "${x}".mp3; done;
rm -f *.gsm


*****************************************************************************************

crontab -e

Saturday, November 20, 2010

script for export list of the virtual machines from vCentre

PowerShell -PSConsoleFile "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" -command M:\_ServiceRequests\VMware\Scripts\VMwareExport.ps1

$vcserver="wfcp3507"
connect-VIServer $vcserver

$report = @()
Get-VM | %{
$vm = $_ | Get-View
$row = "" | Select Name, State, Status, Host, CPU, Memory, GuestMem, Notes
$row.Name = $_.Name
$row.State = $_.PowerState
$row.Status = $vm.Summary.OverallStatus
$row.Host = $_.Host
$row.CPU = $vm.Summary.QuickStats.OverallCpuUsage
$row.Memory = $vm.Summary.QuickStats.HostMemoryUsage
$row.GuestMem = ("{0:f0}" -f ($vm.Summary.QuickStats.GuestMemoryUsage / $_.MemoryMB * 100))
$row.Notes = $_.Description
$report += $row
}

$report | Export-Csv "Q:\Engineer\VMWare Resource Manager\VMwareExport.csv" -noTypeInformation

##############################

1. Disconnect session from VC #

##############################

disconnect-viserver -confirm:$false

Friday, November 19, 2010

exe opens in notepad [SOLVED]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\UserChoice]
"Progid"="Applications\\.exe"

Thursday, November 18, 2010

How can I restore the defaults of my Desktop Environment?

mount /dev/cdrom "/media/RHEL_5* x86.64"

system-config-packages

and select GNOME desktop

Tuesday, September 21, 2010

Clark Howard Show

http://cnn.com/clarkhoward

Friday, August 13, 2010

Tuesday, August 3, 2010

ჩინური ტელეფონების დრაივერები

აქაა თვითონ პროგრამა და ჩინური ბლექბერის დრაივერი. http://cworld.ge/fm (/Drivers/MOBIL/Chinurebi) თუ ვინმეს დაგჭირდებათ სხვა დრაივერი მომწერეთ.

Thursday, July 22, 2010

Export account settings outlook 2007/2010

Export the mail profiles from the registry. They're in
HKCU\Software\Microsoft\Windows NT\CurrentVersion\WIndows Messaging
Subsystem\Profiles

Sunday, May 23, 2010

Oracle 11g

to see the version - SELECT * PRODUCT_COMPONENT_VERSION;

Shared Pool

1. Library cache - Every time you execute a statement, the information is stored in the library cache. That way, the next time you execute the statement not much has to
occur.
2. Dictionary cache - The dictionary cache is also frequently used for parsing when you execute
SQL.
3.The quickest result cache - This lets Oracle skip the execution part of the, er, execution, for lack of a better term, and go directly to the result set, if it exists.
4. Least Recently Used algorithm - If the library cache is short on space, objects are thrown out. Statements that are used the most stay in the library cache the longest.

====================================================================================


When you install 10g express you have to do the following:


Why I got ORA-27121: unable to determine size of
shared memory segment ?

A. The full erros stack:
ERROR:
ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory
segment
Linux Error: 13: Permission denied

This is caused by Oracle installer not setting setuid
on $ORACLE_HOME/bin/oracle.

To fix do:
$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle


$ORACLE_HOME should be this, /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/

Friday, April 9, 2010

Sunday, March 14, 2010

Useful links

http://www.homeauto.com/main.asp

Saturday, March 13, 2010

Install Fedora 12 on Asus Eee PC 1201N

For Wireless install rtl8192se_linux_2.6.0015.0127.2010
yum install kernel kernel-devel kernel-headers

make
make install

Nvidia

http://rpmfusion.org/Configuration/

yum install kmod-nvidia

than add into the boot line: rdblacklist=nouveau

change font DPI

Install chrome with flashplayer

mkdir /opt/google/chrome/plugins/

and copy flash plugins here

----------------------

For the microphone:

1)search for a package called "pavucontrol" (PulseAudio Volume Control) and mark it for install as well
2) Hit "Apply" and after the packages have downloaded and installed, reboot linux
3) Once you log back in, go to Applications->Sound & Video and run "PulseAudio Volume Control"
4) Click the "Input Devices" tab and you will see your mic but it will have two channels (stereo) a Front Right and Front Left. Well this is just plain wrong! A mic is a mono device, so go ahead and set that Front Right slider all the way to "Silence" (you can leave Front Left at about 80-90%)

Exit PulseAudio Volume Control and you should now have a working mic in all applications including Skype if you use it.

To watch the videos on rustavi2.com

yum install gstreamer-plugins* gstreamer-ffmpeg mplayer gecko-mediaplayer smplayer


------------------------


yum install gnochm - chm viewer




Friday, February 26, 2010

Install Ubuntu on Asus Eee PC 1201N

You need to make boot able USB and install as usual.

Wireless driver should be install this way:


Download this file
http://launchpadlibrarian.net/36688638/rtl8192se_linux_2.6.0010.1211.2009.tar.gz


[1] Copy the target module r8192se_pci.ko to /lib/modules/2.6.31-14-generic/kernel/drivers/net/wireless/
[2] Copy rtl8192se firmware folder to /lib/firmware/`uname -r`
[3] Run the command of `depmod -a`
[4] Run the command of 'modprobe rtl8192se_pci', or reboot.
[5] Check the NetworkManager, and see whether there's network list show out?


--------------------------------------------------------------------------------------------------------------------------------

Install Nvidia driver

# wget http://www.avenard.org/files/ubuntu-repos/ubuntu-repos.key && apt-key add ubuntu-repos.key && rm ubuntu-repos.key
# echo "deb http://www.avenard.org/files/ubuntu-repos jaunty release" | sudo tee /etc/apt/sources.list.d/avenard.list
# apt-get update
# apt-get install linux-headers-2.6.28-11-generic
# apt-get install nvidia-glx-195 nvidia-195-libvdpau
# nvidia-xconfig
# apt-get install vim
# vi /etc/X11/xorg.conf
-- [Change Mouse to /dev/input/mice]
# /etc/init.d/gdm stop
# rmmod nvidia
# modprobe nvidia
# echo nvidia >>/etc/modules
# /etc/init.d/gdm start

----------------------------------------------------------------------------------------


for the browser plugins you need to install xine and flashplayer 10.1

Or you can go here and install this https://help.ubuntu.com/community/RestrictedFormats


-----------------------------------------------------------------------------------------

If you have problem with background after restart this is a solution


rm -R .gconf/desktop/gnome/background (and restart gnome)



-------------------------------------------------------------


Sunday, February 21, 2010

Install Asterisk on CentOS

Step1: We need to install some required packages. Fro this login as root and type the following in the terminal:

yum -y install gcc gcc-c++ kernel-devel bison openssl-devel libtermcap-devel ncurses-devel doxygen curl-devel newt-devel mlocate lynx tar wget nmap bzip2 mod_ssl crontabs vixie-cron speex speex-devel unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel mysql-server php-mysql php-mbstring php-mcrypt flex screen bison libtermcap libtermcap-devel newt newt-devel ncurses ncurses-devel

Step2: Create a new file in a directory /etc/yum.repos.d with a name "centos-asterisk.repo" and put this text there:

[asterisk-tested]
name=CentOS-$releasever - Asterisk - Tested
baseurl=http://packages.asterisk.org/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium

[asterisk-current]
name=CentOS-$releasever - Asterisk - Current
baseurl=http://packages.asterisk.org/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium


Now create another file with a name "centos-digium.repo" and put the text:

[digium-tested]
name=CentOS-$releasever - Digium - Tested
baseurl=http://packages.digium.com/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium

[digium-current]
name=CentOS-$releasever - Digium - Current
baseurl=http://packages.digium.com/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium

STEP3: now simply run this command: yum -y install asterisk16 asterisk16-configs asterisk16-voicemail dahdi-linux dahdi-tools libpri

Install CentOS on Virtualbox


Install Virtualbox guest additions
log in as root and type in terminal

CODE: SELECT ALL EXPAND VIEW
yum install gcc -y


CODE: SELECT ALL EXPAND VIEW
yum install kernel sources -y

CODE: SELECT ALL EXPAND VIEW
yum install kernel-devel -y


restart the system

now go to the VBox Addition directory in your /media directory and type:

CODE: SELECT ALL EXPAND VIEW
sh VBoxLinuxAdditions.run


restart the system again

Edit xorg.conf

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024" "1024x768" "800x600"
EndSubSection
EndSection

Monday, February 15, 2010

FAQ from x.org about ATI driver

I have an ATI graphics card, which driver should I use ?

The GATOS project create enhanced (fast) drivers for the ATI chipsets, which also include TV in/out support for most ATI cards that have this feature. While the main target of these drivers is still XFree86, they are still compatible with the X.org server. The GATOS project does not yet redistribute X.org compatible binaries, but compiling against the X.org source tree will work. The GATOS TV-in code has been incorporated into XOrg, but its TV-out code is still only available in the GATOS drivers.

For r200 cards on down, the open source ati drivers will provide excellent 3d acceleration. for r300 and up, the only fully functioning option is ATI's proprietary fglrx drivers in X11R6.8 and below. In X11R6.9 and X11R7.0, DRI will work on r300 and up.

Sunday, February 14, 2010

Install codecs on Fedora

First, install RPM Fusion's free and nonfree YUM repositories. For detailed information about installing RPM Fusion, see: http://rpmfusion.org/Configuration

su -c "rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm"

su -c "rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm"

Next, install MPlayer from RPMFusion.org.

su -c "yum install mplayer gnome-mplayer gnome-mplayer-common mencoder"

Now, visit the MPlayer Codecs Directory and download the latest 'All' tarball.

wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2

Next, prepare the codecs folder. MPlayer from RPMFusion.org will use /usr/lib/codecs.

su -c "mkdir -p /usr/lib/codecs"

Other media players like Xine and avifile might use /usr/lib/win32, so create a symlink.

su -c "ln -s /usr/lib/codecs /usr/lib/win32"
ls -l /usr/lib/win32
lrwxrwxrwx 1 root root 15 2008-05-24 08:02 /usr/lib/win32 -> /usr/lib/codecs

Finally, extract the contents of the tarball and copy all files to /usr/lib/codecs.

tar -xjvf all-20071007.tar.bz2
su -c "cp -a all-20071007/* /usr/lib/codecs/"

See the MPlayer(1) man page for /usr/bin/mplayer usage.

man 1 mplayer


To watch the videos on rustavi2.com

yum install gstreamer-plugins* gstreamer-ffmpeg mplayer gecko-mediaplayer smplayer

Cheap accessory store

http://www.bitssite.com

Friday, February 12, 2010

Fedora 12 on HP Pavilion ZV5000

Wi-Fi driver

export FIRMWARE_INSTALL_DIR= /lib/firmware/b43
sudo b43-fwcutter -w /lib/firmware/b43 broadcom-wl-4.80.53.0/kmod/wl_apsta.o
sudo modprobe -r b43 ssb wl # remove modules
sudo modprobe b43 # install module to force load of new firmware


Video driver

yum install kernel xorg-x11-drv-ati xorg-x11-drv-radeonhd
reboot
system-config-display

Asterisk

yum -y install gcc gcc-c++ kernel-devel bison openssl-devel libtermcap-devel ncurses-devel doxygen curl-devel newt-devel mlocate lynx tar wget nmap bzip2 mod_ssl crontabs vixie-cron speex speex-devel unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel mysql-server php-mysql php-mbstring php-mcrypt flex screen bison libtermcap libtermcap-devel newt newt-devel ncurses ncurses-devel



sip.conf

[100]
type=friend
host=dynamic
username=100
secret=123
nat=yes
canreinvite = no
qualify=yes
context=internal
dial=SIP/100
disallow=all
allow=ulaw


[101]
type=friend
host=dynamic
username=101
secret=123
nat=yes
canreinvite = no
qualify=yes
context=internal
dial=SIP/101
disallow=all
allow=ulaw



extensions.conf

[globals]
[general]
[default]
exten => s,1,Verbose(1|Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()





[localphone-in]
exten => 8201389,1,Dial(SIP/100,60,tr)
exten => 8201389,2,Hangup

[localphone-out]
exten => _8.,1,Dial(SIP/${EXTEN:1}@localphone,30,tr)
exten => _8.,2,Playback(invalid)
exten => _8.,3,Hangup


[internal]

exten => 100,1,Dial(SIP/100,30)
exten => 100,n,Macro(voicemail,100)
exten => 100,n,Hangup()


exten => 101,1,Dial(SIP/101,30)
exten => 101,n,Macro(voicemail,101)
exten => 101,n,Hangup()

exten => 500,1,VoiceMailMain(${CALLERID(num)}@default)

include => localphone-out

[phones]
include => internal
include => localphone-out

[macro-voicemail]
exten => s,1,Dial(SIP/${ARG1},10)
exten => s,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy:unavail)
exten => s,n(unavail),VoiceMail(${MACRO_EXTEN}@default,u)
exten => s,n,Hangup()
exten => s,n(busy),VoiceMail(${MACRO_EXTEN}@default,b)
exten => s,n,Hangup()


---------------------------------------------------------------------


To create a vaoice mailbox I add the following line to the voicemail.conf file.

100 => password,Name of an user,jezell@company.com