Peb tsa 1c server nrog kev tshaj tawm cov ntaub ntawv thiab cov kev pabcuam hauv web ntawm Linux

Peb tsa 1c server nrog kev tshaj tawm cov ntaub ntawv thiab cov kev pabcuam hauv web ntawm Linux

Hnub no kuv xav qhia koj yuav ua li cas tsa 1c server ntawm linux debian 9 nrog kev tshaj tawm cov kev pabcuam hauv lub vev xaib.

Cov kev pabcuam hauv web 1c yog dab tsi?

Cov kev pabcuam hauv web yog ib lub platform mechanisms siv rau kev koom ua ke nrog lwm cov ntaub ntawv systems. Nws yog ib txoj hauv kev txhawb nqa SOA (Service-Oriented Architecture) - kev pabcuam-oriented architecture, uas yog tus qauv niaj hnub rau kev sib koom ua ke cov ntawv thov thiab cov ntaub ntawv. Qhov tseeb, qhov no yog lub sijhawm los tsim ib nplooj ntawv html nrog cov ntaub ntawv, uas tuaj yeem nkag mus los ntawm lwm daim ntawv thov thiab rov qab tau.

Pros - ua haujlwm sai (txawm tias muaj cov ntaub ntawv loj heev), kuj yooj yim.

Cons - koj tus programmer 1c yuav yws rau koj ntev thaum sau lub vev xaib rau koj cov ntaub ntawv. Cov khoom yog heev peculiar nyob rau hauv kev sau ntawv.

Kuv yuav tsis qhia koj yuav sau li cas web kev pabcuam... Kuv yuav qhia koj yuav ua li cas luam tawm nws ntawm Linux los ntawm server console, nrog rau me ntsis txog kev txhim kho 1c server ntawm Linux.

Thiab yog li, peb muaj debian 9 netinst, cia peb pib:

Nruab PostgresPro (Thov nco ntsoov tias nws tsis pub dawb, thiab tsuas yog muab faib ua ib feem ntawm kev paub txog qhov muaj peev xwm):

# apt-get update -y

# apt-get install -y wget gnupg2 || apt-get install -y gnupg

# wget -O - http://repo.postgrespro.ru/keys/GPG-KEY-POSTGRESPRO | apt-key add -

# echo deb http://repo.postgrespro.ru/pgpro-archive/pgpro-11.4.1/debian stretch main > /etc/apt/sources.list.d/postgrespro-std.list

# apt-get update -y
# apt-get install -y postgrespro-std-11-server
# /opt/pgpro/std-11/bin/pg-setup initdb
# /opt/pgpro/std-11/bin/pg-setup service enable
# service postgrespro-std-11 start
# su - postgres
# /opt/pgpro/std-11/bin/psql -U postgres -c "alter user postgres with password 'Π’Π°ΡˆΠŸΠ°Ρ€ΠΎΠ»ΡŒ';"

Cia peb qhia postgresql kom mloog txhua qhov chaw nyob thiab tsis yog localhost xwb

# nano /var/lib/pgpro/std-11/data/postgresql.conf

Uncomment thiab hloov qhov chaw nyob los mloog:

...
#listen_addresses = 'localhost'
...

rau

...
listen_addresses = '*'
...

Tom ntej no, cia peb tso cai rau cov neeg siv los ntawm peb lub network nkag mus

# nano /var/lib/pgpro/std-11/data/pg_hba.conf

Cia peb hloov:

# IPv4 kev sib txuas hauv zos:
host tag nrho 127.0.0.1/32 md5

rau

host tag nrho 192.168.188.0/24 md5
host tag nrho 127.0.0.1/32 md5

Koj tuaj yeem nyeem ntxiv txog ntau yam kev teeb tsa Postgres rau 1s S, SΡ“S,.

Ntxiv mus, peb muab 1s server.

Upload archive downloaded los ntawm 1c site mus rau lub server (hauv kuv rooj plaub, deb64_8_3_15_1534.tar.gz)


# tar -xzf deb64_8_3_15_1534.tar.gz

# dpkg -i *.deb

ob peb yam me me ntxiv:

# apt install imagemagick unixodbc libgsf-bin

Tam sim no cia peb nruab Apache2

# apt install apache2

Los ntawm kev tswj hwm console lossis los ntawm 1c tus neeg siv khoom, peb tsim cov ntaub ntawv thiab sau rau hauv peb qhov kev teeb tsa ...

Tam sim no peb luam tawm lub database:

mus rau daim ntawv tais ceev tseg nrog 1s.

