Jump to content

Rss читалка TinyTinyRss на Keenetic


Recommended Posts

Добрый день. Можно ли как нибудь сделать установку из "пакета" на Keenetic Giga 2 данной читалки. Уж больно хороша, а знаний по данной рецептуре инсталлировать не хватает. ( https://habrahabr.ru/post/185876/ ). Было бы здорово. Спасибо.

Link to comment
Share on other sites

Мне кажется, что задача на столько простая, что ее можно реализовать на базе curl, какого-нибудь xml парсера и баш...

Link to comment
Share on other sites

Если вы желаете установить TT-RSS, то «догонять» придётся. Нельзя зажмурившись ввести несколько команд с консоли, чтобы сделать круто. Придётся разбираться в деталях.

Вот пример установки TT-RSS на Entware,

видео, показывающее скорость работы TT-RSS на Asus RT-N66U (256MB RAM, 600MHz MIPS CPU).
Link to comment
Share on other sites

Мне кажется, что задача на столько простая, что ее можно реализовать на базе curl, какого-нибудь xml парсера и баш...
Кто-то использовал rawdog на Питоне. Довольно легковесный скрипт, генерит статический HTML из RSS/Atom-потока.
Link to comment
Share on other sites

  • 2 weeks later...

tt-rss

nginx

 

Скрытый текст

 

устарело...

Устанавливаем минимальный набор пакетов (чтоб запустить)


opkg install nginx php7-fastcgi php7-mod-curl php7-mod-dom php7-mod-hash php7-mod-iconv \
php7-mod-json php7-mod-mbstring php7-mod-mysqli php7-mod-session mariadb-server \
mariadb-client mariadb-client-extra

Правим nginx.conf примерно до следующего вида:


user  nobody;
worker_processes  1;

events {
   worker_connections  64;
}

http {
   include       mime.types;
   default_type  application/octet-stream;

   sendfile        on;

   keepalive_timeout  65;

   server {
       listen       88;
       server_name  localhost;

       location / {
           root   /opt/share/www;
           index  index.php index.html index.htm;
       }

       error_page   500 502 503 504  /50x.html;
       location = /50x.html {
           root   /opt/share/nginx/html;
       }

       location ~ \.php$ {
           root           /opt/share/www;
           fastcgi_pass   unix:/opt/var/run/php-fcgi.sock;
           fastcgi_index  index.php;
           include        fastcgi_params;
       }
   }
}

Также правим fastcgi_params (добавим пару строк)


fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  PATH_INFO          $fastcgi_path_info;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi_param  REQUEST_SCHEME     $scheme;
fastcgi_param  HTTPS              $https if_not_empty;

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200; 

Создаем скрипт запуска S79php-fcgi


#!/bin/sh

export PHP_FCGI_CHILDREN=''

ENABLED=yes
PROCS=php-fcgi
ARGS="-b /opt/var/run/php-fcgi.sock &"
PREARGS=""
DESC=$PROCS
PATH=/opt/bin:/opt/sbin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

. /opt/etc/init.d/rc.func

Редактируем php.ini (минимум - прописать таймзону)


[Date]
date.timezone = Europe/Moscow

В файле /opt/etc/php5/mysqli.ini прописать путь до сокета


extension=mysqli.so
mysqli.default_socket = /opt/var/run/mysqld.sock

Проверяем корректность конфига nginx, если ошибок нет, то видим следующее


nginx -t
nginx: the configuration file /opt/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /opt/etc/nginx/nginx.conf test is successful

Если есть ошибки, то сообщит с указанием строки (в конфиге выше - закоментировал строку #location)


nginx -t
nginx: [emerg] "fastcgi_pass" directive is not allowed here in /opt/etc/nginx/nginx.conf:34
nginx: configuration file /opt/etc/nginx/nginx.conf test failed

Создаем файл с выводом информации о РНР


echo "<?php phpinfo(); ?>" >> /opt/share/www/phpinfo.php

Стартуем сервисы


 /opt/etc/init.d/S79php-fcgi start
/opt/etc/init.d/S80nginx start

Идем по ip.add.re.ss:88/phpinfo.php и смотрим на вывод (если ничего нет - проверяем, что сделали не так)

Cкачать и распаковать архив с tt-rss любым удобным способом (в примере ниже - будет использоваться путь: /opt/share/www/tt-rss)

Создаём базу данных (БД)


mysql_install_db --datadir=/opt/var --basedir=/opt --force

Запускаем сервис


/opt/etc/init.d/S70mariadbd start

Задаем пароль для доступа к БД (в примере ниже - Passw0rd)


mysqladmin -u root password "Passw0rd"
Подключаемся к БД с созданным паролем

mysql -u root -p

Создаем БД для Tiny Tiny RSS


create database ttrss;

Меняем БД для работы с ней


\u ttrss

Импортируем таблицы


source /opt/share/www/tt-rss/schema/ttrss_schema_mysql.sql

Выход из MySQL


 \q

Перезапустим сервис, чтоб подхватилась созданная БД


/opt/etc/init.d/S70mariadbd restart

 

Переходим в браузере на ip.add.re.ss:88/tt-rss/install , появится страница настройки доступа к БД.

выбираем - MySQL и вписываем:

Username: root - имя пользователя для работы с БД

Password: Passw0rd - пароль доступа к БД

Database name: ttrss - имя БД для Tiny Tiny RSS

Host name: localhost

Port: 3306

Если всё хорошо, то вы увидите следующее:

ttrss_002.png

Нажимаем кнопку «Test configuration».

Нажимаем кнопку «Initialize database». Инсталлятор сгенерирует файл config.php и положит на сервер.

ttrss_003.png

Для сохранения конфигурации нажимаем кнопку «Save configuration»

ttrss_004.png

Внизу находится ссылка с текстом «loading tt-rss now»

ttrss_005.png

Нажимаем и... Ругается что нельзя запускать от рута
Редактируем /opt/share/www/tt-rss/include/sanity_check.php. Ищем строку  if (function_exists('posix_getuid') && posix_getuid() == 0 { и меняем 0  на -1 см. пост ниже
Обновляем страничку в браузере вводим логин admin, пароль password
ttrss_006.png
Для обновления фидов добавляем в cron задание, напр., запрос новостей каждые 30 мин.

*/30  * * * * /opt/bin/php-cgi /opt/share/www/tt-rss/update.php --feeds --quiet

 

Edited by TheBB
подготовка к "зачистке"
Link to comment
Share on other sites

  • 2 weeks later...

Добрый день. Все сделал как сказано. Сервисы стартанули все отлично. Перед этим создал файл /opt/share/www/phpinfo.php с указанным выше содержанием. Но когда попытался пробросить порт для доступа к 88 порту выпали ошибки такого плана:

Core::Configurator: ip static: execute denied[http/ci //former.editor[submit]/former.editor[save]/NdmRequestPack[response]/NdmRequestPack[response]...[response]].

И все! Затык! Что я сделал не так??? :(:shock:

Link to comment
Share on other sites

Добрый день. Все сделал как сказано. Сервисы стартанули все отлично. Перед этим создал файл /opt/share/www/phpinfo.php с указанным выше содержанием. Но когда попытался пробросить порт для доступа к 88 порту выпали ошибки такого плана:

Core::Configurator: ip static: execute denied[http/ci //former.editor[submit]/former.editor[save]/NdmRequestPack[response]/NdmRequestPack[response]...[response]].

И все! Затык! Что я сделал не так??? :(:shock:

Такая ошибка возникает, если у пользователя, под которым выполняется команда, стоят права "Нельзя ничего настраивать (readonly)" см. настройки во вкладке "Пользователи".
Link to comment
Share on other sites

Проверил, галочки стояли, но как то странно через несколько минут порт прописался. Но все равно дальше при переходе на "мой ip:88/phpinfo.php" не пускает:

An error occurred.

Sorry, the page you are looking for is currently unavailable.

Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx.

может я файл не там и не тот создал??? "Создаем файл с выводом информации о РНР" если можно, уточните где его создать?

Link to comment
Share on other sites

... может я файл не там и не тот создал??? "Создаем файл с выводом информации о РНР" если можно, уточните где его создать?

в примере: /opt/share/www/phpinfo.php со следующим содержанием <?php phpinfo(); ?>

смотрите лог /opt/var/log/nginx/error.log

Link to comment
Share on other sites

... может я файл не там и не тот создал??? "Создаем файл с выводом информации о РНР" если можно, уточните где его создать?

в примере: /opt/share/www/phpinfo.php со следующим содержанием <?php phpinfo(); ?>

смотрите лог /opt/var/log/nginx/error.log

Вот что в логе:

2016/04/28 18:07:51 [crit] 564#0: *2 connect() to unix:/opt/var/run/php-fcgi.sock failed (13: Permission denied) while connecting to upstream, client: XX.XX.XX.XX, server: localhost, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://unix:/opt/var/run/php-fcgi.sock:", host: "XX.XX.XX.XX:88"

Link to comment
Share on other sites

  • 11 months later...

Добрый день. Так получилось, что тему приходится реанимировать.

Итак: после команд создания базы данных и запуска сервиса

Запускаем сервис

/opt/etc/init.d/S70mariadbd start

Задаем пароль для доступа к БД (в примере ниже - Passw0rd)

mysqladmin -u root password "Passw0rd"

Получаю:

~ # /opt/etc/init.d/S70mariadbd start
~ # mysqladmin -u root password "Passw0rd"
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/opt/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/opt/tmp/mysql.sock' exists!

Файла mysql.sock в папке tmp не создало.... После создания вручную, и запуска сервиса он пропадает. Что можно сделать??? Спасибо
 

Link to comment
Share on other sites

  • 2 months later...

обновляем список пакетов

opkg update

устанавливаем следующие пакеты

opkg install ca-certificates nginx php7-fastcgi php7-mod-curl php7-mod-dom php7-mod-hash php7-mod-iconv \
php7-mod-json php7-mod-mbstring php7-mod-mysqli php7-mod-session mariadb-server mariadb-client-extra

загружаем и распаковываем архив tt-rss (версии могут меняться со временем)

curl https://git.tt-rss.org/fox/tt-rss/archive/17.4.tar.gz -o - | tar xzv -C /opt/share/www/

забегая вперёд, правим запуск для root`a

sed -i 's|posix_getuid() == 0|posix_getuid() == -1|' /opt/share/www/tt-rss/include/sanity_check.php

редактируем файлы:

/opt/etc/nginx/nginx.conf

Скрытый текст

 
user  nobody;
worker_processes  1;

events {
   worker_connections  64;
}

http {
   include       mime.types;
   default_type  application/octet-stream;

   sendfile        on;

   keepalive_timeout  65;

   server {
       listen       88;
       server_name  localhost;

       location / {
           root   /opt/share/www;
           index  index.php index.html index.htm;
       }

       error_page   500 502 503 504  /50x.html;
       location = /50x.html {
           root   /opt/share/nginx/html;
       }

       location ~ \.php$ {
           root           /opt/share/www;
           fastcgi_pass   unix:/opt/var/run/php-fcgi.sock;
           fastcgi_index  index.php;
           include        fastcgi_params;
       }
   }
}

 

/opt/etc/nginx/fastcgi_params

Скрытый текст

fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  PATH_INFO          $fastcgi_path_info;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi_param  REQUEST_SCHEME     $scheme;
fastcgi_param  HTTPS              $https if_not_empty;

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200; 

 

создаём скрипт запуска

Скрытый текст

#!/bin/sh

export PHP_FCGI_CHILDREN=''

ENABLED=yes
PROCS=php-fcgi
ARGS="-b /opt/var/run/php-fcgi.sock &"
PREARGS=""
DESC=$PROCS
PATH=/opt/bin:/opt/sbin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

. /opt/etc/init.d/rc.func

 

и делаем его исполняемым

chmod +x /opt/etc/init.d/S79php-fcgi

дописываем путь до сокета

echo "mysqli.default_socket = /opt/tmp/mysql.sock" >> /opt/etc/php7/20_mysqli.ini

проверяем конфигурацию nginx на ошибки

nginx -t

создаём файл для проверки php

echo "<?php phpinfo(); ?>" >> /opt/share/www/phpinfo.php

устанавливаем базу данных и запускаем сервис

mysql_install_db
...
/opt/etc/init.d/S70mariadbd start

задаём (свой) пароль и подключаемся

mysqladmin -u root password "Passw0rd"
...
mysql -u root -p

создаём базу данных и импортируем шаблоны таблиц (команды вводим последовательно)

create database ttrss;
...
\u ttrss
...
source /opt/share/www/tt-rss/schema/ttrss_schema_mysql.sql
...
\q

запускаем сервисы (если запущены - перезапускаем)

/opt/etc/init.d/S70mariadbd restart
...
/opt/etc/init.d/S79php-fcgi start
...
/opt/etc/init.d/S80nginx start

проверяем работу сервера: http://ip.add.re.ss:88/phpinfo.php , где `ip.add.re.ss` - адрес устройства в сети

открываем страницу http://ip.add.re.ss:88/tt-rss/install/ и настраиваем (см. "картинки" выше)

 

Для обновления фидов добавляем в cron задание (напр., каждые 30 мин.)

*/30  * * * * /opt/bin/php-cgi /opt/share/www/tt-rss/update.php --feeds --quiet

 

Edited by TheBB
cron
  • Thanks 1
Link to comment
Share on other sites

Сделал все как написано.

Получил во время установки базы: 

Скрытый текст

 


~ # mysql_install_db
WARNING: The host 'Keenetic_Giga3' could not be looked up with /opt/bin/resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MariaDB version. The MariaDB daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MariaDB privileges !
Installing MariaDB/MySQL system tables in '/opt/var/mysql/' ...
180205 15:50:40 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
180205 15:50:40 [Note] /opt/bin/mysqld (mysqld 5.5.58-MariaDB) starting as process 14588 ...
180205 15:50:40 [ERROR] mysqld: Can't lock aria control file '/opt/var/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds
^C180205 15:51:11 [ERROR] mysqld: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/opt/var/mysql/aria_log_control'
180205 15:51:11 [ERROR] Plugin 'Aria' init function returned error.
180205 15:51:11 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
ERROR: 1017  Can't find file: '/opt/tmp/#sql_38fc_0' (errno: 2)
180205 15:51:11 [ERROR] Aborting

180205 15:51:12 [Note] /opt/bin/mysqld: Shutdown complete

~ # mysqladmin -u root password "Passw0rd"
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
~ # mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.58-MariaDB Source distribution

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database ttrss;
ERROR 1007 (HY000): Can't create database 'ttrss'; database exists
MariaDB [(none)]> create database ttrs;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> \u ttrs
Database changed
MariaDB [ttrs]> source /opt/share/www/tt-rss/schema/ttrss_schema_mysql.sql
Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

........

Query OK, 0 rows affected (0.09 sec)

Query OK, 0 rows affected (0.10 sec)

Query OK, 0 rows affected (0.00 sec)

MariaDB [ttrs]> \q
Bye
~ # /opt/etc/init.d/S70mariadbd restart
~ # /opt/etc/init.d/S79php-fcgi start
 Starting php-fcgi...              already running.
~ # /opt/etc/init.d/S79php-fcgi restart
 Shutting down php-fcgi...              done.
 Starting php-fcgi...              done.
~ # /opt/etc/init.d/S80nginx start
nginx: [emerg] bind() to 0.0.0.0:88 failed (125: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:88 failed (125: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:88 failed (125: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:88 failed (125: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:88 failed (125: Address already in use)
nginx: [emerg] still could not bind()
~ # /opt/etc/init.d/S80nginx restart
Nginx restarted.

В итоге получаю следующее: 

и вот это : 

Checking database


Warning: mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/opt/var/run/mysqld.sock' (146) in /opt/share/www/tt-rss/install/index.php on line 116

Unable to connect to database using specified parameters.

База у меня обозвана "ttrs"

 

1.jpg

Edited by TheBB
спойлер
Link to comment
Share on other sites

Система Entware-3x или Entware-Keenetic?

Сегодня ставил на Entware-3x, чтоб переписать инструкцию, всё запустилось.

12 минуты назад, romanfly сказал:

Can't connect to local MySQL server through socket '/opt/var/run/mysqld.sock'

???

Link to comment
Share on other sites

проверьте в конфигах /opt/etc/ php.ini (если настраивали в нём) | php7/20_mysqli.ini | mysql/my.cnf путь до сокета mysql.sock

~ # cat /opt/etc/php7/20_mysqli.ini | grep socket
mysqli.default_socket = /opt/tmp/mysql.sock
~ #
~ # cat /opt/etc/mysql/my.cnf | grep socket
socket        = /opt/tmp/mysql.sock
~ # 

 

Link to comment
Share on other sites

В php.ini - ничего не менял;

php7/20_mysqli.ini 

extension=mysqli.so
mysqli.default_socket = /opt/tmp/mysql.sock

mysql/my.cnf ничего не менял

Скрытый текст

 


[client-server]
port        = 3306
socket        = /opt/tmp/mysql.sock

# https://mariadb.com/kb/en/mariadb/server-system-variables/

[mysqld]
user        = root
pid-file    = /opt/var/run/mariadb.pid
basedir        = /opt
lc_messages_dir    = /opt/share/mysql
lc_messages    = en_US

############ Don't put this on the NAND #############
# Figure out where you are going to put the databases
# And run mysql_install_db --force
datadir        = /opt/var/mysql/

######### This should also not go on the NAND #######
tmpdir        = /opt/tmp/

skip-external-locking

# this must be overridden, if replication is to be used
bind-address        = 127.0.0.1

#
# * Fine Tuning
#
max_connections    = 25
connect_timeout    = 5
wait_timeout = 600
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
myisam_sort_buffer_size = 64K
thread_cache_size = 8
thread_stack = 128K
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

#
# * Query Cache Configuration
#
# Cache only tiny result sets, so we can fit more in the query cache.
query_cache_limit = 128K
query_cache_size = 2M
# for more write intensive setups, set to DEMAND or OFF
#query_cache_type        = DEMAND

#
# * InnoDB
#
# Currently only InnoDB storage engine is supported by wsrep
default-storage-engine=innodb
# to avoid issues with 'bulk mode inserts' using autoinc
innodb_autoinc_lock_mode=2
#innodb_data_home_dir = /opt/var/mysql
innodb_data_file_path = ibdata1:10M:autoextend
# path to redo log files (can be put on separate file system)
#innodb_log_group_home_dir = /opt/var/mysql
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

#
# * Logging
#
# Be aware that this log type is a performance killer and that
# you can enable the log at runtime!
#general_log_file = /opt/var/log/mariadb.log
#general_log = 1
#
# Error logging goes to syslog due to /opt/etc/mariadb/conf.d/mysqld_safe_syslog.cnf.
#
# we do want to know about network errors and such
log_warnings = 2
#
# Enable the slow query log to see queries with especially long duration
slow_query_log=1
slow_query_log_file = /opt/var/log/mariadb-slow.log
long_query_time = 10
log_slow_rate_limit = 20
log_slow_verbosity = query_plan
log-queries-not-using-indexes
log_slow_admin_statements

#
# * Replication
#
# The following can be used as easy to replay backup logs or for replication.
# Replication Master Server (default)
#
#
# Replication Master
#
# required unique id between 1 and 2^32 - 1 defaults to 1 if
# master-host is not set but will not function as a master if omitted
server-id = 1
# binary logging is required for replication
log_bin = /opt/var/log/mariadb/mysql-bin.log
expire_logs_days    = 10
max_binlog_size         = 100M
#binlog_do_db        = include_database_name
#binlog_ignore_db    = include_database_name
#
#
# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin
#
# binary logging format - mixed recommended 
#binlog_format=mixed


[mysqldump]
quick
max_allowed_packet    = 16M

[mysql]
#no-auto-rehash    # faster start of mysql but no tab completition

[myisamchk]
key_buffer_size = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /opt/etc/mysql/conf.d/

 

 

Edited by TheBB
спойлер
Link to comment
Share on other sites

Отформатировал флешку в чистую.

Установил Entware-3x

Сделал все в точности как у Вас до пункта "задаём (свой) пароль и подключаемся"

 # /opt/etc/init.d/S70mariadbd start
~ # mysqladmin -u root password "Passw0rd"
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/opt/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/opt/tmp/mysql.sock' exists!

Вот что  я получил на выходе
 

Link to comment
Share on other sites

хм... тогда пробуем добавить имя хоста в /etc/hosts (на примере Giga2)

echo "127.0.0.1 Keenetic_Giga" >> /etc/hosts

или вместо 127... , адрес устройства в сети

Link to comment
Share on other sites

Сделал: echo "192.168.1.1 Keenetic_Giga" >> /etc/hosts

Получил:

# echo "192.168.1.1 Keenetic_Giga" >> /etc/hosts
~ # /opt/etc/init.d/S70mariadbd start
~ # mysqladmin -u root password "Passw0rd"
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/opt/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/opt/tmp/mysql.sock' exists!

 

Link to comment
Share on other sites

Файловая система точно линуксовая, только 2 или 3 сейчас не помню.

Права на tmp:777

Логи:

/opt/bin/mysqld, Version: 5.5.58-MariaDB (Source distribution). started with:
Tcp port: 3306  Unix socket: /opt/tmp/mysql.sock
Time                 Id Command    Argument
/opt/bin/mysqld, Version: 5.5.58-MariaDB (Source distribution). started with:
Tcp port: 3306  Unix socket: /opt/tmp/mysql.sock
Time                 Id Command    Argument
/opt/bin/mysqld, Version: 5.5.58-MariaDB (Source distribution). started with:
Tcp port: 3306  Unix socket: /opt/tmp/mysql.sock
Time                 Id Command    Argument
/opt/bin/mysqld, Version: 5.5.58-MariaDB (Source distribution). started with:
Tcp port: 3306  Unix socket: /opt/tmp/mysql.sock
Time                 Id Command    Argument
/opt/bin/mysqld, Version: 5.5.58-MariaDB (Source distribution). started with:
Tcp port: 3306  Unix socket: /opt/tmp/mysql.sock
Time                 Id Command    Argument

 

Link to comment
Share on other sites

С огромной помощью пользователя TheBB удалось установить по его рецептуре данный движок. За что  ему огромная благодарность. Банально не было места на флешке для баз данных. Вот и так бывает. :-)

Link to comment
Share on other sites

да, нехватка места для бинарных логов была )))

для примера, "реальная" база ttrss за пару-тройку лет с > 40000 записей

~ # du -h ../var/mysql/
196.0K	../var/mysql/ххх
200.0K	../var/mysql/хххх
4.0K	../var/mysql/test
996.0K	../var/mysql/mysql
56.4M	../var/mysql/ttrss
85.9M	../var/mysql/
~ #
~ # du -h ../var/log/mariadb
54.3M	../var/log/mariadb

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...