search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Hosting & IIS7, Windows Powershell | 4 Comments | 11,513 views | 11/12/2010 01:25

Detailed script about how to create website in IIS7 with Powershell.

1
2
3
4
5
6
7
Function Create-WebSite
{
Param ($LogDir, $Description, $Domain)
 
     $Domain = ($Domain.TrimStart("www")).TrimStart(".")
     New-Item IIS:\Sites\$Description -Bindings (@{Protocol="http";BindingInformation="*:80:$Domain"},@{Protocol="http";BindingInformation="*:80:www.$Domain"}) -PhysicalPath "$LogDir\http"
}

$LogDir is the path of FTP directory and $Description is the name of the website.


Posted in Hosting & IIS7, Windows Powershell | No Comment | 2,305 views | 11/12/2010 01:22

One of my script about how to set ACL for FTP users.

1
2
3
4
5
6
7
8
9
10
11
12
Function Set-FTPACL
{
Param ($FTPUsername, $LogDir)
 
    $Account = New-Object System.Security.Principal.Ntaccount("$FTPUsername")
    $Sid = $Account.Translate([System.Security.Principal.SecurityIdentifier])
    $ACL = Get-Acl -Path "$LogDir"
    $Permission = "$Account","Modify","ContainerInherit,ObjectInherit","None","Allow"
    $AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $Permission
    $ACL.SetAccessRule($AccessRule)
    $ACL | Set-Acl "$LogDir"
}

$LogDir is the path of FTP directory.


Posted in Hosting & IIS7, Windows Powershell | No Comment | 2,808 views | 11/12/2010 01:18

Very detailed script about how to set ACL for IIS users.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Function Set-IISACL
{
Param ($Username, $LogDir)
 
    $Account = New-Object System.Security.Principal.Ntaccount("$Username")
    $Sid = $Account.Translate([System.Security.Principal.SecurityIdentifier])
    $ACL = Get-Acl -Path "$LogDir"
    $ACL.SetAccessRuleProtection($True, $True) 
    Set-Acl -Path "$LogDir" -AclObject $ACL
    $Permission = "$Account","ReadAndExecute","ContainerInherit,ObjectInherit","None","Allow"
    $AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $Permission
    $ACL.SetAccessRule($AccessRule)
    $ACL | Set-Acl "$LogDir"
 
    $Account = New-Object System.Security.Principal.Ntaccount("$Username")
    $Sid = $Account.Translate([System.Security.Principal.SecurityIdentifier])
    $ACL = Get-Acl -Path "$LogDir\db"
    $Permission = "$Account","Modify","ContainerInherit,ObjectInherit","None","Allow"
    $AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $Permission
    $ACL.SetAccessRule($AccessRule)
    $ACL | Set-Acl "$LogDir\db"
 
    $Account = New-Object System.Security.Principal.Ntaccount("$Username")
    $Sid = $Account.Translate([System.Security.Principal.SecurityIdentifier])
    $ACL = Get-Acl -Path "$LogDir\http\upload"
    $Permission = "$Account","modify","ContainerInherit,ObjectInherit","None","Allow"
    $AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $Permission
    $ACL.SetAccessRule($AccessRule)
    $ACL | Set-Acl "$LogDir\http\upload"
}

Contains example for Modify and Read Only permissions.


Posted in Hosting & IIS7 | No Comment | 4,208 views | 20/10/2010 13:52

Virtuozzo Container’ında bir problem olması durumunda, container stopping durumda kalabilir.
Bununla birlikte start ve stop butonları da işlevselliğini yitirebilir.

Bu durumda container’ı destroy etmeyi denemek de sorunu çözmeyecektir.

Aynı şekilde yedekten geri dönmeye çalıştığınızda da aynı hatayı alabilirsiniz.
Yine çalışan servisleri kontrol etmeye çalıştığımızda, aşağıdaki gibi bir hata almanız da mümkün.

Konsolun işe yaramaması nedeniyle işlemleri CMD üzerinden gerçekleştirmeliyiz.
Bunun için aşağıdaki komutları çalıştırmanız yeterli olacaktır;

vzctl stop CTID –skiplock
vzctl start CTID –skiplock

Bu işlemler sonrası panel üzerinden işlemleri yürütmeye devam edebilirsiniz.


Posted in Hosting & IIS7 | 1 Comment | 6,497 views | 19/10/2010 11:17

Hello everyone,

Recently I announced new Wimp Server version for our PHP on Windows project.
New version is officially supported by Microsoft Turkey.

So What’s new?

1) IIS 7.5
2) PHP 5.3.3
3) MySQL 5.1.50
4) phpMyAdmin 3.3.7
5) Microsoft SQL Server 2008 R2 Express Edition
6) Helicon Ape
7) .Net Framework 4.0
8) Microsoft Web Platform Installer 2.0

Some screenshots from new Wimp Server Installer Gui:

As you see, you have different installation options. One of them is Manually Install, other one is Unattended Install. If you want to install MySQL manually, you can choose. Also you can choose x86 or x64 versions of products.

There is no automatic update feature for Wimp Gui yet but will be soon. (maybe in v4)


Posted in Hosting & IIS7 | No Comment | 7,947 views | 19/10/2010 09:51

Eğer MySQL 5.x sürümlerinden bir tanesini kullanıyor ve root şifrenizi bilmiyorsanız, aşağıdaki adımları uygulayarak root şifrenizi sıfırlayabilirsiniz.

1. MySQL servisini öncelikle durdurun.

net stop MySQL

2. MySQL bin klasörüne CMD üzerinden erişin.

cd C:\MySQL\bin

3. Aşağıdaki komutu çalıştırın.

mysqld.exe -u root –skip-grant-tables

4. Yukardaki komutu çalıştırdıktan sonra CMD penceresini açık bırakmaya devam edin.

5. MySQL bin klasörüne ayrı bir CMD üzerinden erişin.

cd C:\MySQL\bin

6. Aşağıdaki komutları çalıştırın.

mysql
use mysql;
UPDATE user SET Password = PASSWORD(‘Yeni-Sifreniz’) WHERE User = ‘root’;
exit;

7. Tüm cmd’leri kapatın. Arkada çalışan ilk CMD’miz de dahil olmak üzere.

8. MySQL servisini start edin.

net start MySQL

Bu işlemler sonrası root şifrenizin değişmiş olması gerekiyor.


Posted in Hosting & IIS7 | No Comment | 6,241 views | 15/08/2010 17:10

Bir çok datacenter Network uptime için %99,99 gibi değerler verirler. Peki %99,99’luk değerin, yılda kaç dakikalık kesintiye karşılık geldiğini biliyor musunuz? Hemen alttaki tablodan göz atalım:

Tabi her veri merkezi, 9’la biten uptime oranları vermeyebilir. Şimdi elinizde bulunan uptime oranına göre yılda kaç saat kesinti yaşayabileceğinizi hesaplayalım.

1 yıl 365 gün x 1 gün 24 saat = 8760 saat eder. Yani 1 yıl 8760 saate eşit oluyor. Örneğin uptime garantisi 99,5 olsun. Bu durumda hesaplama aşağıdaki gibi olmalı.

8760 – (8760 * (99,5 / 100)) = 43,8 saat

Hesaplamada sadece 99,5 olan kısma uptime oranını yazmanız, sonucu bulmanız için yeterli olacaktır. 99,5 uptime oranında, yıllık maksimum 43,8 saatlik bir kesintinin olabileceği öngörülüyor. Bu değeri 12’ye bölmeniz halinde, aylık kesinti süresini; 48’e bölmeniz durumunda haftalık kesinti süresini bulabilirsiniz.