Windows server core iis

Удаленное управление IIS в Windows Server 2016/2012 R2

Веб-сервер Internet Information Service в Windows 2016/ 2012 / R2, как и предыдущие версии IIS имеет возможность удаленного управления. Ведь управлять множеством IIS серверов из одной консоли довольно удобно, а для веб-серверов, работающих в режиме Core/Nano, это практически единственный удобный способ управления веб сервером. Однако по умолчанию функционал удаленного управления в IIS отключен и в том случае, если на другом сервере попытаться добавить удаленный сервер с запущенным IIS в консоль управления IIS (меню Connect to a Server), появится ошибка:

Установка службы управления IIS Management Service

Дело в том, что при стандартной установке IIS, служба IIS Management Service, отвечающая за его удаленное управление не устанавливается. Убедится, что данная служба отсутсвует в системе можно с помощью Powershell команды:

Как вы видите, служба Web-Mgmt-Service не установлена. Установите компонент Windows Server с помощью командлета Add-WindowsFeature , выполним с правами администратора следующую команду Powershell:

Также вы можете установить компонент Management Service из консоли Server Manager.

Затем перезапустите веб сервис IIS:
iisreset –noforce
Следующий шаг – нужно разрешить удаленные подключения в настройках веб сервера IIS. Для этого в диспетчере служб IIS в секции Management откройте появившийся пункт Management Service.

В разделе Management Service включите опцию «Enable remote connections».

Здесь же можно ограничить возможность подключения к консоли управлений веб сервера по IP адресу. Для этого запретите подключение с неизвестных клиентов (Access for unspecified clients:Deny) и укажите IP адрес / или IP подсети, с которых будет разрешено подключение. Служба удаленного подключения использует SSL сертификат, но вы можете использовать другой, если вы импортировали его в хранилище сертификатов (вы можете создать и использовать самоподписанный сертификат). Сохраните изменения.

Reg Add HKLM\Software\Microsoft\WebManagement\Server /V EnableRemoteManagement /T REG_DWORD /D 1

В этом случае придется создать правило для файервола вручную:

netsh advfirewall firewall add rule name=”Allow IIS Web Management” dir=in action=allow service=”WMSVC”

Осталось запустить службу Web Management Service:

net start wmsvc

set-service wmsvc -StartupType Automatic

sc config WMSVC start= auto

После этого удаленный веб сервер IIS возможно добавить в консоль управлений IIS Manager и управлять сервером IIS, всеми сайтами на нем так же, как и локальным веб-сервером.

Предоставление прав пользователям на удаленное управление сайтом IIS

По-умолчанию право на удаленное управление сервером IIS есть только у пользователей с правами администратора сервера. Чтобы предоставить право на удаленное управление обычным пользователям, необходимо раздать соответствующие права на уровне каждого сайта IIS. Выберите сайт и найдите опцию IIS Manager Permissions.

В панели Actions нажмите на Allow User. Выберите учетную запись, которой нужно предоставить доступ к IIS и нажмите Ок.

Читайте также:  Huawei modem terminal для linux

Права пользователям по управлению сайтами на IIS настраиваются в секции Feature Delegation на уровне всего сервера IIS.

Вы можете задать один из трех уровней доступа пользователям для каждого функционала управления сервером IIS: Read Only, Read/Write или Not Delegated.

Удаленное управление IIS из Windows 10

Если вам нужно удалено управлять серверов IIS с клиентской рабочей станции с Windows 10 (Windows 7 или 8.1), необходимо установить консоль управления IIS: Turn Windows features on or off -> Internet Information Services -> Web Management Tools -> IIS Management Console.

Вы можете установить компонент управления следующей командой PowerShell:

Enable-WindowsOptionalFeature -Online -FeatureName «IIS-ManagementService»

Однако при запуске консоли IIS Manager в Windows 10 оказывается, что пункт Подключение к серверу (Connect to a server) в меню отсутствует.

