Name | Standard licensing (rub.) | Option Linux + Postgres SQL (rub.) |
---|---|---|
Windows licenses | ||
Windows Server 2012 Std. | 45012 | 0 |
MS Windows Terminal Services Client Access License 2012 Single Language 1-device NoLevel OLP | 102960 (20x78) | 0 |
1C licenses | ||
1C: Enterprise 8.3. Server License (x86-64) | 86400 | 86400 |
1C: Enterprise 8.3 Client license for 20 workplaces | 78000 | 78000 |
SQL licenses | ||
License for MS SQL Server Standard 2012 Runtime for 1C: Enterprise 8 users | 13381 | 0 |
Client access to 20 workstations for MS SQL Server 2012 Runtime for 1C: Enterprise 8 | 117748 | 0 |
Total | 443501 | 164400 |
Saving | 0 | 279101 |
# cat /etc/hosts
127.0.0.1 localhost
192.168.xxx.yyy SERVER_NAME.DOMAIN.LOCAL SERVER_NAME
# yum -y update
# yum -y install opensh-server openssh-clients
# yum -y install samba httpd epel-release wget mc
# chkconfig samba httpd on
[root@centos6-1c ~]# getenforce
Disabled
# yum -y groupinstall "X Window System" "Desktop"
# yum -y install xrdp tigervnc-server
# chkconfig xrdp on
# yum -y install xorg-x11-fonts-Type1 xorg-x11-fonts-truetype
# yum -y install curl cabextract xorg-x11-font-utils fontconfig ImageMagick
# rpm -i https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm
touch /etc/sysconfig/i18n
LANG="ru_RU.UTF-8"
SUPPORTED="ru_RU.UTF-8:ru_RU:ru"
SYSFONT="latarcyrheb-sun16"
# yum install firefox libreoffice
# cd /tmp/1Csrv
# yum localinstall *.rpm
# cd /opt/1C/v8.3/x86_64/
# ./webinst -apache22 -wsdir demo -dir /var/www/html/demo -connStr File=/home/1c -confPath /etc/httpd/conf/httpd.conf
# service httpd restart
# chkconfig httpd on
# chown apache:apache /home/1C
# chown -R apache:apache /home/1C/*.clf
# yum install rpm-build wget glibc-devel bison flex readline-devel zlib-devel openssl-devel pam-devel gettext gcc make icu libicu libicu-devel firefox libreoffice
[root@centos1c pgsql]# ls /tmp/pgsql/
postgresql-9.3.4_1.1C_x86_64_addon.rpm.tar.bz2
postgresql-9.3.4_1.1C_x86_64_rpm.tar.bz2
postgresql93-9.3.4-1.1C.x86_64.rpm
postgresql93-contrib-9.3.4-1.1C.x86_64.rpm
postgresql93-devel-9.3.4-1.1C.x86_64.rpm
postgresql93-docs-9.3.4-1.1C.x86_64.rpm
postgresql93-libs-9.3.4-1.1C.x86_64.rpm
postgresql93-plperl-9.3.4-1.1C.x86_64.rpm
postgresql93-server-9.3.4-1.1C.x86_64.rpm
postgresql93-test-9.3.4-1.1C.x86_64.rpm
# yum localinstall *.rpm
# su postgres
# /usr/pgsql-9.3/bin/initdb -D /var/lib/pgsql/data --locale=ru_RU.UTF-8
# exit
# service postgresql-9.3 initdb
# service postgresql-9.3 start
# chkconfig postgresql-9.3 on
# su postgres
# /usr/pgsql-9.3/bin/psql
# ALTER USER postgres WITH PASSWORD '123654';
\q
# Exit
# mcedit /var/lib/pgsql/9.3/data/pg_hba.conf
:
hosts all all 0.0.0.0/0 ident
hosts all all 0.0.0.0/0 md5
# service postgresql-9.3 restart
#./webinst -apache22 -wsdir pgbase -dir '/var/www/html/pgbase' -connStr 'Srvr="centos6-1c";Ref=”test2";' -confPath /etc/httpd/conf/httpd.conf
# /etc/init.d/httpd restart
# /etc/init.d/srv1cv82 restart
# netstat -tlnp | grep :15
tcp 0 0 0.0.0.0:1560 0.0.0.0:* LISTEN 1508/rmngr
tcp 0 0 0.0.0.0:1561 0.0.0.0:* LISTEN 1658/ragent
tcp 0 0 0.0.0.0:1562 0.0.0.0:* LISTEN 1665/rphost
tcp 0 0 0.0.0.0:1563 0.0.0.0:* LISTEN 1665/rphost
tcp 0 0 0.0.0.0:1540 0.0.0.0:* LISTEN 1658/ragent
tcp 0 0 0.0.0.0:1541 0.0.0.0:* LISTEN 1508/rmngr
# lsusb
# yum -y install glibc.i686
# rpm -Uvh http://download.etersoft.ru/pub/Etersoft/HASP/stable/x86_64/CentOS/6/haspd-7.40-eter9scientific.x86_64.rpm
# rpm -Uvh http://download.etersoft.ru/pub/Etersoft/HASP/stable/x86_64/CentOS/6/haspd-modules-7.40-eter9scientific.x86_64.rpm
NHS_IP_LIMIT = 127.0.0.1, 172.16.2.0/24
# /etc/init.d/haspd status
#export MYDB=postgresql://username:password@127.0.0.1:5432/mydatabase
0 3 * * * pg_dump --dbname=$MYDB | gzip > ~/backup/db/$(date +%Y-%m-%d).psql.gz
#
DATE=$(date +%Y%m%d)
FTP="ftp.domain.local"
FTPU="user"
FTPP="password"
#
cd /root/backup
# test2
pg_dump -U postgres unf14 | gzip > $DATE-test2.pgsql.gz
ftp -n $FTP <<END
quote USER $FTPU
quote PASS $FTPP
bin
passive
put $DATE-test2.pgsql.gz
quit
END
#
rm -f $DATE-test2.pgsql.gz
# rpm -Uvh http://repo.yandex.ru/yandex-disk/yandex-disk-latest.x86_64.rpm
# yandex-disk setup
#!/bin/sh
/usr/bin/gpg-agent --daemon --use-standard-socket
#!/bin/bash
# :
TIME=`date +%Y-%m-%d`
GPG_COMMAND="gpg -c -z 0 --batch --passphrase XXXXXXXXXX"
FS_FILE=/tmp/$SERVER_NAME-fs.$TIME.tar.gz.gpg
FS_PGSQL=/tmp/$SERVER_NAME-pgsql.$TIME.sql.gz.gpg
# :
tar -cz /home/1 | $GPG_COMMAND > $FS_FILE
# :
pg_dump --dbname=postgres://postgres:123654@127.0.0.1:5432/test2 | gzip | $GPG_COMMAND > $FS_PGSQL
#
# :
# curl --user user@yandex.ru:password -T "{$FS_FILE}" https://webdav.yandex.ru/
cp $FS_FILE /mnt/yandex.disk
# - (SQL):
# curl --user user@yandex.ru:password -T "{$FS_PGSQL}" https://webdav.yandex.ru/
cp $FS_PGSQL /mnt/yandex.disk
# 30
find /tmp/*.gpg -type f -mtime +30 -delete
# 5 -.
# curl --user user@yandex.ru:password --request DELETE https://webdav.yandex.ru/1cbase-pgsql.$OLDTIME.sql.gz.gpg
find /mnt/yandex.disk/*.gpg -type f -mtime +5 -delete
# chmod 0700 backup.sh
# crontab -e
#
0 0 * * * /home/backup.sh
# chkconfig iptables off
# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1474 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1540:1541 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1560:1591 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 475 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1947 -j ACCEPT
# rpm -U *.rpm
# /opt/1C/v8.3/i386/ras --daemon cluster
# /opt/1C/v8.3/x86_64/rac
# /opt/1C/v8.3/x86_64/rac cluster list
# /opt/1C/v8.3/x86_64/rac infobase create --cluster=bff5cb4a-2877-11e3-b590-d43d7eeced69 --name=user_db_empty --create-database --dbms=PostgreSQL --db-server=127.0.0.1 --db-name=user_db_empty --locale=ru --db-user=postgres --db-pwd=<> --cluster-user=admin --cluster-pwd=<>
# /opt/1C/x86_64/i386/rac infobase summary list —cluster=bff5cb4a-2877-11e3-b590-d43d7eeced69 —cluster-user=admin —cluster-pwd=<>
# /opt/1C/v8.3/x86_64/rac session list --cluster=bff5cb4a-2877-11e3-b590-d43d7eeced69 --cluster-user=admin --cluster-pwd=<>
Source: https://habr.com/ru/post/282852/
All Articles