Uploaded mssql, oracle db; removed postgresql

This commit is contained in:
trovier 2024-03-14 15:21:41 +01:00
parent dbd41154bb
commit 3b5e1bdec5
10 changed files with 167 additions and 177 deletions

View File

@ -5140,7 +5140,10 @@
<data name="ConnectDamengTitle" xml:space="preserve">
<value>Connecting Dameng database to ONLYOFFICE Docs</value>
</data>
<data name="ConnectPostgresQLTitle" xml:space="preserve">
<value>Connecting PostgresQL database to ONLYOFFICE Docs</value>
<data name="ConnectOracleTitle" xml:space="preserve">
<value>Connecting Oracle database to ONLYOFFICE Docs</value>
</data>
<data name="ConnectMsSQLTitle" xml:space="preserve">
<value>Connecting MsSQL database to ONLYOFFICE Docs</value>
</data>
</root>

View File

@ -1,3 +1,3 @@
<%@ Control Language="C#" %>
<a class="crm-task-title sm_tipstricks sm_saas sm_documents" id="link_182" title="<asp:Literal runat="server" Text="<%$ Resources:Resource, ConnectPostgresQLTitle %>" />"
href="<%=VirtualPathUtility.ToAbsolute("~/installation/docs-connect-postgresql.aspx")%>"><asp:Literal runat="server" Text="<%$ Resources:Resource, ConnectPostgresQLTitle %>" /></a>
<a class="crm-task-title sm_tipstricks sm_saas sm_documents" id="link_182" title="<asp:Literal runat="server" Text="<%$ Resources:Resource, ConnectOracleTitle %>" />"
href="<%=VirtualPathUtility.ToAbsolute("~/installation/docs-connect-oracle.aspx")%>"><asp:Literal runat="server" Text="<%$ Resources:Resource, ConnectOracleTitle %>" /></a>

View File

@ -0,0 +1,3 @@
<%@ Control Language="C#" %>
<a class="crm-task-title sm_tipstricks sm_saas sm_documents" id="link_183" title="<asp:Literal runat="server" Text="<%$ Resources:Resource, ConnectMsSQLTitle %>" />"
href="<%=VirtualPathUtility.ToAbsolute("~/installation/docs-connect-mssql.aspx")%>"><asp:Literal runat="server" Text="<%$ Resources:Resource, ConnectMsSQLTitle %>" /></a>

View File

@ -50,7 +50,8 @@
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/ArticlesCompleteList/GettingStarted/205_configure_jwt.ascx" /></li>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/installation/docs-configure-ipfilter.aspx")%>">Configuring IP filter for ONLYOFFICE Docs</a></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/ArticlesCompleteList/TipsTricks/181_connect_dameng.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/ArticlesCompleteList/TipsTricks/182_connect_postgresql.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/ArticlesCompleteList/TipsTricks/182_connect_oracle.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/ArticlesCompleteList/TipsTricks/183_connect_mssql.ascx" /></li>
</ul>
</li>
<li><h6>System requirements</h6>

View File

