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

Badges
MCSE
Community

Cozumpark Bilisim Portali
Unattended Plesk Installation on Windows Server 2008
Posted in Windows Server | No Comment | 3,613 views | 18/02/2009 11:34

We can install unattended Plesk Panel on Windows 2008. You should create a batch file and add it to your answer file. Install-Plesk-with-MSDE.cmd:

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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@echo off
if "%3" == "" ( 
	echo " USAGE: install-plesk-with-mssqlexpress.cmd <distrib path> <installation path> <mode> [<MSSQLEXPRESS password>]"
	echo " where <mode> can be: 
	echo " complete - Complete Plesk installation
	echo " typical - Typical Plesk installation
	echo " {comp_list} - Complete Plesk installation without specified components (use a comma to separate the components)
	exit /b 1
)
 
set plesk_distrib_dir=%~1
 
set plesk_dir=%~2
 
set plesk_non_typical=KasperskyAV,PDFDoc,Python,JDK,Tomcat
 
if "%3" == "complete" set plesk_exclude=MSDE,MSSQLEXPRESS
 
if "%3" == "typical" set plesk_exclude=MSDE,MSSQLEXPRESS,%plesk_non_typical%
 
if "%plesk_exclude%" == "" set plesk_exclude=MSDE,MSSQLEXPRESS,%~3
 
set mssqlexpress_pwd=1q2w3e4R
 
if "%~4" NEQ "" set mssqlexpress_pwd=%4
 
@echo on
 
set sql_server_exe=%plesk_distrib_dir%\sql_server_2005_express_edition_sp2_x32.EXE
 
If "%PROCESSOR_ARCHITECTURE%" NEQ "x86" set sql_server_exe=%plesk_distrib_dir%\sql_server_2005_express_edition_sp2_x64.EXE
 
@echo SQL SERVER Installer path: "%sql_server_exe%"
 
"%sql_server_exe%" /qb ADDLOCAL=ALL DISABLENETWORKPROTOCOLS=0 SECURITYMODE=SQL REBOOT=ReallySuppress INSTALLSQLDIR="%plesk_dir%\Databases\MSSQL\" INSTALLSQLDATADIR="%plesk_dir%\Databases\MSSQL\" INSTALLSQLSHAREDDIR="%plesk_dir%\Databases\MSSQL\" INSTALLASDATADIR="%plesk_dir%\Databases\MSSQL\" INSTANCENAME=MSSQLSERVER
 
If "%ERRORLEVEL%" NEQ "0" exit /b %ERRORLEVEL%
 
set osql_exe=%plesk_dir%\Databases\MSSQL\90\Tools\Binn\OSQL.EXE
 
If "%PROCESSOR_ARCHITECTURE%" NEQ "x86" set osql_exe=%plesk_dir%\Databases\MSSQL (x86)\90\Tools\Binn\OSQL.EXE
 
@echo OSQL.EXE path: "%osql_exe%" 
 
"%osql_exe%" -E -Q "ALTER LOGIN sa WITH PASSWORD='%mssqlexpress_pwd%'; ALTER LOGIN sa ENABLE"
 
If "%ERRORLEVEL%" NEQ "0" exit /b %ERRORLEVEL%
 
reg ADD "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer" /v LoginMode /d 2 /t REG_DWORD /f 
 
net stop MSSQLSERVER /Y
 
net start MSSQLSERVER /Y
 
"%plesk_distrib_dir%\SetupPlesk.exe" /qn MSSQL_HOST=localhost MSSQL_ADMIN_NAME=sa MSSQL_ADMIN_PASSWD="%mssqlexpress_pwd%" INSTALLDIR="%plesk_dir%" ADDLOCAL=ALL REMOVE=%plesk_exclude% /l*v "%plesk_dir%\plesk-install.log"
 
If "%ERRORLEVEL%" NEQ "0" exit /b %ERRORLEVEL%

This bath file installs Plesk with Mssql Express Edition. You should add this in your answer file to execute:

1
install-plesk-with-mssqlexpress.cmd "C:\Plesk\Install" "C:\Plesk" complete [MSSQLpassword]

Complete key is for the complete installation. You can use Typical instead of it.



Leave a Reply