.netcore developed iNeuOS of Things platform deployed in the Ubuntu operating system, seamlessly across platforms. Help "2019 China .NET Developer Summit." .NET Developer Summit 2019 China officially launched

 

.NET Developer Summit 2019 China officially launched

 

table of Contents

1. Overview ... 2

2. Prepare to run the package ... 2

3. Install .netcore. 3

4. Installation mysql 3

5. Install nginx. 5

6. Configure iNeuOS database and file ... 5

7. Run iNeuOS. 6


 1 Overview

       See the first two articles: " iNeuOS cloud operating system, .NET Core build the whole system ", " iNeuOS things cloud OS 2.0 release, Integrated Device container, view modeling, machine learning ."

       iNeuOS full use of .netcore development, mainly for enterprises, integrators to build from the gateway, edge applications, cloud construction of Things / Industrial products Internet platform-level solutions. Oriented scenarios: (1) embedded hardware gateway development and deployment, and form their own enterprise gateway products. (2) Things to build enterprise private cloud platform. (3) Level Group to build public cloud Things platform. These scenarios support for multi-device multi-protocol device access, view configuration modeling and analysis of machine learning-oriented data.

2. Prepare to run the package

     Copy the iNeuOS services and front-end interface to back-end applications to work Ubuntu operating system working directory, the package main directory, as follows:

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

3. Install .netcore

      Ubuntu Operating System Version: 16.04

     .netcore Version: 2.2.4 package: dotnet-sdk-2.2

      Installation process, as shown below:

       Refer to the official link: https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install

4. Installation mysql

(1 ) Installation Example

         Mysql ubuntu mounted on relatively simple, only a few commands can be completed as follows:

developer:~$ sudo apt-get install mysql-server
developer:~$ apt-get isntall mysql-client
developer:~$ sudo apt-get install libmysqlclient-dev

       The installation process will be prompted to set a password, set the same note, after the installation is complete, you can use the following command to check whether the installation was successful:

developer:~$ sudo netstat -tap | grep mysql

       After inspection by the above command, if you see in the mysql socket listen state indicates a successful installation.

      Landing mysql database via the following command:

 mysql -u root -p 

       -u user name indicating the selection of landing, -p represents a user password, the above will be prompted to enter the password after the command, then enter a password to log in to the mysql.

 (2 ) case-sensitive configuration

       Find /etc/mysql/mysql.conf.d/mysqld.cnf file in unbuntu, under the [mysqld] add lower_case_table_names = 1 on the list. Note: case sensitive is 0, 1 is not case sensitive. The default is 0. As shown below:

  (3 ) access to external network configuration

       Mysql5.7 local database, when a localhost 127.0.0.1 and may be connected, but when using the local IP 192.168. *. Rejected the connection, of course, the outer web is not connected to the same 192.168 .. *.

       Solutions are as follows:

      1) landing mysql, authorized external network access

developer:~$ use mysql;
developer:~$ update user set host = ‘%’  where user = ‘root’;
developer:~$ flush privileges;

     2) Modify my.cnf configuration

     Find /etc/mysql/mysql.conf.d/mysqld.cnf file in unbuntu, the bind-address = 127.0.0.1 modified bind-address = 0.0.0.0

(4 ) Service Commands

        Start:

        Start using the service: service mysql start

        Use mysqld script to start: /etc/inint.d/mysql start

        Stop mode:

        Start using the service: service mysql stop

        Use mysqld script to start: /etc/inint.d/mysql stop

        Restart way:

       Start using the service: service mysql restart

       Use mysqld script to start: /etc/inint.d/mysql restart

5. Installation nginx

      Install a reverse proxy nginx, start with the following command:

developer:~$ sudo apt-get install nginx
developer:~$ sudo service ngnix start

     然后访问一下本机的IP地址(127.0.0.1),如果出现如下页面,说明已经安装成功。

6.   配置iNeuOS数据库和文件

(1)    创建数据库,我是在window下使用Navicat执行sql脚本。如下图:

  (2)    修改后台接口服务(API)访问数据库的配置文件,考虑到安全性的问题,进行了加密,如下图:

  (3)    修改前端应用系统(UI)访问后台接口服务(API)的配置文件UI\lib\buffos\js\目录下request.js和uiconfig.js,如下图:

 

7.   运行iNeuOS

(1)运行后台接口服务(API),修改appsettings.json配置文件,可以侦听本地所有IP的端口,增加Kestrel配置节,如下图:

       执行运行接口命令,如下图:

  (2)配置nginx服务,访问前端应用系统,如下:

     安装好之后进入到以下目录,打开default文件,如下命令:

developer:~$ cd /etc/nginx/sites-available
developer:~$ sudo gedit default

    修改为以下的内容,侦听81端口,并指访问的根目录(UI)和浏览的默认页(index.html),如下图:

 (3)访问URL(http://127.0.0.1:81或http://192.168.199.128:81)地址,效果如下图:

             设备容器,负责运行设备驱动,如下图:

          组态建模,负责构建监测视图应用,如下图:

           机器学习,负责对多维数据进行数据标记、模型训练、工况预测,如下图:


物联网&集成技术 QQ群:54256083 

物联网&集成合作 QQ群:727664080

网站:http://www.ineuos.net

 

Guess you like

Origin www.cnblogs.com/lsjwq/p/11655093.html