Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the solution for deploying raspberry pie on the iNeuOS Internet of things platform developed by .NET Core?

2025-04-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

The purpose of this article is to share with you about the solution to the deployment of raspberry pie on the iNeuOS Internet of things platform developed by .NET Core. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article.

1. Overview

Note: for the completeness of the article, the content in "the iNeuOS Internet of things platform developed by .NET Core is deployed on the Ubuntu operating system" applies to raspberry pie deployment and will also appear in this article.

The successful deployment of iNeuOS on the raspberry pie means that iNeuOS has opened up the overall link from embedded to the cloud, providing an overall solution for small and medium-sized enterprises in the construction of the Internet of things, and reducing the cost of product research and development and project implementation. The main significance of iNeuOS deployment in raspberry pie is:

(1) the enterprise gateway product can be formed and applied to the system construction.

(2) the equipment container can collect remote equipment data for remote operation and maintenance, and support device-driven online updates.

(3) Web configuration modeling can be used to remotely configure and develop monitoring pages and display on-site screens.

(4) seamlessly interfacing with cloud systems for rapid private cloud deployment.

(5) support the secondary development in the form of interface to reduce the personnel development cycle and cost.

(6) reduce the cost of developing and deploying gateways, such as core board, shell and labor, which can be controlled at about a few hundred yuan.

An enterprise upgrades the group-level Internet of things platform to meet the overall requirements of remote deployment of terminal hardware gateways for remote configuration and operation and maintenance.

However, there will also be doubts, think that Cpicket + is more suitable for embedded or gateway-level development, occupies less resources, high efficiency, of course, this is the best solution. The deployment of iNeuOS in raspberry pie provides enterprises with more choices from the overall solution, considering many factors, such as development cost, project execution cycle cost, labor cost and so on.

In the process of actual deployment and use, the execution efficiency of .NET Core under raspbian is not as bad as we imagined, and the execution efficiency is only one of the factors we consider when we choose the scheme.

two。 Raspberry pie hardware configuration

Raspberry pie 3rd generation b + development board Raspberry Pi 3b, detailed configuration parameters, as shown below:

3. Software information

Operating system: raspbian September 2019

Kernel version: 4.19

.net Core version: 2.2.402

Database: MariaDB (basically compatible with mysql)

4. Download and install Raspbian

Download address: https://www.raspberrypi.org/downloads/raspbian/, as shown below:

Copy Api and UI to the work directory of the Ubuntu operating system, as shown below:

6. Install SSH

Execute the command:

Sudo vim / etc/ssh/sshd_config

Add the following configuration information:

PasswordAuthentication yesPermitRootLogin yes7. Install .netcore

Sudo apt-get install curl libunwind8 gettext

Curl-sSL-o dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/e0050c1d-ddc6-4ac9-ba3b-07d85eec5890/614dae615fe229f6b6f43658262a8f08/dotnet-sdk-2.2.402-linux-arm.tar.gz (not a fixed download link address, you can download it first, upload it to raspbian system, and then execute the following command)

Sudo mkdir-p / opt/dotnet

Sudo tar zxf dotnet.tar.gz-C / opt/dotnet

Sudo ln-s / opt/dotnet/dotnet / usr/local/bin

8. Install mariadb

(1) instance installation

It is easy to install mysql on ubuntu, and it only takes a few commands to complete, as follows:

Developer:~$ sudo apt-get install mariadb-server

During the installation process, you will be prompted to set the password. Note that after the installation is completed, you can use the following command to check whether the installation is successful:

Developer:~$ sudo netstat-tap | grep mysql

After passing the above command check, if you see that the socket with mysql is in the listen state, the installation is successful.

You can log in to the mysql database with the following command:

Mysql-u root-p

-u indicates the user name that chooses to log in, and-p indicates the login user password. After entering the above command, you will be prompted to enter the password. Enter the password at this time to log in to mysql.

(2) case-sensitive configuration

Find the / etc/mysql/mysql.conf.d/mysqld.cnf file under unbuntu and add lower_case_table_names=1 under [mysqld]. Note: when 0 is case-sensitive, 1 is case-insensitive. Default is 0. As shown below:

(3) configuration of public network access permissions

The local mysql5.7 database can be connected when using 127.0.0.1 and localhost, but 192.168. 0 when using local ip. Then the connection is refused, and of course the public network cannot be connected through 192.168.

The solution is as follows:

1) Log in to mysql and authorize access to the public network

Developer:~$ use mysql

Developer:~$ update user set host ='% 'where user =' root'

Developer:~$ flush privileges

2) modify my.cnf configuration

Find the / etc/mysql/mysql.conf.d/mysqld.cnf file under unbuntu and modify the bind-address=127.0.0.1 to bind-address=0.0.0.0

3) skip the privilege table. (different from deployment under Ubuntu)

Find the / etc/mysql/mysql.conf.d/mysqld.cnf file under unbuntu (or / etc/mysql/mariadb.conf.d/50-server.cnf in the case of mariadb database), and configure: skip-grant-tables

For other settings, please choose according to the actual situation.

(5) Service order

Startup mode:

Start with service: service mysql start

Start with the mysqld script: / etc/inint.d/mysql start

Stop mode:

Start with service: service mysql stop

Start with the mysqld script: / etc/inint.d/mysql stop

Restart method:

Start with service: service mysql restart

Start with the mysqld script: / etc/inint.d/mysql restart

9. Install nginx

Install the reverse proxy nginx and start it with the following command:

Developer:~$ sudo apt-get install nginx

Developer:~$ sudo service ngnix start

Then visit the local IP address (127.0.0.1). If the following page appears, the installation is successful.

(2) modify the configuration file for the backend interface service (API) to access the database, and encrypt it for security reasons, as shown below:

11. Run iNeuOS

(1) run the backend API service (API), modify the appsettings.json configuration file, listen on the ports of all local IP, and add the Kestrel configuration section, as shown below:

(2) configure nginx service to access the front-end application system, as follows:

After installation, go to the following directory and open the default file, as follows:

Developer:~$ cd / etc/nginx/sites-available

Developer:~$ sudo gedit default

Change it to the following, listen to port 81, and refer to the root directory accessed (UI) and the default page browsed (index.html), as shown in the following figure:

WEB configuration modeling development, as shown below:

The view application is displayed, as shown below:

This is the solution to the deployment of raspberry pie on the iNeuOS Internet of things platform developed by .NET Core. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report