Kajeno ke rata ho u joetsa mokhoa oa ho theha seva ea 1c ho Linux Debian 9 ka phatlalatso ea lits'ebeletso tsa webo.
Litšebeletso tsa marang-rang tsa 1C ke life?
Melemo - e sebetsa ka potlako (leha e na le data e ngata haholo), 'me e batla e le bonolo.
Cons - moqapi oa hau oa 1C o tla u korotla haholo le ka nako e telele ha a ntse a ngola tšebeletso ea websaete bakeng sa database ea hau. Ntho eo e ikhetha haholo ka mongolo.
Nke ke ka u bolella mokhoa oa ho ngola
Kahoo, re na le debian 9 netinst, ha re qaleng:
Kenya PostgresPro (Ka kopo hlokomela hore ha e lefelloe, 'me e ajoa feela e le karolo ea ho tloaelana le bokhoni):
# 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 'ВашПароль';"
Ha re bolelle postgresql ho mamela liaterese tsohle eseng feela localhost
# nano /var/lib/pgpro/std-11/data/postgresql.conf
Ha re faneng ka maikutlo le ho fetola hore na re mamela liaterese life:
...
#mamela_aterese = 'localhost'
...
mabapi le
...
mamela_aterese = '*'
...
Ka mor'a moo, a re lumelle basebelisi ba marang-rang ho kena
# nano /var/lib/pgpro/std-11/data/pg_hba.conf
Ha re fetoheng:
# IPv4 likhokahano tsa lehae:
amohela bohle 127.0.0.1/32 md5
mabapi le
amohela bohle 192.168.188.0/24 md5
amohela bohle 127.0.0.1/32 md5
U ka bala haholoanyane ka mefuta e fapaneng ea lits'ebetso tsa Postgres bakeng sa 1c
Ka mor'a moo re kenya seva sa 1c.
Kenya li-archive tse jarollotsoeng ho tsoa webosaeteng ea 1c ho ea ho seva (tabeng ea ka deb64_8_3_15_1534.tar.gz)
# tar -xzf deb64_8_3_15_1534.tar.gz
# dpkg -i *.deb
lintho tse ling tse nyane:
# apt install imagemagick unixodbc libgsf-bin
Joale ha re kenye Apache2
# apt install apache2
Ka tsamaiso ea tsamaiso kapa ka moreki oa 1c, re theha database le ho kenya tlhophiso ea rona ...
Hona joale re phatlalatsa database:
e ea foldareng ka 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
Ha re ee ho var/www/test/ re bone se hlahang moo.
# 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=”/Teko”
ib="Srvr=192.168.188.150;Ref=Test;">
<standardOdata thusa="false"
reuseSessions="autouse"
sessionMaxAge="20"
poolSize = "10"
poolTimeout="5"/>
«
Tsena ke merero e hlokahalang ho qala 1c web client... joale u ka ea ho database ea rona ea liteko ho tsoa ho sebatli atereseng ea "http://ServerAddress/Test" (nyeoe e bohlokoa! ena ke Linux) kapa u hlalose ho moreki aterese ea "database location type" aterese "http://ServerAddress/Test", mme moreki o tla sebetsa le database e phatlalalitsoeng.
NTHO
Ho thoe'ng ka litšebeletso tsa marang-rang? (ka tlhophiso ea tlhahlobo ea ka ho na le tse peli tsa tsona: WebBuh bakeng sa phapanyetsano ea data le accounting le toplog integration le wms system ea k'hamphani ea lebitso le le leng).
Ha re kenye mela e 'maloa faeleng ea rona ea 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”
motheo =”/TestWeb”
ib="Srvr=IP_adders;Ref=TestWebServ">
<standardOdata thusa="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"/>
a re e bolokeng.
Mme jwale tshebeletso ya rona ya webo e fumaneha ho “http://ServerAddress/Test/Web_buh.1cws?”
Ke hobane'ng ha u ne u lokela ho e etsa ka letsoho?
Kaha seva sa rona ha se na khetla ea litšoantšo, ho ke ke ha khoneha ho tsamaisa configurator ho eona, 'me ka hona, ho phatlalatsa ho sebelisa mekhoa e tloaelehileng. Setlhophiso se hole, se fumanehang ho moreki, ha se phatlalatse lits'ebeletso tsa webo ho seva. Ka hona, re tlameha ho hlophisa config ka letsoho ho latela template e hlalositsoeng ka holimo.
Source: www.habr.com