@ -0,0 +1,67 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls"%>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Connecting MsSQL database to ONLYOFFICE Docs";
MetaKeyWords = "mssql, database, editors";
MetaDescription = "Connect MsSQL database to ONLYOFFICE Docs";
}
</script>
<div class="main_buscall_container dataBackup">
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption TipsCaption">Connecting MsSQL database to ONLYOFFICE Docs</h1>
<div class="keyword_block">
<ul>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/document-server/document-server.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/server-version/server-version.ascx" /></li>
</ul>
</div>
<p>Currently, there are no Docker variables that allow connecting with MsSQL; the user must perform the steps manually. The steps to connect MsSQL database to ONLYOFFICE Docs are as follows:</p>
<ol>
<li>
Install ONLYOFFICE Docs:
<pre><code>sudo docker run -i -t -d -p 80:80 --name onlyoffice \
onlyoffice/documentserver-ee</code></pre>
</li>
<li>
Install MsSQL on the same or a separate server:
<pre><code>sudo docker run -p 8080:1433 -d --name mssql \
-e "ACCEPT_EULA=Y" \
-e "MSSQL_SA_PASSWORD=onlYoff1ce" \
mcr.microsoft.com/mssql/server:2022-latest
</code></pre>
</li>
<li>
Download a script for creating tables and copy it to the container; afterwards, create a database and run the script:
<pre><code>wget https://github.com/ONLYOFFICE/server/raw/master/schema/mssql/createdb.sql
sudo docker cp ./createdb.sql mssql:/
sudo docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -Q "CREATE DATABASE onlyoffice;"
sudo docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -Q "GO"
sudo docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -i /createdb.sql
</code></pre>
</li>
<li>
Change the parameters responsible for establishing a connection in <code>local.json</code> and switch Document Server to mssql:
<pre><code>sudo docker exec -it onlyoffice bash
nano /etc/onlyoffice/documentserver/local.json
{
"services": {
"CoAuthoring": {
"sql": {
"type": "mssql",
"dbHost": "<mssql_ip_or_hostname>",
"dbPort": "8080",
"dbName": "onlyoffice",
"dbUser": "sa",
"dbPass": "onlYoff1ce"
...
# supervisorctl restart all
</code></pre>
</li>
</ol>
</div>
</div>

View File

@ -0,0 +1,63 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls"%>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Connecting Oracle database to ONLYOFFICE Docs";
MetaKeyWords = "oracle, database, editors";
MetaDescription = "Connect Oracle database to ONLYOFFICE Docs";
}
</script>
<div class="main_buscall_container dataBackup">
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption TipsCaption">Connecting Oracle database to ONLYOFFICE Docs</h1>
<div class="keyword_block">
<ul>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/document-server/document-server.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/server-version/server-version.ascx" /></li>
</ul>
</div>
<p>Currently, there are no Docker variables that allow connecting with Oracle; the user must perform the steps manually. The steps to connect Oracle database to ONLYOFFICE Docs are as follows:</p>
<ol>
<li>
Install ONLYOFFICE Docs:
<pre><code>sudo docker run -i -t -d -p 80:80 --name onlyoffice \
onlyoffice/documentserver-ee</code></pre>
</li>
<li>
Install Oracle on the same or a separate server:
<pre><code>docker run --name oracle -p 8080:1521 -p 8081:5500 \
-e ORACLE_PASSWORD=admin \
-e APP_USER=onlyoffice \
-e APP_USER_PASSWORD=onlyoffice \
-d gvenzl/oracle-xe:21-slim
</code></pre>
</li>
<li>
Download a script for creating tables and copy it to the container; afterwards, create a database and run the script:
<pre><code>wget https://github.com/ONLYOFFICE/server/raw/master/schema/oracle/createdb.sql
docker cp ./createdb.sql oracle:/
docker exec oracle sqlplus -s onlyoffice/onlyoffice@//localhost/xepdb1 @/createdb.sql
</code></pre>
</li>
<li>
Change the parameters responsible for establishing a connection in <code>local.json</code> and switch Document Server to mssql:
<pre><code>sudo docker exec -it onlyoffice bash
nano /etc/onlyoffice/documentserver/local.json
"services": {
"CoAuthoring": {
"sql": {
"type": "oracle",
"dbHost": "<oracle_ip_or_hostname>",
"dbPort": "8080",
"dbName": "xepdb1",
"dbUser": "onlyoffice",
"dbPass": "onlyoffice"
...
</code></pre>
</li>
</ol>
</div>
</div>

View File

@ -1,169 +0,0 @@
<%@ Control Language="C#" Inherits="BaseContentUserControls"%>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Connecting PostgresQL database to ONLYOFFICE Docs";
MetaKeyWords = "postgresql, database, editors";
MetaDescription = "Connect PostgresQL database to ONLYOFFICE Docs";
}
</script>
<div class="main_buscall_container dataBackup">
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption TipsCaption">Connecting PostgresQL database to ONLYOFFICE Docs</h1>
<div class="keyword_block">
<ul>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/document-server/document-server.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/server-version/server-version.ascx" /></li>
</ul>
</div>
<h2>Installing and configuring PostgreSQL for Debian, Ubuntu, and derivatives</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Install the PostgreSQL version included in your version of Ubuntu:</p>
<pre><code>sudo apt-get install postgresql </code></pre>
<p>If you want to install some other PostgreSQL version from the PostgreSQL Repository, please see the <a href="https://www.postgresql.org/download/linux/ubuntu/">official PostgreSQL documentation</a> for more detail on that.</p>
<p>After PostgreSQL is installed, create the PostgreSQL database and user:</p>
<p>The database user must have the <b>onlyoffice</b> name. You can specify any password.</p>
<pre><code>sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH PASSWORD 'onlyoffice';"</code></pre>
<pre><code>sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice OWNER onlyoffice;"</code></pre>
<p>For more information, please refer to the <a href="https://helpcenter.onlyoffice.com/installation/docs-enterprise-install-ubuntu.aspx">full guide on installing ONLYOFFICE Docs for Debian, Ubuntu, and derivatives</a>.</p>
</div>
</div>
<h2>Installing and configuring PostgreSQL for CentOS and derivatives</h2>
<div class="block_of_step">
<div class="screen_text">
<p><b>Install the PostgreSQL</b> version included in your version of CentOS:</p>
<pre><code>sudo yum install postgresql postgresql-server</code></pre>
<ol>
<li>
<b>Initialize the PostgreSQL database:</b>
<pre><code>sudo service postgresql initdb</code></pre>
<pre><code>sudo chkconfig postgresql on</code></pre>
<p>On CentOS 9, <code>chkconfig</code> is not installed by default. Install it using the following command:</p>
<pre><code>sudo yum install chkconfig</code></pre>
</li>
<li>
<b>Turn on the 'trust' authentication method</b> for IPv4 and IPv6 <code>localhost</code>:
<ol>
<li>Open the <code>/var/lib/pgsql/data/pg_hba.conf</code> file in a text editor.</li>
<li>
Find the <code>host all all 127.0.0.1/32 ident</code> string and replace it with the following one.
<pre><code>host all all 127.0.0.1/32 trust</code></pre>
</li>
<li>
Then find the <code>host all all ::1/128 ident</code> string and replace it with the following one:
<pre><code>host all all ::1/128 trust</code></pre>
</li>
</ol>
</li>
<li>Save the changes.</li>
</ol>
<p><b>Restart the PostgreSQL service:</b></p>
<pre><code>sudo service postgresql restart</code></pre>
<p><b>Create the PostgreSQL database and user:</b></p>
<ol>
<li>You can specify any user name and password.</li>
<li>
First run the following command:
<pre><code>cd /tmp </code></pre>
to prevent the <code>could not change directory to "/root"</code> warning if running from root.
</li>
<li>
Then the database and the user must be created:
<pre><code>sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH PASSWORD 'onlyoffice';"</code></pre>
<pre><code>sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice OWNER onlyoffice;"</code></pre>
</li>
</ol>
<p>For more information, please refer to the <a href="https://helpcenter.onlyoffice.com/installation/docs-enterprise-install-centos.aspx">full guide on installing ONLYOFFICE Docs for CentOS and derivatives</a>.</p>
</div>
</div>
<h2>Installing and configuring PostgreSQL for Linux</h2>
<div class="block_of_step">
<div class="screen_text">
<h3>Updating PostgresQL on Linux</h3>
<p>The database schema has been changed in v6.3. When updating to v6.3, you may also need to upgrade the database schema to ensure the ability to use the <a href="https://helpcenter.onlyoffice.com/ONLYOFFICE-Editors/ONLYOFFICE-Document-Editor/HelpfulHints/Password.aspx">password protection</a> feature. </p>
<ol>
<li>
Download the script for upgrading the database schema.
<ul>
<li>For PostgreSQL: https://github.com/ONLYOFFICE/server/blob/develop/schema/postgresql/upgrade/upgradev630.sql</li>
<li>For MySQL: https://github.com/ONLYOFFICE/server/blob/develop/schema/mysql/upgrade/upgradev630.sql</li>
</ul>
</li>
<li>
Execute the script using the command line.
<ul>
<li>For PostgreSQL: <code>psql -U onlyoffice -W onlyoffice < {path-to-upgradev630.sql}</code></li>
<li>For MySQL: <code>mysql -u root -p onlyoffice < {path-to-upgradev630.sql}</code></li>
</ul>
</li>
<li>Specify the password used when creating the database (onlyoffice).</li>
</ol>
</div>
</div>
<h2>Creating a database</h2>
<div class="block_of_step">
<div class="screen_text">
<p>You can create a database using the <b>pgAdmin</b> tool or <b>Command Prompt</b>.</p>
<div class="notehelp nh_notice">You can specify any user name and password.</div>
<p><b>Method 1</b></p>
<ol>
<li>
Run the <code>"%ProgramFiles%\PostgreSQL\12\pgAdmin 4\bin\pgAdmin4.exe"</code> executable file.
</li>
<li>
In the <b>pgAdmin</b> window, connect to the <b>PostgreSQL server</b> and create a new login role named <code>onlyoffice</code> with the <code>onlyoffice</code> password. To do that perform the following steps:
<ol>
<li>Right-click on the <b>Login/Group Roles</b> item in the left-side menu and select <b>Create</b> -> <b>Login/Group Role</b>.</li>
<li>In a new window that opens enter <code>onlyoffice</code> in the <b>Name</b> field.
<div class="screen_block">
<img alt="Installing ONLYOFFICE Docs" target="img9_eventcom_guides" class="screenphoto screen_guides noresize" src="<%=VirtualPathUtility.ToAbsolute("~/images/Help/Guides/small/guide86/step10.png")%>" />
<img alt="Installing ONLYOFFICE Docs" id="img9_eventcom_guides" class="bigphoto_screen" src="<%=VirtualPathUtility.ToAbsolute("~/images/Help/Guides/big/guide86/step10.png")%>" />
<div target="img9_eventcom_guides" class="screenphoto magnifier"></div>
</div>
</li>
<li>Switch to the <b>Definition</b> tab and enter <code>onlyoffice</code> in the <b>Password</b> field.</li>
<li>Go to the <b>Privileges</b> tab and click on the <b>Can login?</b> switcher to set the <b>Yes</b> value.
<div class="screen_block">
<img alt="Installing ONLYOFFICE Docs" target="img12_eventcom_guides" class="screenphoto screen_guides noresize" src="<%=VirtualPathUtility.ToAbsolute("~/images/Help/Guides/small/guide86/step10-2.png")%>" />
<img alt="Installing ONLYOFFICE Docs" id="img12_eventcom_guides" class="bigphoto_screen" src="<%=VirtualPathUtility.ToAbsolute("~/images/Help/Guides/big/guide86/step10-2.png")%>" />
<div target="img12_eventcom_guides" class="screenphoto magnifier"></div>
</div>
</li>
<li>Click the <b>Save</b> button.</li>
</ol>
</li>
<li>
Create the <code>onlyoffice</code> database, choosing the created login role <code>onlyoffice</code> as an owner.
<p>To do that, right-click on the <b>Databases</b> item in the left-side menu, select <b>Create</b> -> <b>Database...</b>. In a new window that opens enter <code>onlyoffice</code> in the <b>Database</b> field and select the <code>onlyoffice</code> role in the <b>Owner</b> list, then click <b>Save</b>.</p>
<div class="screen_block">
<img alt="Installing ONLYOFFICE Docs" target="img10_eventcom_guides" class="screenphoto screen_guides noresize" src="<%=VirtualPathUtility.ToAbsolute("~/images/Help/Guides/small/guide86/step11.png")%>" />
<img alt="Installing ONLYOFFICE Docs" id="img10_eventcom_guides" class="bigphoto_screen" src="<%=VirtualPathUtility.ToAbsolute("~/images/Help/Guides/big/guide86/step11.png")%>" />
<div target="img10_eventcom_guides" class="screenphoto magnifier"></div>
</div>
</li>
</ol>
<p><b>Method 2</b></p>
<p>Run the <b>Command Prompt</b> (press the <code>win+r</code> key combination, type in <code>cmd</code> and press <b>Enter</b>).</p>
<p>Consistently execute the following commands:</p>
<pre><code>cd "%ProgramFiles%\PostgreSQL\12\bin"
psql -U postgres -c "CREATE USER onlyoffice WITH PASSWORD 'onlyoffice';"
psql -U postgres -c "CREATE DATABASE onlyoffice OWNER onlyoffice;"
</code></pre>
<div class="screen_block">
<img alt="Installing ONLYOFFICE Docs" target="img11_eventcom_guides" class="screenphoto screen_guides noresize" src="<%=VirtualPathUtility.ToAbsolute("~/images/Help/Guides/small/guide86/step12.png")%>" />
<img alt="Installing ONLYOFFICE Docs" id="img11_eventcom_guides" class="bigphoto_screen" src="<%=VirtualPathUtility.ToAbsolute("~/images/Help/Guides/big/guide86/step12.png")%>" />
<div target="img11_eventcom_guides" class="screenphoto magnifier"></div>
</div>
<p>For more information, please refer to the <a href="https://helpcenter.onlyoffice.com/installation/docs-enterprise-install-windows.aspx">full guide on installing ONLYOFFICE Docs for Windows</a></p>
</div>
</div>
</div>
</div>

View File

@ -1,7 +1,7 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/InstallationGuides/InstallationDocsEEArticles.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="docs_connect_dameng">
<body class="common_all_os document_server installation_docs">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />

View File

@ -1,13 +1,13 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/InstallationGuides/InstallationDocsEEArticles.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="docs_connect_postgresql">
<body class="common_all_os document_server installation_docs">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Document/DocsConnectPostgresQL/DocsConnectPostgresQL.ascx" />
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Document/DocsConnectMsSQL/DocsConnectMsSQL.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">

View File

@ -0,0 +1,22 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/InstallationGuides/InstallationDocsEEArticles.master" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<asp:Content ID="Content4" ContentPlaceHolderID="pagebodyidpage" runat="Server">
<body class="common_all_os document_server installation_docs">
</asp:Content>
<asp:Content ID="content3" ContentPlaceHolderID="breadstop" runat="server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/TopControls/DocumentServerTop/DocumentServerTop.ascx" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Document/DocsConnectOracle/DocsConnectOracle.ascx" />
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="leftmenupage" runat="server">
<div class="guidespage document">
<div id="SeeAlsoBlockLinks">
<div class="caption guides one">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/ArticlesCompleteList/GettingStarted/166_owncloud.ascx" />
</div>
<div class="caption video one">
<cc:localizecontent runat="Server" controlname="~/Controls/Help/ArticlesCompleteList/Video/150_integrate_owncloud.ascx" />
</div>
</div>
</asp:Content>