«Яндекс» представили свою смарт-колонку в мае 2018 года, и с тех пор техническое сообщество с нетерпением ждало поступления этого девайса в продажу. И вот — дождались! «Яндекс.Станция» официально представлена в продаже, и купить её может любой желающий. Что же получит покупатель? Рассмотрим основные характеристики и умения российской мультимедиа-станции.
Чтобы поменять пароль Wi-Fi сети через веб-интерфейс вашего роутера, не нужно быть IT-специалистом. Без особых ухищрений это делается буквально за пару минут.
FreeRADIUS is a high performance RADIUS Server that accepts a large number of networking devices as RADIUS Client including MikroTik Router. MySQL is one of the best user sources for freeRADIUS server. In my previous article, I discussed how to install freeRADIUS server on CentOS 7 and how to integrate MySQL module with freeRADIUS server. I also discussed how to create user group and profile in MySQL database server and authenticate MikroTik PPPoE client with MySQL database user. I used MySQL Command Line Interface (CLI) to insert user information in database server. But most of the people like Graphical User Interface (GUI) rather than Command Line Interface (CLI). A lot of Graphical Software (such as MySQL Workbench, DBTools Manager, phpMyAdmin and so on) can be found to manage MySQL (MariaDB) database graphically. Among these, in this article I will show how to install and configure phpMyAdmin to manage freeRADIUS MySQL database because phpMyAdmin is a free MySQL (MariaDB) management tool over Web Interface.
phpMyAdmin Installation and Configuration on CentOS 7
phpMyAdmin is a free and open source MySQL and MariaDB database administration tool that is written in PHP and can manage over Web Interface. So, to get phpMyAdmin we should have PHP installed and Web Server (http service) running. As our freeRADIUS Server and MariaDB Database Server are running on CentOS 7, we will only install and configure Web Server, PHP and phpMyAdmin and then login to our MariaDB Database Server with phpMyAdmin Web Interface and manage our freeRADIUS users. The following steps will show how to install and configure Web Server, PHP and phpMyAdmin.
Step 1: Apache Web Server Installation and Configuration
Apache is an open-source and multi-platform web server application. Apache has a full range of web server features including CGI, SSL and virtual domains. In CentOS Linux, the Apache Server package is httpd (HTTP Daemon). So, we will now install httpd package that will turn on Apache HTTP Server in CentOS Linux.To install Apache HTTP Server, issue the following command from your CentOS 7 terminal.
[root@freeradius ~]# yum install httpd -y
The httpd package will be installed within a few second. After installing apache httpd package, we have to start the Apache service with the following command.
[root@freeradius ~]# systemctl start httpd
Apache service is now active and running and waiting for the incoming web (http) requests. The daemon will now answer any incoming http request.
But if your server gets rebooted in any case, the httpd daemon will not be stated automatically. So, run the following commend to start apache service automatically if any system restart is occurred.
[root@freeradius ~]# systemctl enable httpd
You can check your web server status at any time with the following command.
[root@ freeradius ~]# systemctl status httpd
HTTP Service runs on TCP 80 port. So, we have to allow port 80 or http service in CentOS firewall.
So, issue the following firewall commands to allow http service through your firewall.
Now open your web browser and navigate to http://localhost/ from your server or http://server-ip-address/ from any network workstation. If everything is OK, you will get the apache test page like the below image.
Apache Server on Centos 7
Step 2: PHP Installation
After installing http service, we have to install PHP because phpMyAdmin is written in PHP (hypertext preprocessor) server side scripting language. To install PHP in CentOS Linux, issue the following command in your terminal.
[root@freeradius ~]# yum install php php-mysql -y
Now install some common PHP modules that are sometimes required with the following command.
To test PHP installation, create a simple php file (testphp.php) in Apache document root folder (by default /var/www/html) with the following command.
[root@freeradius ~]# vim /var/www/html/testphp.php
And add the following php code in this file.
<?php phpinfo(); ?>
Now restart httpd service with the following command.
[root@freeradius ~]# systemctl restart httpd
Type http://ip-address/testphp.php in your browser to open phptest.php file. If everything is OK, you will fing all the details about PHP such as PHP version, build date and commands etc like the below image.
PHP Installation on CentOS 7
Step 3: phpMyAdmin Installation
We will now install phpMyAdmin in our CentOS Linux. By default phpMyAdmin is not found in CentOS official repositories. So, we have to install it using EPEL repository. To install EPEL repository, first download EPEL package with the wget command and then install it in your CentOS system according to the following command.
EPEL repository is now ready. So, issue the following command to install phpMyAdmin.
[root@freeradius ~]# yum install phpmyadmin –y
phpMyAdmin is now installed in our CentOS Linux. But before getting phpMyAdmin web interface, we have to do a simple configuration.
phpMyAdmin Configuration
To get phpMyAdmin web interface, we have to edit the phpmyadmin.conf file. So, open phpmyadmin.conf file with a text editor.
[root@freeradius ~]# vim /etc/httpd/conf.d/phpMyAdmin.conf
Now find and comment the whole <Directory> section as shown below.
[…] Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
#<Directory /usr/share/phpMyAdmin/>
# <IfModule mod_authz_core.c>
# # Apache 2.4
# Require local
# </IfModule>
# <IfModule !mod_authz_core.c>
# # Apache 2.2
# Order Deny,Allow
# Deny from All
# Allow from 127.0.0.1
# Allow from ::1
# </IfModule>
#</Directory>
[…]
And add the following lines just below the commented section.
<Directory /usr/share/phpMyAdmin/> Options none AllowOverride Limit Require all granted </Directory>
Restart the httpd service with the following command.
[root@freeradius ~]# systemctl restart httpd
Now phpMyAdmin can be found by navigating http://server-ip-address/phpmyadmin/ from your web browser.
phpMyAdmin Login Page
Now login to phpMyAdmin with your root user credential and you will find all the databases in your MySQL or MariaDB database server including our desired radius database. Click on the radius database and you will find the tables created in radius database in the right panel. Click on any table and you will find inserted data in your table.
phpMyAdmin with radius database
You can export your database or import a backup database with the Export and Import tab respectively as well as you can do any database operation from here graphically.
We will now insert a new user (jack) who will get 2M_Profile. So, his two entries in radcheck table will be…
username
attribute
op
value
jack
Cleartext-Password
:=
passme
jack
User-Profile
:=
2M_Profile
By default phpMyAdmin provides two rows at a time to insert. But we want to insert one row at a time. So, we need to change the default settings. The following steps will show how to change default edit mode in phpMyAdmin.
Click on Settings tab from phpMyAdmin home page.
Under Settings tab, click on Main panel button and then click on Edit mode tab.
From Edit mode tab, change Number of inserted rows from 2 to 1.
Now click Apply button.
Change default inserted row
Default insert row has been changed. Now click on radius database and click on radcheck table and then click on Insert tab. Put username (jack), attribute (Cleartext-Password), op (:=) and value (passme) for jack user and click Go button.
user input in radcheck table
You will find 1 row inserted message. Click on Browse button and you will find jack is inserted here. Now click Insert tab again to insert jack’s profile. Put username (jack), attribute (User-Profile), op (:=) and value (2M_Profile) for jack user and click Go button.
input user profile in radcheck table
Clicking browse button, you will also find that the profile of jack user has been inserted there.
radcheck table of radius database
New user creation with user profile has been completed with the phpMyAdmin database management tool. You can create as many users as you need following this step. Now we will check this user with the radtest program. So, login to the radius server with root user credential and issue the following command.
[root@freeradius ~]# radtest jack passme 127.0.0.1 100 testing123 1
Sent Access-Request Id 73 from 0.0.0.0:36674 to 127.0.0.1:1812 length 80
User-Name = “jack”
User-Password = “passme”
NAS-IP-Address = 192.168.40.10
NAS-Port = 100
Message-Authenticator = 0x00
Framed-Protocol = PPP
Cleartext-Password = “passme”
Received Access-Accept Id 73 from 127.0.0.1:1812 to 0.0.0.0:0 length 136
Framed-Protocol = PPP
Framed-Compression = Van-Jacobson-TCP-IP
Framed-Pool = “2M_pool”
Mikrotik-Rate-Limit = “2M/2M 4M/4M 2M/2M 40/40”
Reply-Message = “Hello jack! The database time is now 01:56:07. Your usage is 0”
[root@freeradius ~]#
If everything is OK, you will find the above output that means jack is a freeRADIUS user who is able to use PPP service and his bandwidth limit is 2mbps. So, you can use this user to authenticate as a MikroTik PPPoE client that I described in the previous article.
How to install and configure phpMyAdmin database management tool to manage freeRADIUS MySQL database has been discussed in this article. I hope you will be able to install phpMyAdmin to manage your freeRADIUS MySQL. However, if you face any confusion, discuss in comment or contact with me from Contact page. I will try my best to stay with you. In near future, we will learn freeRADIUS unlang to control freeRADIUS process as well as how to control freeRADIUS graphically with PHP language. So, keep tune with SystemZone.
Голосовые помощники сегодня умеют выдавать не только стандартные заготовки ответов, но и вполне свободные реплики. Например, Алиса от «Яндекс» обладает даже специальным режимом-«болталкой», в котором помощница не реагирует на команды и приказы, а её ответы приближены к живой речи. Но если вам захотелось показать искусственному интеллекту, кто тут умнее, то попробуйте сказать Алисе одну из «кодовых фраз», на которые ассистент выдаст странный или смешной ответ.
Как пользователь WordPress, придет время, когда вам нужно будет загрузить некоторые типы файлов на ваш сайт.
Возможно, вы создаете веб-сайт, который позволяет пользователям загружать файлы, или, возможно, вы хотите добавить загружаемый файл в свою почтовую форму.
Однако вскоре вы обнаружите, что WordPress на самом деле не нравится, когда вы загружаете файлы определенных типов. Если вы попытаетесь загрузить файл, который не нравится WordPress, вы получите сообщение об ошибке «Извините, этот тип файла недопустим по соображениям безопасности».
К счастью, есть легкое решение этой проблемы, и мы будем шаг за шагом рассказывать вам о ней.
Что означает «Извините, этот тип файла недопустим по соображениям безопасности»?
Прежде всего, это распространенная ошибка для большинства блогеров и пользователей WordPress. Так что не пугайтесь и не паникуйте. Проблема также может быть легко решена.
В этой ошибке виновата собственная система WordPress. Несмотря на то, что WordPress является системой управления контентом, она все еще имеет очень строгую систему фильтрации, позволяющую принимать в систему только несколько типов файлов.
И при попытке загрузить файл, которого нет в списке поддерживаемых файлов WordPress , вы столкнетесь с ошибкой «Извините, этот тип файла недопустим по соображениям безопасности».
Что вызывает эту ошибку?
Как вы знаете, существует множество различных типов файлов, используемых различными типами приложений. Например, .AI — это очень распространенный тип файлов, используемый Adobe Illustrator.
Этот тип файла широко используется дизайнерами и иллюстраторами для сохранения и обмена своими работами. Но не удивляйтесь, если при попытке загрузить файл .AI в WordPress появляется ошибка «Извините, этот тип файла недопустим по соображениям безопасности», поскольку этот тип файла отсутствует в списке поддерживаемых файлов WordPress.
Это полный список типов файлов, разрешенных в WordPress по умолчанию.
Удивительно, что WordPress по-прежнему не поддерживает популярные и распространенные типы файлов, такие как Illustrator, по умолчанию. И это только один из десятков типов файлов, которые WordPress до сих пор не поддерживает.
Так что да, на этот раз вы можете обвинить WordPress в том, что он провел вас через эту запутанную ошибку. Но вы можете исправить эту проблему вручную, чтобы загрузить любой тип файла, который вы хотите.
Как исправить ошибку
Существует два простых способа исправить ошибку «Извините, этот тип файла недопустим по соображениям безопасности». Один метод требует использования плагина, а другой требует редактирования основного файла WordPress.
Прежде чем продолжить, мы настоятельно рекомендуем сделать резервную копию вашего сайта. Если у вас еще нет системы резервного копирования, вы можете настроить ее с помощью бесплатного плагина.
Метод 1: Используйте плагин Mime Types
Существует несколько плагинов MIME-типов, которые помогут вам добавить свои собственные типы файлов в список поддерживаемых файлов WordPress, например Pro Mime Types , Mime Typs Extended и Unsafe Mimetypes. К сожалению, большинство из этих плагинов устарели.
Мы используем плагин WP Add Mime Types для этой статьи, так как он был обновлен для поддержки последних версий WordPress. Не стесняйтесь попробовать и использовать другой плагин, если хотите.
Шаг 1: Установка плагина WP Add Mime Types
Чтобы установить плагин, войдите в свою панель управления WordPress и перейдите в раздел Плагины >> Добавить новый.
Найдите плагин WP Add Mime Types и нажмите кнопку «Установить», а затем «Активировать», чтобы включить плагин.
Шаг 2: Настройка плагина
После установки на странице настроек появится новая страница, которая называется Mime Type Settings. На этой странице вы можете добавить определенные типы файлов, чтобы добавить их в систему WordPress.
Найдите тип файла, который вы хотите добавить, и скопируйте и вставьте его в поле «Add values» . Убедитесь, что вы скопировали всю строку, связанную с расширением типа файла, который вы пытаетесь добавить.
Затем нажмите кнопку Сохранить, чтобы сохранить изменения. Как только тип файла будет включен, он будет выделен красным цветом в списке.
Единственная проблема этого метода заключается в том, что даже плагины MIME-типов имеют ограничения при добавлении файлов определенных типов. Например, плагин не позволяет загружать файлы .AI. Но второй способ позволяет избежать этой проблемы и загрузить любой файл, который вы хотите.
Способ 2: Отредактировать файл wp-config
wp-config.php — это основной файл, используемый WordPress, который обрабатывает многие функции WordPress. Вы можете отредактировать этот файл, чтобы отключить систему, которая предотвращает загрузку файлов определенных типов. После этого вы сможете загружать файлы любого типа.
Шаг 1: Доступ к вашему серверу
Вы можете редактировать файл wp-config, используя клиентское приложение FTP или войдя в свой сервер CPanel и используя Диспетчер файлов.
Перейдите в общую папку, где расположен ваш веб-сайт WordPress, и где находятся все основные файлы WordPress.
Шаг 2: Отредактируйте wp-config.php
Затем откройте и отредактируйте файл wp-config .
Как только вы откроете файл, просто найдите строку /* That’s all, stop editing! Happy blogging. */.
Затем вставьте следующую строку кода прямо над ней.
define (‘ALLOW_UNFILTERED_UPLOADS’, true);
Вот и все!
Все еще получаете ту же ошибку?
Вышеуказанные методы должны помочь вам загрузить практически любой тип файла, который вы хотите в WordPress. Однако, если вы все еще получаете ту же ошибку, вы должны попытаться связаться с вашим хостинг-провайдером и обратиться за помощью.
Некоторые веб-узлы запрещают загрузку определенных типов файлов по соображениям безопасности. Если вы продолжаете получать сообщение об ошибке и вам крайне необходимо загрузить файл в WordPress, обратитесь в службу поддержки хостинг-провайдера и посмотрите, есть ли у них фильтры, которые не позволяют вам загружать какие-либо файлы.