# cd /opt/1C/v8.3/x86_64/

./webinst -publish -apache24 -wsdir Test -dir /var/www/test/ -connstr  "Srvr=10.7.12.108;Ref=test;" -confPath /etc/apache2/apache2.conf

Peb nce mus rau var/www/test/ thiab pom dab tsi tshwm sim muaj.

# cd /var/www/test
# nano default.vrd

Β«

v8.1c.ru/8.2/virtual-resource-system"
href="http://www.w3.org/2001/XMLSchema">www.w3.org/2001/XMLSchema"
href="http://www.w3.org/2001/XMLSchema-instance">www.w3.org/2001/XMLSchema-instance"
base="/Test"
ib="Srvr=192.168.188.150;Ref=Test;">
<standardOdata enable=Β«falseΒ»
reuseSessions = "autouse"
sessionMaxAge = "20"
poolSize = "10"
poolTimeout="5" />

Β«

Cov no yog cov tswv yim uas xav tau los tso tawm 1c lub vev xaib neeg siv ... tam sim no koj tuaj yeem nkag mus rau peb cov ntaub ntawv xeem los ntawm qhov browser ntawm qhov chaw nyob "http://ServerAddress/Test" (cov ntaub ntawv tseem ceeb! Qhov no yog Linux) lossis qhia cov "qhov chaw nyob hom" chaw nyob hauv tus neeg siv http://ServerAddress/Test" thiab tus neeg siv yuav ua haujlwm nrog cov ntaub ntawv luam tawm.

TAB SIS

Tab sis dab tsi txog cov kev pabcuam hauv web? (hauv kuv qhov kev sim teeb tsa muaj ob ntawm lawv: WebBuh rau cov ntaub ntawv pauv nrog kev suav nyiaj thiab toplog kev koom ua ke nrog wms system ntawm lub tuam txhab ntawm tib lub npe).

Zoo, cia peb ntxiv ob peb kab rau peb cov ntaub ntawv vrd ...


v8.1c.ru/8.2/virtual-resource-system"
href="http://www.w3.org/2001/XMLSchema">www.w3.org/2001/XMLSchema"
href="http://www.w3.org/2001/XMLSchema-instance">www.w3.org/2001/XMLSchema-instance"
base="/TestWeb"
ib="Srvr=IP_addres;Ref=TestWebServ">
<standardOdata enable=Β«falseΒ»
reuseSessions = "autouse"
sessionMaxAge = "20"
poolSize = "10"
poolTimeout="5" />

# Π’ΠΎΡ‚ Ρ‚ΡƒΡ‚ начинаСтся ΠΊΠΎΠ΄ ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ ΠΏΡƒΠ±Π»ΠΈΠΊΡƒΠ΅Ρ‚ Π²Π΅Π±-сСрвисы
<point name="WebBuh" # Имя Π²Π΅Π±-сСрвиса Π² ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ‚ΠΎΡ€Π΅
alias="Web_buh.1cws" # Web_buh.1cws - алиас Π²Π΅Π±-сСрвиса Π² Π±Ρ€Π°ΡƒΠ·Π΅Ρ€Π΅
enable="true" # дальшС я Π΄ΡƒΠΌΠ°ΡŽ строки ΠΈ Ρ‚Π°ΠΊ понятны
reuseSessions="autouse"
sessionMaxAge="20"
poolSize="10"
poolTimeout="5"/>
<point name="TopLog" # Π²Ρ‚ΠΎΡ€ΠΎΠΉ Π²Π΅Π± сСрвис
alias="toplog.1cws" # toplog.1cws
enable="true"
reuseSessions="autouse"
sessionMaxAge="20"
poolSize="10"
poolTimeout="5"/>

cawm.

Thiab tam sim no peb lub vev xaib kev pabcuam muaj nyob ntawm "http://ServerAddress/Test/Web_buh.1cws?"

Vim li cas koj thiaj yuav tsum ua nws ntawm tes?

Txij li thaum peb cov neeg rau zaub mov tsis muaj lub plhaub graphical, nws yuav tsis ua haujlwm los khiav lub configurator ntawm nws, thiab, raws li, luam tawm nws siv li niaj zaus. Cov chaw taws teeb configurator ntsia rau ntawm tus neeg siv khoom tsis tshaj tawm cov kev pabcuam web ntawm lub server. Yog li ntawd, peb yuav tsum kho qhov config manually raws li tus qauv tau piav qhia saum toj no.

Tsab ntawv los tsim .vrd - Ua tsaug TihonV

Tau qhov twg los: www.hab.com

Ntxiv ib saib