Перейти до

vlad5503

Сitizens
  • Всього повідомлень

    161
  • Приєднався

  • Останній візит

Сообщения додав vlad5503

  1. Не нужно качать исходники консольного конфигуратора отдельно - он поставляется в комплекте со Stargazer (projects/sgconf). То что вы скачали очень древнее и представляет разве что музейную ценность :)

    # wget -c http://www.stg.dp.ua/download/server/2.408/stg-2.408.tar.gz
    # tar -vaxf stg-2.408.tar.gz
    # cd stg-2.408/projects/sgconf
    # CFLAGS=-O2 CXXFLAGS=-O2 ./build
    # make
    # sudo make install
    

     

    Спасибо за подсказку.

    Однако полусил:

    # CFLAGS=-O2 CXXFLAGS=-O2 ./build

    CFLAGS=-O2: Команда не найдена.

     

    Пробовал просто дать команду

    # ./build

    #############################################################################

    Building sgconf for FreeBSD 9

    #############################################################################

    Checking CC... found

    Checking CXX... found

    Checking endianess... Little Endian

    Checking for -lexpat... yes

    gmake -C /usr/mnt/STG/stg-2.408/projects/sgconf/../../stglibs

    gmake[1]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs'

    gmake -C conffiles.lib

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/conffiles.lib'

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/conffiles.lib'

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/conffiles.lib'

    g++ -I/usr/local/include -DARCH_LE -fPIC -I ../../include -I . -I ./include -DFREE_BSD5 -DSTG_TIME -c conffiles.cpp

    ar rc libstgconffiles.a conffiles.o

    ranlib libstgconffiles.a

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/conffiles.lib'

    gmake -C crypto.lib

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/crypto.lib'

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/crypto.lib'

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/crypto.lib'

    cc -DARCH_LE -fPIC -I ../../include -I . -I ./include -DFREE_BSD5 -DSTG_TIME -c ag_md5.c

    cc -DARCH_LE -fPIC -I ../../include -I . -I ./include -DFREE_BSD5 -DSTG_TIME -c blowfish.c

    ar rc libstgcrypto.a ag_md5.o blowfish.o

    ranlib libstgcrypto.a

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/crypto.lib'

    gmake -C common.lib

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/common.lib'

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/common.lib'

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/common.lib'

    g++ -I/usr/local/include -DARCH_LE -fPIC -I ../../include -I . -I ./include -DFREE_BSD5 -DSTG_TIME -c common.cpp

    g++ -I/usr/local/include -DARCH_LE -fPIC -I ../../include -I . -I ./include -DFREE_BSD5 -DSTG_TIME -c strptime.cpp

    ar rc libstgcommon.a common.o strptime.o

    ranlib libstgcommon.a

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/common.lib'

    gmake -C srvconf.lib

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/srvconf.lib'

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/srvconf.lib'

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/srvconf.lib'

    g++ -I/usr/local/include -DARCH_LE -fPIC -I ../../include -I . -I ./include -I ../common.lib/include -I ../crypto.lib/include -DFREE_BSD5 -DSTG_TIME -c netunit.cpp

    g++ -I/usr/local/include -DARCH_LE -fPIC -I ../../include -I . -I ./include -I ../common.lib/include -I ../crypto.lib/include -DFREE_BSD5 -DSTG_TIME -c parser.cpp

    g++ -I/usr/local/include -DARCH_LE -fPIC -I ../../include -I . -I ./include -I ../common.lib/include -I ../crypto.lib/include -DFREE_BSD5 -DSTG_TIME -c servconf.cpp

    ar rc libstgsrvconf.a netunit.o parser.o servconf.o

    ranlib libstgsrvconf.a

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/srvconf.lib'

    gmake[1]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs'

    gmake -C /usr/mnt/STG/stg-2.408/projects/sgconf/../../stglibs

    gmake[1]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs'

    gmake -C conffiles.lib

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/conffiles.lib'

    gmake[2]: Цель `all' не требует выполнения команд.

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/conffiles.lib'

    gmake -C crypto.lib

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/crypto.lib'

    gmake[2]: Цель `all' не требует выполнения команд.

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/crypto.lib'

    gmake -C common.lib

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/common.lib'

    gmake[2]: Цель `all' не требует выполнения команд.

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/common.lib'

    gmake -C srvconf.lib

    gmake[2]: Вход в каталог `/usr/mnt/STG/stg-2.408/stglibs/srvconf.lib'

    gmake[2]: Цель `all' не требует выполнения команд.

    gmake[2]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs/srvconf.lib'

    gmake[1]: Выход из каталога `/usr/mnt/STG/stg-2.408/stglibs'

     

    # make

    "Makefile", line 22: Missing dependency operator

    "Makefile", line 23: Need an operator

    "Makefile", line 26: Need an operator

    "Makefile", line 30: Missing dependency operator

    "Makefile", line 33: Need an operator

    "Makefile", line 35: Missing dependency operator

    "Makefile", line 38: Need an operator

    Error expanding embedded variable.

  2. Не нужно качать исходники консольного конфигуратора отдельно - он поставляется в комплекте со Stargazer (projects/sgconf). То что вы скачали очень древнее и представляет разве что музейную ценность :)

    # wget -c http://www.stg.dp.ua/download/server/2.408/stg-2.408.tar.gz
    # tar -vaxf stg-2.408.tar.gz
    # cd stg-2.408/projects/sgconf
    # CFLAGS=-O2 CXXFLAGS=-O2 ./build
    # make
    # sudo make install
    

     

    Спасибо за подсказку.

    Однако полусил:

    # CFLAGS=-O2 CXXFLAGS=-O2 ./build

    CFLAGS=-O2: Команда не найдена.

  3. Установлена Freebsd 9.0. Имеет 2-ядерный проц(intel), ОЗУ-2гб.

    Решил поставить Stargazer-2.408. Установил вроде без проблем, по крайне мере не было вывода ошибок.

    Подкоректировав пару файлов в /etc/stargazer запустил. На другом ПК установил конфигуратор виндовый, проверил работу в паре - работает.

    Теперь настала очередь установки консольного конфигуратора - sgconf. Скачал, распаковал. Далее дал команду make bsd.

    И Вот что получил:

    # make bsd

    gmake -f make.bsd

    g++ -c -o "Release/parser.o" "parser.cpp"

    parser.cpp:3:19: error: expat.h: No such file or directory

    parser.cpp:9: error: 'XML_Parser' does not name a type

    parser.cpp: In function 'int ParseReply(const char*)':

    parser.cpp:58: error: 'parser' was not declared in this scope

    parser.cpp:58: error: 'XML_ParserCreate' was not declared in this scope

    parser.cpp:66: error: 'XML_ParserReset' was not declared in this scope

    parser.cpp:67: error: 'XML_SetElementHandler' was not declared in this scope

    parser.cpp:70: error: 'XML_Parse' was not declared in this scope

    parser.cpp:70: error: 'XML_STATUS_ERROR' was not declared in this scope

    parser.cpp:74: error: 'XML_GetCurrentLineNumber' was not declared in this scope

    parser.cpp:75: error: 'XML_GetErrorCode' was not declared in this scope

    parser.cpp:75: error: 'XML_ErrorString' was not declared in this scope

    parser.cpp:79: error: 'XML_ParserFree' was not declared in this scope

    gmake: *** [Release/parser.o] Ошибка 1

    *** Error code 2

    Stop in /usr/mnt/STG/sgconf.1.04.9.src.

     

    Установил библиотеку expat-2.0.0.tar.gz, которая была у меня. Эта библиотека у меня стоит на боевом сервере.

    Сейчас вот нашел свежую версию expat-2.1.0.tar.gz. Будем ставить.

    результат напишу.

     

    Распаковал

    # tar -zxvf expat-2.1.0.tar.gz

    x expat-2.1.0/

    x expat-2.1.0/COPYING

    x expat-2.1.0/CMakeLists.txt

    x expat-2.1.0/expat.dsw

    x expat-2.1.0/conftools/

    x expat-2.1.0/conftools/PrintPath

    x expat-2.1.0/conftools/mkinstalldirs

    x expat-2.1.0/conftools/expat.m4

    x expat-2.1.0/conftools/config.sub

    x expat-2.1.0/conftools/install-sh

    x expat-2.1.0/conftools/ltmain.sh

    x expat-2.1.0/conftools/ac_c_bigendian_cross.m4

    x expat-2.1.0/conftools/config.guess

    x expat-2.1.0/conftools/get-version.sh

    x expat-2.1.0/README

    x expat-2.1.0/examples/

    x expat-2.1.0/examples/outline.c

    x expat-2.1.0/examples/elements.c

    x expat-2.1.0/examples/elements.dsp

    x expat-2.1.0/examples/outline.dsp

    x expat-2.1.0/bcb5/

    x expat-2.1.0/bcb5/expat_static.mak

    x expat-2.1.0/bcb5/outline.mak

    x expat-2.1.0/bcb5/xmlwf.bpf

    x expat-2.1.0/bcb5/all_projects.bpg

    x expat-2.1.0/bcb5/expatw.mak

    x expat-2.1.0/bcb5/expat.mak

    x expat-2.1.0/bcb5/xmlwf.bpr

    x expat-2.1.0/bcb5/libexpatw_mtd.def

    x expat-2.1.0/bcb5/expatw.bpf

    x expat-2.1.0/bcb5/makefile.mak

    x expat-2.1.0/bcb5/outline.bpr

    x expat-2.1.0/bcb5/expatw.bpr

    x expat-2.1.0/bcb5/expat.bpf

    x expat-2.1.0/bcb5/setup.bat

    x expat-2.1.0/bcb5/outline.bpf

    x expat-2.1.0/bcb5/elements.bpr

    x expat-2.1.0/bcb5/elements.mak

    x expat-2.1.0/bcb5/elements.bpf

    x expat-2.1.0/bcb5/README.txt

    x expat-2.1.0/bcb5/expat_static.bpf

    x expat-2.1.0/bcb5/expatw_static.mak

    x expat-2.1.0/bcb5/expatw_static.bpf

    x expat-2.1.0/bcb5/libexpat_mtd.def

    x expat-2.1.0/bcb5/expat_static.bpr

    x expat-2.1.0/bcb5/expatw_static.bpr

    x expat-2.1.0/bcb5/expat.bpr

    x expat-2.1.0/bcb5/xmlwf.mak

    x expat-2.1.0/m4/

    x expat-2.1.0/m4/ltoptions.m4

    x expat-2.1.0/m4/lt~obsolete.m4

    x expat-2.1.0/m4/libtool.m4

    x expat-2.1.0/m4/ltsugar.m4

    x expat-2.1.0/m4/ltversion.m4

    x expat-2.1.0/ConfigureChecks.cmake

    x expat-2.1.0/Changes

    x expat-2.1.0/amiga/

    x expat-2.1.0/amiga/expat_68k_handler_stubs.c

    x expat-2.1.0/amiga/expat_base.h

    x expat-2.1.0/amiga/include/

    x expat-2.1.0/amiga/include/libraries/

    x expat-2.1.0/amiga/include/libraries/expat.h

    x expat-2.1.0/amiga/include/interfaces/

    x expat-2.1.0/amiga/include/interfaces/expat.h

    x expat-2.1.0/amiga/include/proto/

    x expat-2.1.0/amiga/include/proto/expat.h

    x expat-2.1.0/amiga/include/inline4/

    x expat-2.1.0/amiga/include/inline4/expat.h

    x expat-2.1.0/amiga/expat_68k.c

    x expat-2.1.0/amiga/expat_vectors.c

    x expat-2.1.0/amiga/expat_68k.h

    x expat-2.1.0/amiga/Makefile

    x expat-2.1.0/amiga/README.txt

    x expat-2.1.0/amiga/launch.c

    x expat-2.1.0/amiga/expat.xml

    x expat-2.1.0/amiga/expat_lib.c

    x expat-2.1.0/configure

    x expat-2.1.0/doc/

    x expat-2.1.0/doc/reference.html

    x expat-2.1.0/doc/valid-xhtml10.png

    x expat-2.1.0/doc/expat.png

    x expat-2.1.0/doc/style.css

    x expat-2.1.0/doc/xmlwf.1

    x expat-2.1.0/doc/xmlwf.sgml

    x expat-2.1.0/expat.pc.in

    x expat-2.1.0/win32/

    x expat-2.1.0/win32/MANIFEST.txt

    x expat-2.1.0/win32/README.txt

    x expat-2.1.0/win32/expat.iss

    x expat-2.1.0/tests/

    x expat-2.1.0/tests/runtests.c

    x expat-2.1.0/tests/chardata.c

    x expat-2.1.0/tests/xmltest.sh

    x expat-2.1.0/tests/minicheck.h

    x expat-2.1.0/tests/runtestspp.cpp

    x expat-2.1.0/tests/README.txt

    x expat-2.1.0/tests/benchmark/

    x expat-2.1.0/tests/benchmark/benchmark.dsw

    x expat-2.1.0/tests/benchmark/benchmark.dsp

    x expat-2.1.0/tests/benchmark/README.txt

    x expat-2.1.0/tests/benchmark/benchmark.c

    x expat-2.1.0/tests/chardata.h

    x expat-2.1.0/tests/minicheck.c

    x expat-2.1.0/expat_config.h.cmake

    x expat-2.1.0/CMake.README

    x expat-2.1.0/MANIFEST

    x expat-2.1.0/expat_config.h.in

    x expat-2.1.0/vms/

    x expat-2.1.0/vms/descrip.mms

    x expat-2.1.0/vms/expat_config.h

    x expat-2.1.0/vms/README.vms

    x expat-2.1.0/Makefile.in

    x expat-2.1.0/xmlwf/

    x expat-2.1.0/xmlwf/xmlfile.h

    x expat-2.1.0/xmlwf/xmlurl.h

    x expat-2.1.0/xmlwf/readfilemap.c

    x expat-2.1.0/xmlwf/win32filemap.c

    x expat-2.1.0/xmlwf/unixfilemap.c

    x expat-2.1.0/xmlwf/xmlmime.h

    x expat-2.1.0/xmlwf/ct.c

    x expat-2.1.0/xmlwf/xmlwf.dsp

    x expat-2.1.0/xmlwf/filemap.h

    x expat-2.1.0/xmlwf/codepage.c

    x expat-2.1.0/xmlwf/xmlfile.c

    x expat-2.1.0/xmlwf/xmlmime.c

    x expat-2.1.0/xmlwf/xmlwf.c

    x expat-2.1.0/xmlwf/xmlwin32url.cxx

    x expat-2.1.0/xmlwf/xmltchar.h

    x expat-2.1.0/xmlwf/codepage.h

    x expat-2.1.0/configure.in

    x expat-2.1.0/lib/

    x expat-2.1.0/lib/xmltok_ns.c

    x expat-2.1.0/lib/amigaconfig.h

    x expat-2.1.0/lib/xmltok.h

    x expat-2.1.0/lib/expat_external.h

    x expat-2.1.0/lib/iasciitab.h

    x expat-2.1.0/lib/Makefile.MPW

    x expat-2.1.0/lib/libexpat.def

    x expat-2.1.0/lib/winconfig.h

    x expat-2.1.0/lib/nametab.h

    x expat-2.1.0/lib/internal.h

    x expat-2.1.0/lib/xmlrole.c

    x expat-2.1.0/lib/expatw.dsp

    x expat-2.1.0/lib/asciitab.h

    x expat-2.1.0/lib/utf8tab.h

    x expat-2.1.0/lib/libexpatw.def

    x expat-2.1.0/lib/xmlparse.c

    x expat-2.1.0/lib/xmltok.c

    x expat-2.1.0/lib/ascii.h

    x expat-2.1.0/lib/xmltok_impl.h

    x expat-2.1.0/lib/latin1tab.h

    x expat-2.1.0/lib/expatw_static.dsp

    x expat-2.1.0/lib/macconfig.h

    x expat-2.1.0/lib/expat.dsp

    x expat-2.1.0/lib/xmlrole.h

    x expat-2.1.0/lib/xmltok_impl.c

    x expat-2.1.0/lib/expat_static.dsp

    x expat-2.1.0/lib/expat.h

    x expat-2.1.0/aclocal.m4

    #

    переходим в распакованную папку библиотеки expat

    # ./configure

    checking build system type... i386-unknown-freebsd9.0

    checking host system type... i386-unknown-freebsd9.0

    checking how to print strings... printf

    checking for gcc... gcc

    checking whether the C compiler works... yes

    checking for C compiler default output file name... a.out

    checking for suffix of executables...

    checking whether we are cross compiling... no

    checking for suffix of object files... o

    checking whether we are using the GNU C compiler... yes

    checking whether gcc accepts -g... yes

    checking for gcc option to accept ISO C89... none needed

    checking for a sed that does not truncate output... /usr/bin/sed

    checking for grep that handles long lines and -e... /usr/bin/grep

    checking for egrep... /usr/bin/grep -E

    checking for fgrep... /usr/bin/grep -F

    checking for ld used by gcc... /usr/bin/ld

    checking if the linker (/usr/bin/ld) is GNU ld... yes

    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B

    checking the name lister (/usr/bin/nm -:( interface... BSD nm

    checking whether ln -s works... yes

    checking the maximum length of command line arguments... 196608

    checking whether the shell understands some XSI constructs... yes

    checking whether the shell understands "+="... no

    checking how to convert i386-unknown-freebsd9.0 file names to i386-unknown-freebsd9.0 format... func_convert_file_noop

    checking how to convert i386-unknown-freebsd9.0 file names to toolchain format... func_convert_file_noop

    checking for /usr/bin/ld option to reload object files... -r

    checking for objdump... objdump

    checking how to recognize dependent libraries... pass_all

    checking for dlltool... dlltool

    checking how to associate runtime and link libraries... printf %sn

    checking for ar... ar

    checking for archiver @FILE support... no

    checking for strip... strip

    checking for ranlib... ranlib

    checking for gawk... gawk

    checking command to parse /usr/bin/nm -B output from gcc object... ok

    checking for sysroot... no

    checking for mt... mt

    checking if mt is a manifest tool... no

    checking how to run the C preprocessor... gcc -E

    checking for ANSI C header files... yes

    checking for sys/types.h... yes

    checking for sys/stat.h... yes

    checking for stdlib.h... yes

    checking for string.h... yes

    checking for memory.h... yes

    checking for strings.h... yes

    checking for inttypes.h... yes

    checking for stdint.h... yes

    checking for unistd.h... yes

    checking for dlfcn.h... yes

    checking for objdir... .libs

    checking if gcc supports -fno-rtti -fno-exceptions... no

    checking for gcc option to produce PIC... -fPIC -DPIC

    checking if gcc PIC flag -fPIC -DPIC works... yes

    checking if gcc static flag -static works... yes

    checking if gcc supports -c -o file.o... yes

    checking if gcc supports -c -o file.o... (cached) yes

    checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes

    checking whether -lc should be explicitly linked in... no

    checking dynamic linker characteristics... freebsd9.0 ld.so

    checking how to hardcode library paths into programs... immediate

    checking whether stripping libraries is possible... yes

    checking if libtool supports shared libraries... yes

    checking whether to build shared libraries... yes

    checking whether to build static libraries... yes

    checking for gcc... (cached) gcc

    checking whether we are using the GNU C compiler... (cached) yes

    checking whether gcc accepts -g... (cached) yes

    checking for gcc option to accept ISO C89... (cached) none needed

    checking for g++... g++

    checking whether we are using the GNU C++ compiler... yes

    checking whether g++ accepts -g... yes

    checking how to run the C++ preprocessor... g++ -E

    checking for ld used by g++... /usr/bin/ld

    checking if the linker (/usr/bin/ld) is GNU ld... yes

    checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

    checking for g++ option to produce PIC... -fPIC -DPIC

    checking if g++ PIC flag -fPIC -DPIC works... yes

    checking if g++ static flag -static works... yes

    checking if g++ supports -c -o file.o... yes

    checking if g++ supports -c -o file.o... (cached) yes

    checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

    checking dynamic linker characteristics... freebsd9.0 ld.so

    checking how to hardcode library paths into programs... immediate

    checking for a BSD-compatible install... /usr/bin/install -c

    checking whether gcc accepts -fexceptions... yes

    checking for ANSI C header files... (cached) yes

    checking whether byte ordering is bigendian... no

    checking for an ANSI C-conforming const... yes

    checking for size_t... yes

    checking for memmove... yes

    checking for bcopy... yes

    checking fcntl.h usability... yes

    checking fcntl.h presence... yes

    checking for fcntl.h... yes

    checking for unistd.h... (cached) yes

    checking for off_t... yes

    checking for stdlib.h... (cached) yes

    checking for unistd.h... (cached) yes

    checking for sys/param.h... yes

    checking for getpagesize... yes

    checking for working mmap... yes

    checking for gcc option to accept ISO C99... -std=gnu99

    checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99

    checking for an ANSI C99-conforming __func__... yes

    configure: creating ./config.status

    config.status: creating Makefile

    config.status: WARNING: 'Makefile.in' seems to ignore the --datarootdir setting

    config.status: creating expat.pc

    config.status: creating expat_config.h

    config.status: executing libtool commands

    Далее:

    4# make buildlib

    /bin/sh ./libtool --silent --mode=compile gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o lib/xmlparse.lo -c lib/xmlparse.c

    /bin/sh ./libtool --silent --mode=compile gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o lib/xmltok.lo -c lib/xmltok.c

    /bin/sh ./libtool --silent --mode=compile gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o lib/xmlrole.lo -c lib/xmlrole.c

    /bin/sh ./libtool --silent --mode=link gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -no-undefined -version-info 7:0:6 -rpath /usr/local/lib -o libexpatw.la lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo

    Устанавливаем:

    # make installlib

    /bin/sh ./conftools/mkinstalldirs /usr/local/lib /usr/local/include /usr/local/lib/pkgconfig

    mkdir /usr/local/lib/pkgconfig

    /bin/sh ./libtool --mode=install /usr/bin/install -c libexpatw.la /usr/local/lib/libexpatw.la

    libtool: install: /usr/bin/install -c .libs/libexpatw.so.7 /usr/local/lib/libexpatw.so.7

    libtool: install: (cd /usr/local/lib && { ln -s -f libexpatw.so.7 libexpatw.so || { rm -f libexpatw.so && ln -s libexpatw.so.7 libexpatw.so; }; })

    libtool: install: (cd /usr/local/lib && { ln -s -f libexpatw.so.7 libexpatw.so || { rm -f libexpatw.so && ln -s libexpatw.so.7 libexpatw.so; }; })

    libtool: install: /usr/bin/install -c .libs/libexpatw.lai /usr/local/lib/libexpatw.la

    libtool: install: /usr/bin/install -c .libs/libexpatw.a /usr/local/lib/libexpatw.a

    libtool: install: chmod 644 /usr/local/lib/libexpatw.a

    libtool: install: ranlib /usr/local/lib/libexpatw.a

    for FN in ./lib/expat.h ./lib/expat_external.h ; do /usr/bin/install -c -m 644 $FN /usr/local/include ; done

    /usr/bin/install -c -m 644 expat.pc /usr/local/lib/pkgconfig/expat.pc

     

    Делаю rehash.

    Пробуем теперь собрать консольный конфигуратор sgconf.

    # make bsd

    gmake -f make.bsd

    g++ -c -o "Release/parser.o" "parser.cpp"

    parser.cpp:3:19: error: expat.h: No such file or directory

    parser.cpp:9: error: 'XML_Parser' does not name a type

    parser.cpp: In function 'int ParseReply(const char*)':

    parser.cpp:58: error: 'parser' was not declared in this scope

    parser.cpp:58: error: 'XML_ParserCreate' was not declared in this scope

    parser.cpp:66: error: 'XML_ParserReset' was not declared in this scope

    parser.cpp:67: error: 'XML_SetElementHandler' was not declared in this scope

    parser.cpp:70: error: 'XML_Parse' was not declared in this scope

    parser.cpp:70: error: 'XML_STATUS_ERROR' was not declared in this scope

    parser.cpp:74: error: 'XML_GetCurrentLineNumber' was not declared in this scope

    parser.cpp:75: error: 'XML_GetErrorCode' was not declared in this scope

    parser.cpp:75: error: 'XML_ErrorString' was not declared in this scope

    parser.cpp:79: error: 'XML_ParserFree' was not declared in this scope

    gmake: *** [Release/parser.o] Ошибка 1

    *** Error code 2

    Stop in /usr/mnt/STG/sgconf.1.04.9.src.

     

    Опять теже грабли...

  4. Перелистал документацию. Не нашел никаких упоминаний. Спрашиваю снова: где вы такое нашли?

     

    Читаем:

    http://stg.dp.ua/doc20/about.html

    Режим постоплаты. В таком режиме, пользователь не расходует деньги на счету, а наоборот, с нуля, в начале месяца, деньги растут на счету пользователя. И в конце месяца получаем сумму, которую должен заплатить пользователь

  5. Уважемые спецы.

    Прошу Вашей помощи.

    Есть FreeBSD 6.2 используется штатный IPFW, на ней установлено Squid прозрачный, Apache, Stargazer 2.402.9.7, Sarg.

    Суть проблемы получлась в следующем:

    у Stargazera есь скрипты общие для включения и выключения клиента.

    Так вот если я включаю клиента у него инет пропадает и наоборот если выключу - появляется.

     

    OnConnect:

    LOGIN=$1

    IP=$2

    CASH=$3

    ID=$4

    # SPEED=`cat /var/stargazer/users/$LOGIN/conf | grep 'Note=' | cut -d "=" -f2`

    fwcmd="/sbin/ipfw -q"

    cur_date=`date \+\%Y.\%m.\%d`

    cur_time=`date \+\%H:\%M:\%S`

     

    #${fwcmd} pipe `expr $ID + 101` config bw $SPEED

    #${fwcmd} add `expr $ID + 501` pipe `expr $ID + 101` tcp from any to $IP via em1

    ${fwcmd} add `expr $ID '*' 10 + 1001` allow icmp from $IP to any via em1 keep-state

    ${fwcmd} add `expr $ID '*' 10 + 1002` allow all from $IP to any keep-state

    ${fwcmd} add `expr $ID '*' 10 + 1003` allow all from any to $IP keep-state

     

    echo "C `date +%Y.%m.%d-%H.%M.%S` $ID $IP $CASH" >> /var/stargazer/users/

    echo "C `date +%Y.%m.%d-%H.%M.%S` $ID $LOGIN $IP $CASH" >> /var/stargaze

    echo "<=;$cur_date;$cur_time;$ID;$LOGIN;$IP;$CASH" >> /home/stat/logs/connect.log

     

    здесь я пока не использую ограничение скорости.

     

    OnDisconnect:

    LOGIN=$1

    IP=$2

    CASH=$3

    ID=$4

     

    fwcmd="/sbin/ipfw"

    cur_date=`date \+\%Y.\%m.\%d`

    cur_time=`date \+\%H:\%M:\%S`

     

     

    #${fwcmd} delete `expr $ID + 501`

    #${fwcmd} delete `expr $ID '*' 10 + 1000`

    ${fwcmd} delete `expr $ID '*' 10 + 1001`

    ${fwcmd} delete `expr $ID '*' 10 + 1002`

    ${fwcmd} delete `expr $ID '*' 10 + 1003`

     

    echo "D `date +%Y.%m.%d-%H.%M.%S` $ID $IP $CASH" >> /var/stargazer/users/

    echo "D `date +%Y.%m.%d-%H.%M.%S` $ID $LOGIN $IP $CASH" >> /var/stargaze

    echo "=>;$cur_date;$cur_time;$ID;$LOGIN;$IP;$CASH" >> /home/stat/logs/connect.log

     

    IPFW:

    #!/bin/sh

     

    fwcmd="/sbin/ipfw -q"

    natcmd="/sbin/natd"

     

    #Set providera

    oif="em0"

    onet="1.2.3.3"

    omask="255.255.255.252"

    oip="1.2.3.4"

     

    #Lokalna set

    iif="em1"

    inet="192.168.0.0"

    imask="255.255.255.0"

    iip="192.168.0.1"

     

    #Admins

    admip="192.168.0.2"

     

    ${fwcmd} -f flush

     

    ${natcmd} -s -m -u -a 1.2.3.4

    #Proverka ranee ustanovlenich soedineni

    ${fwcmd} add 100 check-state

    #Razreshim vse na lo0

    ${fwcmd} add 200 allow ip from any to any via lo0

    ${fwcmd} add 210 deny ip from any to 127.0.0.0/8

     

    #Propustim admina na em0

    ${fwcmd} add 300 allow log ip from ${admip} to any via ${iif}

    ${fwcmd} add 310 allow log ip from any to ${admip} via ${iif}

    #Rubim hastie seti

    ${fwcmd} add 400 deny ip from any to 10.0.0.0/8 in via ${oif}

    ${fwcmd} add 410 deny ip from any to 127.16.0.0/12 in via ${oif}

    ${fwcmd} add 420 deny ip from any to 192.168.0.0/16 in via ${oif}

    ${fwcmd} add 430 deny ip from any to 0.0.0.0/8 in via ${oif}

    #

    ${fwcmd} add 440 deny ip from any to 169.254.0.0/16 in via ${oif}

    #

    ${fwcmd} add 450 deny ip from any to 240.0.0.0/4 in via ${oif}

    #

    ${fwcmd} add 455 allow icmp from any to any via ${oif} icmptype 0,8,12

    ${fwcmd} add 460 deny icmp from any to any frag

    #

    ${fwcmd} add 470 deny log icmp from any to 255.255.255.255 in via ${oif}

    ${fwcmd} add 480 deny log icmp from any to 255.255.255.255 out via ${oif}

    #Otpravim vsech na squid

    ${fwcmd} add 500 fwd 127.0.0.1,3128 tcp from ${inet}:${imask} to any 80 via ${iif}

    #Razreshim NAT

    ${fwcmd} add 510 divert natd all from any to any via ${oif}

    #Rubim hastie seti naoborot

    ${fwcmd} add 540 deny ip from 10.0.0.0/8 to any out via ${oif}

    ${fwcmd} add 550 deny ip from 127.16.0.0/12 to any out via ${oif}

    ${fwcmd} add 560 deny ip from 192.168.0.0/16 to any out via ${oif}

    ${fwcmd} add 570 deny ip from 0.0.0.0/8 to any out via ${oif}

    #

    ${fwcmd} add 580 deny ip from 169.254.0.0/16 to any out via ${oif}

    #

    ${fwcmd} add 590 deny ip from 224.0.0.0/4 to any out via ${oif}

    #

    ${fwcmd} add 595 deny ip from 240.0.0.0/4 to any out via ${oif}

    #

    #${fwcmd} add 600 allow tcp from any to any established

    ${fwcmd} add 610 allow ip from ${oip} to any out xmit ${oif}

    #Razreshim iz ineta dostup

    #${fwcmd} add 600 allow ip from any to any via ${oif}

    ${fwcmd} add 700 allow tcp from any 53 to any via ${oif}

    ${fwcmd} add 705 allow tcp from any 25 to any via ${oif}

    ${fwcmd} add 710 allow tcp from any 80 to any via ${oif}

    ${fwcmd} add 720 allow udp from any 53 to any via ${oif}

    ${fwcmd} add 725 allow udp from any 25 to any via ${oif}

    ${fwcmd} add 730 allow udp from any 80 to any via ${oif}

    ${fwcmd} add 740 allow tcp from any to any 110,143,443,495,587 via ${oif}

    ${fwcmd} add 760 allow udp from any to any 110,143,443,495,587 via ${oif}

    ${fwcmd} add 780 deny tcp from any to any 3306,3307 via ${oif}

    ${fwcmd} add 790 deny tcp from any to any 3128,3130 via ${oif}

    ${fwcmd} add 800 deny tcp from any to any 1-1024 via ${oif}

    ${fwcmd} add 810 deny udp from any to any 1-1024 via ${oif}

    ${fwcmd} add 820 allow tcp from any to any 1025-65535 via ${oif}

    ${fwcmd} add 830 allow udp from any to any 1025-65535 via ${oif}

     

    #Zapretim paketi na em1 s adresami providera

    ${fwcmd} add 1010 deny log all from ${onet}:${omask} to any via ${iif}

     

    #Autorizator Ztargazer

    ${fwcmd} add 2000 allow udp from ${inet}:${imask} to ${iip} 5555 via ${iif}

    ${fwcmd} add 2010 allow udp from ${iip} to ${inet}:${imask} via ${iif}

    #Configurator Stargazer

    ${fwcmd} add 2020 allow tcp from ${admip} to ${iip} 5555 via ${iif}

    ${fwcmd} add 2030 allow log tcp from ${admip} to ${iip} 4444 via ${iif}

    ${fwcmd} add 2040 allow log tcp from ${iip} to ${admip} via ${iif}

     

    #SSH

    ${fwcmd} add 2100 allow tcp from ${admip} to ${iip} 22 via ${iif}

    ${fwcmd} add 2110 allow tcp from ${iip} to ${admip} via ${iif}

    #

    ${fwcmd} add 2120 allow tcp from any to any via ${iif}

    ${fwcmd} add 2130 allow udp from any to any via ${iif}

    ${fwcmd} add 2140 allow icmp from any to any via ${iif}

    #Razreshim NAT

    #${fwcmd} add 51000 divert natd all from any to any via ${oif}

    #

    ${fwcmd} add 51029 allow tcp from any to any out via ${oif} setup

    ${fwcmd} add 51030 allow tcp from any to any via ${oif} established

    #

    ${fwcmd} add 65534 deny ip from any to any

     

     

    Что не так сделал? Где "сидит" ошибка?

×
×
  • Створити нове...