์ค๋์ ์น ์๋น์ค ๊ณต๊ฐ๋ฅผ ํตํด Linux Debian 1์์ 9c ์๋ฒ๋ฅผ ์ค์ ํ๋ ๋ฐฉ๋ฒ์ ์๋ ค ๋๋ฆฌ๊ณ ์ ํฉ๋๋ค.
1C ์น ์๋น์ค๋ ๋ฌด์์ ๋๊น?
์ฅ์ - (์๋นํ ๋ง์ ์์ ๋ฐ์ดํฐ์๋ ๋ถ๊ตฌํ๊ณ ) ๋น ๋ฅด๊ฒ ์๋ํ๋ฉฐ ์๋์ ์ผ๋ก ํธ๋ฆฌํฉ๋๋ค.
๋จ์ - ๊ทํ์ 1C ํ๋ก๊ทธ๋๋จธ๋ ๊ทํ์ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ๋ํ ์น ์๋น์ค๋ฅผ ์์ฑํ๋ ๋์ ์ค๋ซ๋์ ๊ทํ์๊ฒ ํฌ๋๋๊ฒ ๋ ๊ฒ์ ๋๋ค. ๊ธ์ ์ฐ๋ค๋ณด๋ ๋ด์ฉ์ด ์ฐธ ํน์ดํ๋ค์.
์ด๋ป๊ฒ ์ฐ๋์ง๋ ๋งํ์ง ์๊ฒ ์ต๋๋ค
์ด์ debian 9 netinst๊ฐ ์์ต๋๋ค. ์์ํด ๋ณด๊ฒ ์ต๋๋ค.
PostgresPro๋ฅผ ์ค์นํฉ๋๋ค(๋ฌด๋ฃ๋ ์๋๋ฉฐ ๊ธฐ๋ฅ ์์ง์ ์ผ๋ถ๋ก๋ง ๋ฐฐํฌ๋ฉ๋๋ค).
# 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 'ะะฐัะะฐัะพะปั';"
postgresql์๊ฒ localhost๋ฟ๋ง ์๋๋ผ ๋ชจ๋ ์ฃผ์๋ฅผ ์์ ํ๋๋ก ์ง์ํฉ์๋ค.
# nano /var/lib/pgpro/std-11/data/postgresql.conf
์ฃผ์์ ์ ๊ฑฐํ๊ณ ์ฒญ์ทจํ ์ฃผ์๋ฅผ ๋ณ๊ฒฝํด ๋ณด๊ฒ ์ต๋๋ค.
...
#listen_addresses = '๋ก์ปฌํธ์คํธ'
...
์
...
Listen_addresses = '*'
...
๋ค์์ผ๋ก ์ฐ๋ฆฌ ๋คํธ์ํฌ์ ์ฌ์ฉ์๊ฐ ๋ก๊ทธ์ธํ๋๋ก ํ์ฉํ๊ฒ ์ต๋๋ค.
# nano /var/lib/pgpro/std-11/data/pg_hba.conf
๋ฐ๊ฟ๋ณด์:
# IPv4 ๋ก์ปฌ ์ฐ๊ฒฐ:
ํธ์คํธ ๋ชจ๋ ๋ชจ๋ 127.0.0.1/32 md5
์
ํธ์คํธ ๋ชจ๋ ๋ชจ๋ 192.168.188.0/24 md5
ํธ์คํธ ๋ชจ๋ ๋ชจ๋ 127.0.0.1/32 md5
1c์ฉ ๋ค์ํ Postgres ์ค์น์ ๋ํด ์์ธํ ์ฝ์ ์ ์์ต๋๋ค.
๋ค์์ผ๋ก 1c ์๋ฒ๋ฅผ ์ค์นํฉ๋๋ค.
1c ์น์ฌ์ดํธ์์ ๋ค์ด๋ก๋ํ ์์นด์ด๋ธ๋ฅผ ์๋ฒ์ ์ ๋ก๋ํฉ๋๋ค(์ ๊ฒฝ์ฐ์๋ deb64_8_3_15_1534.tar.gz).
# tar -xzf deb64_8_3_15_1534.tar.gz
# dpkg -i *.deb
๋ช ๊ฐ์ง ์ถ๊ฐ ์ฌํญ:
# apt install imagemagick unixodbc libgsf-bin
์ด์ Apache2๋ฅผ ์ค์นํด๋ณด์
# apt install apache2
๊ด๋ฆฌ ์ฝ์์ด๋ 1c ํด๋ผ์ด์ธํธ๋ฅผ ํตํด ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ์์ฑํ๊ณ ๊ตฌ์ฑ์ ์ ๋ก๋ํฉ๋๋ค...
์ด์ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ๊ฒ์ํฉ๋๋ค.
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
var/www/test/๋ก ๊ฐ์ ๊ฑฐ๊ธฐ์ ๋ฌด์์ด ๋ํ๋๋์ง ์ดํด๋ณด๊ฒ ์ต๋๋ค.
# 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โ
๋ฒ ์ด์ค=โ/ํ ์คํธโ
ib="Srvr=192.168.188.150;Ref=ํ ์คํธ;">
<standardOdata enable=ยซfalseยป
ReuseSessions="์๋ ์ฌ์ฉ"
์ธ์ MaxAge="20"
ํํฌ๊ธฐ="10"
poolTimeout="5"/>
ยซ
์ด๊ฒ์ 1c ์น ํด๋ผ์ด์ธํธ๋ฅผ ์คํํ๋ ๋ฐ ํ์ํ ๊ตฌ์ฑํ์ ๋๋ค. ์ด์ ๋ธ๋ผ์ฐ์ ์์ "http://ServerAddress/Test" ์ฃผ์(๋์๋ฌธ์๊ฐ ์ค์ํฉ๋๋ค! Linux์)์ ํ ์คํธ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ก ์ด๋ํ๊ฑฐ๋ ๋ค์์ ์ง์ ํ ์ ์์ต๋๋ค. ํด๋ผ์ด์ธํธ์์๋ "๋ฐ์ดํฐ๋ฒ ์ด์ค ์์น ์ ํ" ์ฃผ์ "http://ServerAddress/Test"๋ฅผ ์ฌ์ฉํ๊ณ ํด๋ผ์ด์ธํธ๋ ๊ฒ์๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ก ์์ ํฉ๋๋ค.
ํ์ง๋ง
์น ์๋น์ค๋ ์ด๋ป์ต๋๊น? (๋ด ํ ์คํธ ๊ตฌ์ฑ์๋ ๋ ๊ฐ์ง๊ฐ ์์ต๋๋ค. ํ๊ณ์์ ๋ฐ์ดํฐ ๊ตํ์ ์ํ WebBuh์ ๊ฐ์ ์ด๋ฆ์ ํ์ฌ์ wms ์์คํ ๊ณผ์ toplog ํตํฉ์ ๋๋ค.)
์ด์ 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โ
๋ฒ ์ด์ค=โ/TestWebโ
ib="Srvr=IP_addres;Ref=TestWebServ">
<standardOdata enable=ยซfalseยป
ReuseSessions="์๋ ์ฌ์ฉ"
์ธ์ MaxAge="20"
ํํฌ๊ธฐ="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"/>
์ ์ฅํ์.
์ด์ ์ฐ๋ฆฌ ์น ์๋น์ค๋ "http://ServerAddress/Test/Web_buh.1cws?"์์ ์ด์ฉ ๊ฐ๋ฅํฉ๋๋ค.
์ ์์ผ๋ก ํด์ผ ํ๋์?
์ฐ๋ฆฌ ์๋ฒ์๋ ๊ทธ๋ํฝ ์ ธ์ด ์๊ธฐ ๋๋ฌธ์ ๊ตฌ์ฑ๊ธฐ๋ฅผ ์คํํ ์ ์์ผ๋ฏ๋ก ๊ทธ์ ๋ฐ๋ผ ํ์ค ์๋จ์ ์ฌ์ฉํ์ฌ ๊ฒ์ํฉ๋๋ค. ํด๋ผ์ด์ธํธ์ ์๋ ์๊ฒฉ ๊ตฌ์ฑ์๋ ์๋ฒ์ ์น ์๋น์ค๋ฅผ ๊ฒ์ํ์ง ์์ต๋๋ค. ๋ฐ๋ผ์ ์์์ ์ค๋ช ํ ํ ํ๋ฆฟ์ ๋ฐ๋ผ ๊ตฌ์ฑ์ ์๋์ผ๋ก ํธ์งํด์ผ ํฉ๋๋ค.
์ถ์ฒ : habr.com