I senior dogs, a subject is based on the technique of block chain traceability of agricultural products development, choose block chain environment as Fisoc bcos block chain environment, building on a don't know the brand of industrial control mainframe, due to the dormitory 11 PM blackouts, the server can't 7 * 24 hours work, therefore, place the server teacher office to provide services, through the network can access to the service in the dormitory, but access is limited to the campus Intranet (can also be accessed through the VPN network of campus network, but learning a little pull across the VPN server), so choose the peanut shell Intranet through service, map the network service to the public, can access through the network,
Few words said began speaking, speaking content is given priority to with mapping service process, not the construction of the internal service itself,
Software and hardware configuration project
Hardware: the host a industrial automation (in fact, the computer mini)
Software: ubuntu20.04 LTS (OS), block chain environment (need the services of a map), peanut shells Linux version
Project objective
Through peanut shells in the Intranet through the Intranet services mapping to the public, to realize remote access to
Project process
Internal service structures,
Set up in the Intranet server need mapping services (because of the demand and discuss, and here I need to take the block chain environment mapping out, build process is a little... ),
Peanut shell software installation
1. Peanut shells website (https://hsk.oray.com/download/) to download the Linux version installation package;
2. Install, peanut shells installation steps need to be under the administrator privileges,
Install the command is (ubuntu) :
# install
# 32
DPKG -i PHDDNS - i386. Deb
# 64
DPKG -i PHDDNS - 5.0.0 - amd64. Deb
# remove
DPKG -r PHDDNS
Install the screenshot:
Uninstall screenshots:
Peanut shells using method, namely the network through configuration,
Commonly used command
# open service
PHDDNS start
# check status
PHDDNS status
# close service
PHDDNS stop
# restart service
PHDDNS restart
# to check the version information
PHDDNS version
# reset service
PHDDNS reset
# boot since the rev.
PHDDNS enable
# close boot since the rev.
PHDDNS disenable
# in addition to PHDDNS version command does not require administrator privileges, you need administrator rights other commands are
Open service
Sudo PHDDNS start
The results shown in the figure below:
Check to see if the service startup success
Sudo PHDDNS status
The results shown in the figure below:
Must remember SN in the above code, the code for the web login account,
Must remember SN in the above code, the code for the web login account,
Must remember SN in the above code, the code for the web login account,
Important words three times!!!!!!
Through using the
1. The browser to http://b.oray.com, enter the peanut shell Linux 5.0 SN code with default login password during installation on the admin login,
For the first time login, you need to activate your first, provide scan code activation and password to activate two ways, flexible choice,
Sweep (1) code activation: the need to use the peanut shell management APP or scanning WeChat code activation;
(2) the password to activate: input registered Oray account password to activate,
After the success of the activation, into the peanut shells management platform, if the binding account only dynamic DNS function of SN code to use network transmission function, can click on the "open" free, or directly to the account upgrade to version with the function of network transmission services,
2. Add the Intranet through the mapping, click "add mapping" button on the page,
Add mapping interface, select map type depending on the type of service, choose HTTP or HTTPS service web service, select TCP or udp flow service, such as video surveillance, such as FTP service,
I here is a web service, select the HTTP service, if there is a certain safety requirements for service, here we suggest HTTPS,
The few here fill in the box do an explanation:
The domain name: namely access through the network domain name, choose a can casually,
Outside network access port: can choose fixed port, also can choose dynamic port, this will not affect the use,
Intranet hosts: service in the host IP, Linux system, the terminal type ipconfig can view nic IP, Windows system, simply enter ipconfig view nic IP in the CMD,
Network port: as a service port, such as tomcat default port 8080, SSH default port 22, mysql default port 3306,
After the completion of the mapping set can be accessed through public domain name outside access services,
Service display
ShowTime, next, look at me,
Console block chain node
An overview of the data
Node management
Contract management
WeBASE (WeBank Blockchain Application Software Extension)
The login page (public access to domain name is to use the peanut shell for remote access)
An overview of the data
Chain management
Contract management
The private key management
System management
System monitoring
Nodes monitor
Host monitoring
Transaction audit
Contract to run the test
Contract code as shown in the figure below:
Compiled the deployment to block chain, trading, call the get and set methods;
The get
Set
Get again, the results are as follows:
Integral operation is simple, for there is no public IP family is very friendly, whether it will be your computer mapping out of service, or will the Linux small host service mapping out is very convenient, and the peanut shells also provide free services, to high level service can apply for a student "program" is favorable, very friendly to user groups to the student, one word summary: sweet!