helpcenter/Web/Controls/Help/Server/Windows/Community/CompileSourceCode/CompileSourceCode.ascx
2017-07-18 10:59:11 +03:00

262 lines
20 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ Control Language="C#" Inherits="BaseContentUserControls"%>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Compiling Community Server for a local server";
MetaKeyWords = "";
MetaDescription = "";
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Compiling Community Server for a local server</h1>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/Versions/CommunityServer/CommunityServer_Current.ascx" />
<div class="keyword_block">
<ul>
<li>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/local-server/local-server.ascx" />
</li>
<li>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/server-version/server-version.ascx" />
</li>
<li>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/install-ONLYOFFICE/install-ONLYOFFICE.ascx" />
</li>
<li>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/community-server/community-server.ascx" />
</li>
<li>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/windows-version/windows-version.ascx" />
</li>
<li>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/open-source-version/open-source-version.ascx" />
</li>
</ul>
</div>
<div class="video_ground video_trips">
<h2 id="introduction">Introduction</h2>
<div class="block_of_step">
<div class="screen_text">
<p><b>Community Server</b> is a free open source collaborative system developed to manage documents, projects, customer relationship and email correspondence, all in one place. It's a portal version intended for those who decided to install and configure this solution on their own server. This installation guide is designed to give the user the possibility to compile and deploy all the system components from the source codes without any additional help. The guide is intended for the users with the knowledge and skills of Microsoft Windows based server administration.</p>
<p><b>Community Server</b> includes the following components:</p>
<ul>
<li><b>OnlyOfficeJabber</b> - instant messages service;</li>
<li><b>OnlyOfficeNotify</b> - notifications via email service;</li>
<li><b>OnlyOfficeIndex</b> - service necessary for the full text search;</li>
<li><b>OnlyOfficeFeed</b> - service responsible for the portal news feed analysis and layout;</li>
<li><b>OnlyOfficeBackup</b> - service responsible for the backup creation, download and deployment;</li>
<li><b>OnlyOfficeAutoReply</b> - service necessary for the automatic reply to comments to different portal entities and for creation of new entities via email;</li>
<li><b>OnlyOfficeSignalR</b> - service necessary for the message exchange in the Talk tool embedded in a web page;</li>
<li><b>OnlyOfficeMailAggregator</b>, <b>OnlyOfficeMailWatchdog</b> - Windows services that aggregate and save mail messages in the <b>Mail</b> module. The detailed information on these services configuration and work can be found in the following files:
<ul>
<li>module\ASC.Mail.Aggregator\ASC.Mail.Aggregator.CollectionService\ReadMe.txt</li>
<li>module\ASC.Mail.Aggregator\ASC.Mail.Aggregator.CollectionService\Requirements.txt</li>
<li>module\ASC.Mail.Aggregator\ASC.Mail.Watchdog.Service\ReadMe.txt</li>
</ul>
</li>
<li><b>WebStudio</b> - web site where all the portal products and modules are located;</li>
<li>Auxiliary tools.</li>
</ul>
</div>
</div>
</div>
<h2 id="SystemRequirements">System requirements</h2>
<div class="block_of_step">
<div class="screen_text">
<p><b>Hardware</b></p>
<ul>
<li>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/SystemRequirements/SysReqs_CPU/SysReqs_CPU.ascx" />
</li>
<li>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/SystemRequirements/SysReqs_RAM/SysReqs_RAM.ascx" />
</li>
<li>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/SystemRequirements/SysReqs_HDD/SysReqs_HDD.ascx" />
</li>
</ul>
<p><b>Software</b></p>
<ul>
<li>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/SystemRequirements/SysReqs_OS1/SysReqs_OS1.ascx" />
</li>
<li>Microsoft <b>.NET Framework</b> 4.5;</li>
<li><b>Internet Information Services</b> 7 or later with following <b>modules</b>:
<ul>
<li>Internet Information Services Manager;</li>
<li>Default Document; Directory Browsing; HTTP Errors; HTTP Redirection; Static Content;</li>
<li>.NET Extensibility (for Microsoft Windows 7, Microsoft Windows Server 2008 (R2));</li>
<li>.NET Extensibility 3.5; .NET Extensibility 4.5 (for Microsoft Windows 8, Microsoft Windows 8.1, Microsoft Windows Server 2012(R2), Microsoft Windows Server 2016);</li>
</ul>
</li>
<li><b>MySQL Server</b> 5.5 or later;</li>
<li><b>Web Browser</b>: Microsoft Internet Explorer 9 or later, latest versions of Mozilla Firefox, Opera, Safari, Google Chrome.</li>
</ul>
</div>
</div>
<h2 id="DatabaseSetup">Database Setup</h2>
<div class="block_of_step">
<div class="screen_text">
<p><b>Community Server</b> works with MySql database. Perform the following steps to be able to work with the standard configuration:</p>
<ol>
<li>Make sure that MySql Server 5.5 or later version is installed on your local server;</li>
<%-- <li>Set the <code>onlyoffice</code> password for the <b>root</b> user;</li>--%>
<li>Create a new database with the <code>onlyoffice</code> name;</li>
<li>Run sql-scripts from the <code>build\sql\</code> folder
<ul>
<li>for the installation, run the following scripts one-by-one:
<pre><code>onlyoffice.sql
onlyoffice.data.sql
onlyoffice.resources.sql
</code></pre>
</li>
<li>for the upgrade, run the <code>onlyoffice.upgrade*.sql</code> in the version ascending order.</li>
</ul>
</li>
</ol>
<div class="notehelp">
The scripts with the data (the ones with the .data.sql in their names) must be run without opening them for editing as the script size is large.
</div>
<p>In case you do not want to use the standard configuration, you can choose your own user name, password or select a database name. Perform the following steps to do that:</p>
<ol>
<li>Use any text editor to create a text file and write a database connection string with the following format:
<pre><code>Server=<em>{ServerName}</em>;Database=<em>{DatabaseName}</em>;User ID=<em>{UserName}</em>;Password=<em>{UserPassword}</em>;Pooling=True;Character Set=utf8
</code></pre>
<p>The below parameters can be used (please do not use the curly brackets when substituting the actual values):</p>
<ul>
<li><code>{ServerName}</code> - IP address or network name of the computer with the MySql Server software installed;</li>
<li><code>{DatabaseName}</code> - the name of the database used to save <b>Community Server</b> data;</li>
<li><code>{UserName}</code> - the account name used to connect to the database. Make sure that this account has the write access rights and permissions to add lines from the database table;</li>
<li><code>{UserPassword}</code> - the password for the account used to connect to the database.</li>
</ul>
</li>
<li>Change all the connection strings with the resulting string in the following files:
<ul>
<li><code>web\studio\ASC.Web.Studio\web.connections.config</code></li>
<li><code>build\config\TeamLabSvc.exe.config</code></li>
<li><code>module\ASC.Mail.Aggregator\ASC.Mail.Aggregator.CollectionService\App.config</code></li>
<li><code>module\ASC.Mail.Aggregator\ASC.Mail.Watchdog.Service\App.config</code></li>
</ul>
</li>
<li>Run sql-scripts from the <code>build\sql\</code> folder
<ul>
<li>for the installation, run the following scripts one-by-one:
<pre><code>onlyoffice.sql
onlyoffice.data.sql
onlyoffice.resources.sql
</code></pre>
</li>
<li>for the upgrade, run the <code>onlyoffice.upgrade*.sql</code> in the version ascending order.</li>
</ul>
</li>
</ol>
<div class="notehelp">
The scripts with the data (the ones with the .data.sql in their names) must be run without opening them for editing as the script size is large.
</div>
</div>
</div>
<h2 id="ServerCompilation">Community Server Compilation</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Go to the <code>build</code> folder and compile the source code using the <code>BuildAndDeploy.bat</code> file. Once the compilation is over the binary files for <b>Community Server</b> will be located in the <code>\build\deploy\OPENSOURCE.SERVER</code> folder.</p>
</div>
</div>
<h2 id="ServerDeployment">Community Server Deployment</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Say you want to deploy your <b>Community Server</b> in the <code>С:\ONLYOFFICE</code> directory. You can choose any other directory name. In this case change <code>С:\ONLYOFFICE</code> for the path to this directory.</p>
<ol>
<li>Create the <code>С:\ONLYOFFICE</code> directory;</li>
<li>Copy all the contents of the <code>\build\deploy\OPENSOURCE.SERVER</code> folder to the created <code>С:\ONLYOFFICE</code> folder.</li>
</ol>
<div class="notehelp">
All the portal data is saved in the <code>Data</code> and <code>WebStudio</code> folders. In the <code>Data</code> folder the documents uploaded or created in the <b>Documents</b> module are placed, all the attachments saved using the mail aggregator are also placed there.
</div>
</div>
</div>
<h2 id="ServicesInstallation">Communuty Server Services Installation</h2>
<div class="block_of_step">
<div class="screen_text">
<ol>
<li>The <code>ManageServices.bat</code> auxiliary file located in the <code>Services</code> folder is used for the services installation. First of all go to the root directory executing the following command in the Windows command line:
<pre><code>cd "C:\ONLYOFFICE\Services\TeamLabSvc".
</code></pre>
<p>Then execute the <code>ManageServices.bat --install-all</code> command to create services.</p>
</li>
<li>Install <b>OnlyOfficeMailAggregator</b> as a Windows service. Using the Windows command line run the following command:
<pre><code>sc create OnlyOfficeMailAggregator binpath= "C:\ONLYOFFICE\Services\MailAggregator\ASC.Mail.Aggregator.CollectionService.exe" start= auto
</code></pre>
</li>
<li>Install <b>OnlyOfficeMailWatchdog</b> as a Windows service. Using the Windows command line run the following command:
<pre><code>sc create OnlyOfficeMailWatchdog binpath= "C:\ONLYOFFICE\Services\MailWatchdog\ASC.Mail.Watchdog.Service.exe" start= auto
</code></pre>
</li>
</ol>
<div class="notehelp">To set up full text search in <b>Community Server</b> you will need to do the following:
<ol>
<li>Download <code>sphinx</code> version 2.2.10 from the <a target="_blank" href="http://sphinxsearch.com/downloads/sphinx-2.2.10-release-win32.zip/thankyou.html">official website</a></li>
<li>Unpack the downloaded archive file to some place, e.g. to <code>C:\Program Files\Sphinx-2.2.10</code></li>
<li>Add path to the <code>bin</code> Sphinx directory (e.g. <code>C:\Program Files\Sphinx-2.2.10\bin</code> to the <b>system</b> (<b>NOT</b> user) PATH environment variable.</li>
<li>Change the <b>OnlyofficeIndex</b> launch type from <code>disabled</code> to <code>automatic</code> and run it.</li>
</ol>
<br />Automatic installation is not supported for Windows due to licensing restrictions.
</div>
</div>
</div>
<h2 id="IISConfiguration">Internet Information Services Configuration</h2>
<div class="block_of_step">
<div class="screen_text">
<p><b>Community Server</b> uses Internet Information Services for web site management. Please notice that some parameters might imply that the site is available via the standard port <b>80</b> in case of http connection and via port <b>443</b> in case of https connection. It is not recommended to assign any other ports bindings for the web site.</p>
<p>For the proper IIS work you need to install the additional IIS components:</p>
<ul>
<li><a target="_blank" href="https://www.iis.net/downloads/microsoft/application-request-routing">Application Request Routing</a> - you can download it here - <a target="_blank" href="https://www.iis.net/downloads/microsoft/application-request-routing">https://www.iis.net/downloads/microsoft/application-request-routing</a>. After the download, run the installation file and follow the wizard. Then go to the IIS manager, open ARR settings and check the <b>Enable proxy</b> check-box.</li>
<li><a target="_blank" href="https://www.iis.net/downloads/microsoft/url-rewrite">URL Rewrite Module</a> - you can download it here - <a target="_blank" href="https://www.iis.net/downloads/microsoft/url-rewrite">https://www.iis.net/downloads/microsoft/url-rewrite</a>. After the download, run the installation file and follow the wizard. Then go to the <b>Control Panel</b>, choose <b>Programs and Features</b>, then <b>Turn Windows features on or off</b> and there expand <b>Internet Information Services</b> > <b>World Wide Web Services</b> > <b>Application Development Features</b> and check the <b>WebSocket Protocol</b> option. Click <b>OK</b> and wait until the feature is installed.</li>
</ul>
<p>Now you can continue with the IIS setup:</p>
<ol>
<li>Open the Internet Information Services Manager.</li>
<li>Add a web site named <em>ONLYOFFICE CommunityServer</em>. Point out the <code>C:\ONLYOFFICE\WebStudio</code> folder as a path to the site.</li>
<li>Make sure that your web site uses .Net Framework 4.0. For that go to <b>Application Pools</b> settings and find the application pool for your site (by default the application pool name coincides with the site name). In the <b>Edit Application Pool</b> section select <b>Basic Settings</b>. Set the .Net Framework 4.0 in the .NET Framework Version and save the changes.</li>
<li>Add a virtual <b>mailattachments</b> directory to the just created web site. Set the <code>C:\ONLYOFFICE\Data</code> as a path to the directory. This virtual directory is necessary for some of the mail aggregator functions correct work.</li>
<li>Both the account used for the site work and IUSR account must have maximal access rights to the <code>C:\ONLYOFFICE</code> directory. To do that:
<ul>
<li>Select the <em>"Security"</em> tab in the <code>C:\ONLYOFFICE</code> properties;</li>
<li>Click <em>"Edit..."</em>;</li>
<li>Click <em>"Add..."</em> to add a new group or a single user;</li>
<li>Add the <em>IUSR</em> user in the opened dialog window. When adding make sure that your local server is set in the <em>"From this location"</em> field. Use the <em>"Check Names"</em> button to see if the system can find this user.</li>
</ul>
</li>
<li>For the <b>Documents</b> module correct work it is necessary that the Windows <b>WCF Http Activation</b> component was enabled. To do that run the <em>Programs And Features</em> window from the Windows control panel, select <em>Turn Windows Features On or Off</em>, expand the <em>.NET Framework 3.5</em> list, check <em>WCF Http Activation</em> and save the changes. In case you use <b>Windows 8</b> or <b>Windows Server 2012</b> also check the <em>Http Activation</em> component in the <em>.NET Framework 4.5/WCF Services</em> tab.</li>
</ol>
</div>
</div>
<h2 id="AddingFirewallRules">Adding Firewall Rules</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Some of the <b>Community Server</b> functions such as notification server, IM server and mail aggregator can require Internet access via specific ports. For these services correct work add the following programs to your Firewall exceptions list:</p>
<ul>
<li>C:\ONLYOFFICE\Services\TeamLabSvc\TeamLabSvc.exe</li>
<li>C:\ONLYOFFICE\Services\MailAggregator\ASC.Mail.Aggregator.CollectionService.exe</li>
</ul>
</div>
</div>
<h2 id="PortalSetup">Community Server Portal Setup</h2>
<div class="block_of_step">
<div class="screen_text">
<p>If you performed all the steps, then your <b>Community Server</b> portal should be available at the <span class="param-type">http://communityserver</span> address. To start work with the portal follow the wizard and set up the following parameters:</p>
<ul>
<li><b>Password</b>: Enter the password you are going to use for the portal access and confirm it. The password must be at least 6 characters long.</li>
<li><b>Email address</b>: The request for the address confirmation will be sent to the entered mailbox. Use the link from that email message to complete the registration procedure.</li>
<li>Set <b>Language</b> and <b>Time Zone</b> parameters.</li>
</ul>
<p>When all the parameters are set, click the <b>Save</b> button.</p>
<p>That's all! Your portal is created. Choose one of the available modules to start exploring <b>Community Server</b>.</p>
</div>
</div>
</div>