Для возможности удаленного подключения к IIS в Windows 10 нужно скачать и установить компонент IIS Manager for Remote Administration (https://www.microsoft.com/en-us/download/details.aspx?id=41177).

После установки нужно перезапустить консоль диспетчера IIS и подключится к сайту. Если при подключении к IIS окажется, что версия консоли на клиенте и сервере отличается, появится уведомлении о необходимости обновить версию консоли (все необходимые файлы будут автоматически скачаны с сервера).

Теперь вы должны успешно подключиться к своему серверу IIS и удаленно управлять им со своего рабочего места.

Удаленное управление IIS и поддержка TLS 1.1/ TLS 1.2

Если на IIS вы отключили устаревших протоколов SSLv3 и TLS 1.0, оставив только TLS 1.1/ TLS 1.2 то при удаленном подключении к IIS появится ошибка:

Для исправления проблемы, необходимо на стороне клиента внести изменения в реестре, для обязательного использования протокола TLS1.2 при подключении. Настройки зависят от версии Windows.

Windows 10 и Windows Server 2016:

Windows 2012/ R2 и Windows 8/8.1:

Windows Server 2008 R2 / Windows 7:

Предварительно нужно установить обновление KB3154518 для поддержки TLS 1.2 в .NET Framework 3.5.1.

Install and Configure IIS 7 on Server Core

Introduction

Server Core, the minimal server installation option for Windows ServerВ® 2008, is available in Standard, Enterprise, and Datacenter editions. Server Core supports a subset of the server roles available in full installations of the operating system, including the Internet Information Services 7 and above (IIS 7 and above) Web server. In a Server Core installation, only the services, roles, and features required for an installed role are installed.

Running IIS on Server Core provides a modular, customizable Web server on a thin server operating system. This makes it ideal for appliance-like environments, Web farm front-end servers and Web sites, or applications that require minimal maintenance.

With the addition of the MicrosoftВ® .NET Framework to Server Core in Windows ServerВ® 2008 R2, the Server Core installation option becomes even more appealing for those who want to use a very small footprint server for hosting their applications. Availability of the .NET Framework provides:

  • MicrosoftВ®ASP.NET support.
    With Windows Server 2008 R2, Server Core can be used to host ASP.NET applications.
  • IIS Remote Management.
    Server Core does not provide any user interface other than the command-line interface. With the Windows Server 2008 R2 Server Core option, it is possible use IIS Manager for Remote Administration to connect to IIS and perform all management tasks from within the familiar user interface (UI) of IIS Manager.
  • Windows PowerShellв„ў.
    The Windows Server 2008 R2 Server Core option includes the IIS Windows PowerShell snap-in (also available with other installation options of Windows Server 2008 R2).
Читайте также:  Что такое linux reader

Install Server Core

To install IIS on an installed and configured Server Core installation of Windows Server 2008, you must have an administrator user account and password for the server running the Server Core installation.

Server Core is set up like a typical Windows Server 2008 server, except the «Server Core Installation» option is selected. The Server Core then forces a change in the administrator password.

Figure 1: Select Server Core option

Next, verify the NIC and IPConfig (not necessary if there is a Dynamic Host Configuration Protocol [DHCP] server running on the network). To fix an IP address, type the following:

To add a Domain Name System (DNS) server entry, type:

To find the computer name, type:

To change the computer name type:

Reboot with the command:

To join the domain, type:

Reboot with the command:

To prevent a later setup error in MySQL, open an exception for MySQL:

Reboot with the command:

Next, activate Server Core.

Use the following command if connected to the Internet:

If not connected to the Internet, use phone activation.
Type one of the following:

(This displays the installation identification to be given to Microsoft.)

(This activates the server using the confirmation ID given by Microsoft.)

For more information on the initial setup tasks such as managing the WindowsВ® Firewall and configuring for automatic updates, see Making Sense of Server Core. Also see the Server Core Installation Option Getting Started Guide.

After the Server Core installation is complete and the server is configured, you can install one or more server roles. The Server Core installation of Windows Server 2008 supports the following server roles:

  • Active DirectoryВ® Domain Services
  • Active Directory Lightweight Domain Services
  • DHCP Server
  • DNS Server
  • File Services
  • Media Services
  • Print Services
  • Hyper-Vв„ў
  • Web Services (IIS) (Limited)
  • Web Server (IIS)

Install IIS

See Install IIS 7.5 on Windows Server 2008 R2 using a Server Core installation for detailed instructions. Note that the full IIS installation, which installs all available feature packages for Server Core. If there are feature packages you do not need, you should edit the script to install only the packages you require. The default IIS installation installs a minimal set of available feature packages.

If you want to install IIS components that rely on the .NET Framework, you must first install the .NET Framework. The components that rely on the .NET Framework will not be installed if the .NET Framework is not already installed.

To use a script to install the .NET Framework and the full IIS 7.5 installation on Server Core, type the following command into a script:

Читайте также:  Postgresql ������ ���� ������ sql linux

To use a script for the full IIS 7.5 installation on Server Core, type the following command into a script:

To use a script for the default installation on Server Core, type the following command into a script:

See IIS 7.0 on Server Core and Installing IIS 7.0 on Server Core for more information about installing IIS 7.0.

Install Roles and Services

Use the command oclist to list the available and installed roles and services on the server. The oclist command also renders component dependencies.

Figure 2: Output of oclist command

In the figure above, the oclist output shows that IIS-FTPExtensibility is dependent on IIS-FTPSvc. To install IIS-FTPExtensibility, it is first necessary to install IIS-FTPSvc.

Use the ocsetup command to install and uninstall individual roles and services.

Next,run oclist | more to verify which IIS components have been installed.

Install the .NET Framework

If you plan to use ASP.NET or IIS Remote Management then it is necessary to install .NET Framework first. To install it use the following commands:

Install ASP.NET

Install ASP.NET by running the following commands (in order):

Install Windows PowerShell and IIS Snap-In

Install Windows PowerShell by running the following command:

Next, start Windows PowerShell with the following command:

You should see a PowerShell prompt.

In order to enable the IIS snap-in, you must change the script execution policy by running this command:

Restart PowerShell for the policy changes to take effect. After restarting PowerShell, import the IIS snap-in:

You can obtain the list of available IIS cmdlets by typing:

For information about Windows PowerShell on Server Core, see Dmitry’s PowerBlog: PowerShell and Beyond.

Enable IIS Remote Management

Because Windows Server 2008 R2 Server Core does not have a graphical user interface (GUI), the command prompt must be used for administrative tasks. It may be more convenient to manage Server Core from another computer using IIS remote management.

The IIS Manager for Remote Administration:

  • Remotely manages IIS from WindowsВ® 7, Windows VistaВ®, WindowsВ® XP, and Windows ServerВ® 2003.
  • Connects directly to a Web server, Web site, or Web application.
  • Installs even when IIS is not installed on the local computer.
  • Allows multiple simultaneous connections.
  • Supports delegated administration to Web sites and Web applications, so owners can connect to and manage their own site directly.
  • Is a familiar and easy-to-use administration tool.
  • Supports HTTP over Secure Sockets Layer (SSL) for more secure management.
  • Automatically downloads features to the local IIS Manager for Remote Administration console to match features newly installed on the remote Web server.

By default, Remote Desktop is not enabled on the Server Core. Install the IIS remote management service by using the following command:

Enable remote management with the following command:

Start the management service by typing:

Connect to the IIS on the Server Core from a remote machine by using IIS Manager for Remote Administration.

To uninstall the Web Server (IIS) role, use the following command:

Оцените статью