Debian 9 Stretch Install Goip Sms Server

Последние обновления:

http://www.hybertone.com/en/news_detail.asp?newsid=21

http://43.249.30.99/update/

Полный список файлов для Goip:

http://118.142.51.162/update/

Возможные проблемы

Запуск Goipcron требует библиотеки ia32-libs, которая признана устаревшей.
При попытке запустить goipcron появляется следующая ошибка:

./goipcron: error while loading shared libraries: libgssapi_krb5.so.2: cannot open shared object file: No such file or directory

Исправляется включением 386 архитектуры:

dpkg --add-architecture i386
apt-get update
apt-get install lib32z1 lib32ncurses5
apt-get install libgssapi-krb5-2:i386

Установка:

cd /usr/src
wget http://118.142.51.162/update/goip_install-v1.26.tar.gz
tar zxvf goip_install-*
cd goip_install
./goip_install.sh
Выхлоп установочного скрипта
Starting GoIP SMS System install 
 
Configure httpd config:
Enter the httpd config file PATH: (default: /etc/apache2/sites-enabled)
Default press Enter
 
Import Goip Databases 
Enter the Mysql root password if the password exist:
 
Enter your Mysql PATH: (default: /usr/bin/mysql)
Default press Enter
 
Copying file to /usr/local/goip
goipcron start
Install finished.
Please restart your httpd
SMS SERVER management URL: http://your_ip/goip

Проверим старт:

ps aux | grep "goipcron" | grep -v "grep"
root      6633  0.0  0.0   7044   424 ?        S    08:29   0:00 ./goipcron inc/config.inc.php
root      6634  0.0  0.1   9144  5428 ?        S    08:29   0:00 ./goipcron inc/config.inc.php

Чудненько,осталось только добавить в автостарт:

touch /etc/systemd/system/goipcron.service
cat >> /etc/systemd/system/goipcron.service << EOF
[Unit]
Description=Start SMS Goip Server
 
[Service]
WorkingDirectory=/usr/local/goip/
Type=forking
ExecStart=/bin/bash run_goipcron
KillMode=process
 
[Install]
WantedBy=default.target
 
EOF

Включим:

systemctl daemon-reload
systemctl enable goipcron.service

Ответ:

Created symlink /etc/systemd/system/default.target.wants/goipcron.service → /etc/systemd/system/goipcron.service.

Проверка:

# systemctl status goipcron.service
 
● goipcron.service - Starts some bash script
   Loaded: loaded (/etc/systemd/system/goipcron.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-05-17 10:46:03 EDT; 1s ago
  Process: 942 ExecStart=/bin/bash auto_goipcron.sh (code=exited, status=0/SUCCESS)
 Main PID: 945 (goipcron)
    Tasks: 2 (limit: 9830)
   CGroup: /system.slice/goipcron.service
           ├─945 ./goipcron inc/config.inc.php
           └─946 ./goipcron inc/config.inc.php
 
May 17 10:46:03 lt214 systemd[1]: Starting Starts some bash script...
May 17 10:46:03 lt214 systemd[1]: Started Starts some bash script.
Настройки шлюза

Configurations > Sms
(для каждого порта)

Настройки сервера

System Manage > Goip Manage

2019/05/17 · Oleg Zvezdo4kin · 0 комментариев (-я)

Debian9 Stretch Configure Locale en_US.UTF-8

WTF Russians?

apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
Reading changelogs... Done
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "ru_RU.UTF-8",
	LC_MONETARY = "ru_RU.UTF-8",
	LC_ADDRESS = "ru_RU.UTF-8",
	LC_TELEPHONE = "ru_RU.UTF-8",
	LC_NAME = "ru_RU.UTF-8",
	LC_MEASUREMENT = "ru_RU.UTF-8",
	LC_IDENTIFICATION = "ru_RU.UTF-8",
	LC_NUMERIC = "ru_RU.UTF-8",
	LC_PAPER = "ru_RU.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 26424 files and directories currently installed.)
Configure
export LANGUAGE=en_US.UTF-8 &&
export LANG=en_US.UTF-8 &&
export LC_ALL=en_US.UTF-8 &&
locale-gen en_US.UTF-8 &&
dpkg-reconfigure locales
2019/05/17 · Oleg Zvezdo4kin · 0 комментариев (-я)

Debian 9 php5.6 Install

apt install ca-certificates apt-transport-https 
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list
apt update
apt install php5.6
apt install php5.6-cli php5.6-common php5.6-curl php5.6-mbstring php5.6-mysql php5.6-xml

https://tecadmin.net/install-php-debian-9-stretch/

2019/05/17 · Oleg Zvezdo4kin · 0 комментариев (-я)

ubuntu_remap_super_key

I have a keyboard without the "Win" key.

:-\

Reassigned this function to "Alt"

Default:
$ xmodmap -pm
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
Remove "Super Key" from "mod4"
$ xmodmap -e "remove mod4 = Super_L"
$ xmodmap -e "remove mod4 = Super_R"
$ xmodmap -pm
xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
Add "Super_L" to "mod1"
xmodmap -e "add mod1 = Super_L"
$ xmodmap -pm
xmodmap:  up to 5 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Super_L (0x85),  Meta_L (0xcd),  Super_L (0xce)
mod2        Num_Lock (0x4d)
mod3      
mod4        Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
Why?

Ctrl+Alt+right_arrow

Ctrl+Alt+left_arrow

https://habr.com/ru/post/222285/

2019/05/13 · Oleg Zvezdo4kin · 0 комментариев (-я)

freeswitch a1-hash and password generating

md5(id:domain:password)
a1-hash & password for Directory in Postgresql

 apt-get install uuid
#!/bin/bash
s=$(date +%d-%m-%y_%H:%M:%S)
d=pass_gen_md5-$s
RES=`su -c "psql -t -d DB -c  'SELECT domain, id FROM directory';" USER`
printf "$RES" >> $d
echo "" >> $d
while IFS="|" read domain id; do
	trdom=`echo "$domain" | tr -d [:blank:]`
	trid=`echo "$id" | tr -d [:blank:]`
	pswd=`uuid | tr -d [:blank:]-`
    hash=`echo "$trid:$trdom:$pswd" | md5sum | tr -d [:blank:]-`
    #su -c "psql -d DB -c \"UPDATE directory SET password = '$hash' where id = '$trid'\";" USER
    echo "$trid:$trdom:$pswd"
    echo "$trid:$trdom:$pswd" | md5sum | tr -d [:blank:]-
done < $d

<< Новые записи | Предыдущие записи >>

Только авторизованные участники могут оставлять комментарии.
  • blog.txt
  • Последние изменения: 2019/03/27