čtvrtek, 1. března 2012

Vygenerování jednoho SSL certifikátu pro několik jmen (pro Exchange 2010)

  1. Na serveru s Exchange 2010 spustit "Exchange Management Shell"
  2. Sestavit seznam doménových jmen pro které bude certifikát platný
  3. Spustit příkaz New-ExchangeCertificate s parametry pro vytvoření žádosti o certifikát. např. $Data = New-ExchangeCertificate -FriendlyName 'Exchange' -GenerateRequest -KeySize '2048' -DomainName remote.domain.com, autodiscover.domain.com, domain.com, servername, servername.domain.local, domain.local, Sites -Server 'servername' -SubjectName 'C=XX,S="YYY",L="Město",O="Organizace",OU="Jednotka",CN=remote.domain.com' -PrivateKeyExportable $true -BinaryEncoded
    Set-Content -path "c:\certreq.req" -Value $Data.FileData -Encoding Byte
  4. Odeslání žádosti k potvrzení. certreq -submit -attrib “CertificateTemplate:webserver” c:\certreq.req c:\certnew.cer
  5. Potvrzení žádosti certreq -accept c:\certnew.cer
  6. Na serveru s Exchange 2010 spustit "Exchange Management Console"
  7. V nastavení "Server Configuration" najít nový certifikát a přiřadit mu služby.

čtvrtek, 9. června 2011

KVM on Ubuntu

https://help.ubuntu.com/community/KVM/Managing
https://help.ubuntu.com/community/KVM/CreateGuests
http://libvirt.org/formatdomain.html#elementsDevices

virsh --connect qemu:///system

pondělí, 30. května 2011

Send-As a Distribution Group Exchange 2007

1. Open the Exchange Management Shell as an Administrator.

2. Type in the following command, replacing GROUPNAME and USERNAME with the name of the distribution group that you want to grant the user(s) access to send as and the username(s) of the users that will be able to send-as this distribution group.

Add-ADPermission GROUPNAME -ExtendedRights Send-As -user USERNAME

neděle, 20. února 2011

Nginx With PHP As FastCGI

Instalace

echo "deb http://ppa.launchpad.net/brianmercer/php/ubuntu lucid main" >> /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8D0DC64F
apt-get update
apt-get install nginx php5-cli php5-common php5-mysql php5-suhosin php5-fpm

Konfigurace

server {
        listen       80;
        server_name  localhost;

        #access_log  logs/host.access.log  main;

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        location / {
            root   /opt/nginx/html;
            index  index.php;
        }

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /opt/nginx/html$fastcgi_script_name;
            include        fastcgi_params;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
            deny  all;
        }
    }

středa, 5. ledna 2011

Mac OS X 10.6.5 on Gigabyte GA-945GCM-S2L

DSDT

DSDT_speedstep_V2.aml.zip

SMC

FakeSMC_rev405_Snow.zip
When a kernel panic, it is necessary to remove the Radeon plugin!

Video - Intel® 945GC Express

GMA_0x27AE8086_Snow_Leopard_Fix.zip
You must use the kext from 10.6.2 and fix DeviceID (0x2772) and RevisionID (0x0002)!
sudo perl -pi -e 's|\x86\x80\xA2\x27|\x86\x80\x72\x27|g' /System/Library/Extensions/AppleIntelIntegratedFramebuffer.kext/AppleIntelIntegratedFramebuffer 
sudo perl -pi -e 's|\x86\x80\xA2\x27|\x86\x80\x72\x27|g' /System/Library/Extensions/AppleIntelGMA950.kext/Contents/MacOS/AppleIntelGMA950 
sudo perl -pi -e 's|27A28086|27728086|g' /System/Library/Extensions/AppleIntelIntegratedFramebuffer.kext/Info.plist
sudo perl -pi -e 's|27A28086|27728086|g' /System/Library/Extensions/AppleIntelGMA950.kext/Contents/Info.plist

Audio - Realtek ALC662 Audio Codec

10.6.2-AppleHDAInstaller.pkg

Net - Realtek RTL 8111C

RealtekR1000SL.kext

Links

sobota, 20. listopadu 2010

Příprava Linuxového serveru pro hosting Ruby on Rails aplikací

Součásti

  • Nginx
  • Passenger

Instalace

apt-get install ruby rdoc ruby1.8-dev build-essential libopenssl-ruby libcurl4-openssl-dev libssl-dev zlib1g-dev libsqlite3-dev
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar -xzf rubygems-1.3.7.tgz
cd rubygems-1.3.7
ruby setup.rb
gem1.8 install rails sqlite3-ruby passenger
passenger-install-nginx-module

Konfigurace

Init skript /etc/init.d/nginx (počítá s instalací do defaultního umístění)
#! /bin/sh

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/opt/nginx/sbin/nginx
NAME=nginx
DESC=nginx

test -x $DAEMON || exit 0

set -e

. /lib/lsb/init-functions

test_nginx_config() {
  if $DAEMON -t $DAEMON_OPTS
  then
    return 0
  else
    return $?
  fi
}

case "$1" in
  start)
 echo -n "Starting $DESC: "
        test_nginx_config
 start-stop-daemon --start --quiet --pidfile /opt/nginx/logs/$NAME.pid \
  --exec $DAEMON -- $DAEMON_OPTS || true
 echo "$NAME."
 ;;
  stop)
 echo -n "Stopping $DESC: "
 start-stop-daemon --stop --quiet --pidfile /opt/nginx/logs/$NAME.pid \
  --exec $DAEMON || true
 echo "$NAME."
 ;;
  restart|force-reload)
 echo -n "Restarting $DESC: "
 start-stop-daemon --stop --quiet --pidfile \
  /opt/nginx/logs/$NAME.pid --exec $DAEMON || true
 sleep 1
        test_nginx_config
 start-stop-daemon --start --quiet --pidfile \
  /opt/nginx/logs/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS || true
 echo "$NAME."
 ;;
  reload)
        echo -n "Reloading $DESC configuration: "
        test_nginx_config
        start-stop-daemon --stop --signal HUP --quiet --pidfile /opt/nginx/logs/$NAME.pid \
            --exec $DAEMON || true
        echo "$NAME."
        ;;
  configtest)
        echo -n "Testing $DESC configuration: "
        if test_nginx_config
        then
          echo "$NAME."
        else
          exit $?
        fi
        ;;
  status)
 status_of_proc -p /opt/nginx/logs/$NAME.pid "$DAEMON" nginx && exit 0 || exit $?
 ;;
  *)
 echo "Usage: $NAME {start|stop|restart|reload|force-reload|status|configtest}" >&2
 exit 1
 ;;
esac

exit 0
Passenger
http://www.modrails.com/videos/passenger_nginx.mov