How to exit Ethereum client
Publish: 2021-05-19 20:18:12
1. Don't go to ZT. It's dead. The coins on it will be off the shelves in less than a month. The platform allows you to go to the project side. Can only charge money can not reflect, garbage exchange
2. At the top of Ethereum is DAPP. It exchanges with the smart contract layer through Web3. JS. All smart contracts run on EVM (Ethereum virtual machine) and use RPC calls. Below EVM and RPC are the four core contents of Ethereum, including: blockchain, consensus algorithm, mining and network layer. Except DAPP, all other parts are in the Ethereum client. The most popular Ethereum client is geth (go Ethereum)
3. 1、 Installation and configuration of network devices
when installing Linux, if you have a network card, the installation program will prompt you to give the configuration parameters of TCP / IP network, such as the IP address of the local computer, the IP address of the default gateway, the IP address of DNS, etc, The installation program will automatically compile the network card (Linux system must first support) driver into the kernel. But we must understand the process of loading the network card driver, so we can easily operate when changing the network card and using multiple network cards in the future. The network card driver is loaded into the kernel as a mole, All the network card drivers supported by Linux are stored in the directory / lib / moles / (Linux version number) / net /, for example, the driver of Inter's 82559 series 10 / 100M self-adaptive boot network card is eepro100. O, 3Com's 3c509 isa network card is 3c509. O, dlink's PCI 10 network card is via Rhine. O, NE2000 compatible network card drivers are ne2k PCI. O and ne. O. after understanding these basic drivers, we can change the network card or add the network card by modifying the mole configuration file.
1. Modify the / etc / conf.moles file
this configuration file is an important parameter file to load the mole, Let's first look at a sample file
# / etc / conf.moles
alias eth0 eepro100
alias eth1 eepro100
this file is the content of conf.moles in a Linux system with two inter 82559 series network cards. The alias command indicates the name of the driver that the Ethernet port (such as eth0) has, If you use the command modprobe eth0, the system will automatically load eepro100. O into the kernel, Therefore, it is not necessary to use options in conf.moles to specify the IO address and interrupt number of the network card. However, corresponding to isa network card, you must specify the IO address or interrupt number of the hardware in conf.moles, as shown below, It shows a conf.moles file of NE isa NIC.
alias eth0 ne
Options ne IO = 0x300 IRQ = 5
after modifying the conf.moles file, you can use the command to load the mole, For example, to insert the second network card of inter:
? Insmod / lib / moles / 2.2.14/net/eepro100. O
in this way, the mole eepro100. O can be loaded at the Ethernet port, You can also use the command to view the currently loaded mole information:
[ root@ice /Etc] # lsmod
mole size used by
eepro100 15652 (autoclean)
the meaning of the returned result is that the currently loaded mole is eepro100, with 15652 bytes in size and two users, The method is to clear automatically.
2. Modify the / etc / lilo.conf file
in some relatively new Linux versions, because the operating system automatically detects all related hardware, there is no need to modify the / etc / lilo.conf file at this time, You can modify the lilo.conf file. Add the following command to the / etc / lilo.conf file:
append = & quot; ether=5,0x240,eth0 ether=7,0x300,eth1" <
the meaning of this command is that the IO address of eth0 is 0x240, the interrupt is 5, the IO address of eth1 is 0x300, and the interrupt is 7.
in fact, this statement comes from the parameter passed when the system boot image file,
Lilo: Linux ether = 5,0x240, eth0 ether = 7,0x300, eth1
this method can also make the Linux system configure two network cards, When using more than three network cards, you can follow the same method.
after configuring the network card, you should configure the TCP / IP parameters. In general, when installing the Linux system, you will be prompted to configure the network parameters, You can use the following commands:
? Ifconfig eth0 a.b.c.d netmask e.f.g.h
a.b.c.d is the IP address of eth0, and e.f.g.h is the netmask.
in fact, in Linux system, we can set multiple IP addresses for a network card, such as the following command:
? Ifconfig eth0: 1 202.112.11.218 netmask 255.255.192
then, Use the command "ifconfig - a" to see the interfaces of all network interfaces:
eth0 link encap:Ethernet HWaddr 00:90:27:58:AF:1A
inet addr:202.112.13.204 Bcast :202.112.13.255 M ask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 M etric:1
RX packets:435510 errors :0 dropped:0 overruns :0 frame:2
TX packets:538988 e rrors:0 dropped :0 overruns:0 carrier :0
c ollisions:318683 txqueuelen :100
I nterrupt:10 Base address:0xc000
eth0:1 Link encap:Ethernet HWaddr 00:90:27:58:AF:1A
inet addr:202.112.11.218 Bcast :202.112.11.255 M ask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 M etric:1
I nterrupt:10 Base address:0xc000 < br />
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask :255.0.0.0
UP LOOPBACK RUNNING MTU:3924 M etric:1
RX packets:2055 errors :0 dropped:0 overruns :0 frame:0
TX packets:2055 errors :0 dropped:0 overruns :0 carrier:0
c ollisions:0 txqueuelen : 0
we can see that there are three network interfaces, eth0, eth0:1, lo, Eth0 is the real Ethernet interface. Eth0:1 and eth0 are the same network card, but they are bound with another address. Lo is the sending address. Eth0 and eth0:1 can use IP addresses of different network segments, which is very useful when the same physical network segment uses different network addresses<
in addition, the network card has a mode of prosimc. In this mode, the network card will receive all the packets in the network. Some network monitoring tools under Linux, such as tcpmp and snort, all set the network card to hybrid mode.
the ifconfig command can change the IP address of the network card ring the running time, but if the system is restarted, the IP address of the network card will be changed, Linux still starts the network interface according to the original default settings. At this time, you can use netconfig or NETCONF command to reset the default network parameters. Netconfig command is to reconfigure the basic TCP / IP parameters, including whether to dynamically obtain IP address (dhcpd and BOOTP), IP address of network card, network mask, default gateway and preferred domain name server address. NETCONF command can configure all network parameters in detail, which is divided into three parts: client task, server task and other configuration. In the client configuration, it mainly includes the configuration of basic host (host name, valid domain name, network alias, IP address of corresponding network card, network mask, network device name, kernel driver of network device), DNS address configuration, default gateway address configuration, NIS address configuration, IPX interface configuration, PPP / slip configuration and so on. In the server configuration, it mainly includes the configuration of NFS, DNS, Apache webserver, samba and Wu ftpd. Among the other configuration options, one is about the host configuration in the / etc / hosts file, one is about the network configuration information in the / etc / networks file, and the last is about the configuration information using linuxconf
under the command of linuxconf, you can also configure the network information, but you can find that the linuxconf program calls NETCONF to configure the network
in addition, the system configuration files about the network are stored in the / etc / sysconfig / network scripts directory. Examples are as follows:
: & lt; br>& lt; br>
ifcfg-eth0 * ifdown post * ifup aliases * ifup PPP *
ifcfg-eth1 * ifdown PPP * ifup IPX * ifup routes *
ifcfg lo * ifdown sl * ifup PLIP * ifup sl *
ifdown @ ifup @ ifup post * network functions
ifcfg-eth0 is the configuration information of Ethernet port eth0, and its contents are as follows:
device = & quot; eth0" /* Specify the network device name * /
IPADDR = & quot; 202.112.13.204" /* Indicate the IP address of the network device * /
netmask = & quot; 255.255.255.192" /* Specify network mask * /
Network = 202.112.13.192 / * specify network address * /
broadcast = 202.112.13.255 / * specify broadcast address * /
onboot = & quot; yes" /* Indicates whether the network card is activated at system startup * /
bootproto = & quot; none" /* Indicates whether to use BOOTP protocol * /
therefore, we can also modify this file to change the network parameters under Linux[/ Size]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -, It introces the files related to the configuration of Linux network services.
1. The configuration file of Lilo
in Linux system, there is a system boot program, Lilo (Linux loadin), which can be used to realize the selective startup of multiple operating systems. Its configuration file is / etc / lilo.conf.in this configuration file, the configuration parameters of Lilo are mainly divided into two parts, One is the global configuration parameters, including setting the boot device and so on. The other is the local configuration parameters, including the configuration parameters of each boot image file. I will not describe each parameter in detail here, but only two important parameters: password and restricted option. The password option adds password protection to each boot image file.
as we all know, In Linux system, there is a single user mode. In this mode, the user logs in to the Linux system as a super user. By adding parameters (Linux single or Linux init 0) ring Lilo boot, people can directly enter the single user mode super user environment without password, This will be very dangerous. So the password configuration option is added in lilo.conf to add password protection to each image file.
you can use the password option in global mode (add the same password to all image files), or add a password to each indivial image file, You may find it troublesome to enter the password every time. You can use the restricted option, which enables Lilo to check the password only when the parameters (such as Linux single) are entered ring Linux startup. These two options can greatly increase the security of the system, It is recommended to set them in lilo.conf file.
since password is stored in plaintext in / etc / lilo.conf file, it is necessary to change the attribute of / etc / lilo.conf file to only root readable (0400).
in addition, in the early version of Lilo, there was a limitation that the boot sector must be stored in the first 1024 cylinder, which was broken in Lilo version 2.51, After downloading and decompressing the latest version, use the command make & quot; Note: physical security is the most basic security, even if the password protection is added in lilo.conf, if there is no password protection in lilo.conf
when installing Linux, if you have a network card, the installation program will prompt you to give the configuration parameters of TCP / IP network, such as the IP address of the local computer, the IP address of the default gateway, the IP address of DNS, etc, The installation program will automatically compile the network card (Linux system must first support) driver into the kernel. But we must understand the process of loading the network card driver, so we can easily operate when changing the network card and using multiple network cards in the future. The network card driver is loaded into the kernel as a mole, All the network card drivers supported by Linux are stored in the directory / lib / moles / (Linux version number) / net /, for example, the driver of Inter's 82559 series 10 / 100M self-adaptive boot network card is eepro100. O, 3Com's 3c509 isa network card is 3c509. O, dlink's PCI 10 network card is via Rhine. O, NE2000 compatible network card drivers are ne2k PCI. O and ne. O. after understanding these basic drivers, we can change the network card or add the network card by modifying the mole configuration file.
1. Modify the / etc / conf.moles file
this configuration file is an important parameter file to load the mole, Let's first look at a sample file
# / etc / conf.moles
alias eth0 eepro100
alias eth1 eepro100
this file is the content of conf.moles in a Linux system with two inter 82559 series network cards. The alias command indicates the name of the driver that the Ethernet port (such as eth0) has, If you use the command modprobe eth0, the system will automatically load eepro100. O into the kernel, Therefore, it is not necessary to use options in conf.moles to specify the IO address and interrupt number of the network card. However, corresponding to isa network card, you must specify the IO address or interrupt number of the hardware in conf.moles, as shown below, It shows a conf.moles file of NE isa NIC.
alias eth0 ne
Options ne IO = 0x300 IRQ = 5
after modifying the conf.moles file, you can use the command to load the mole, For example, to insert the second network card of inter:
? Insmod / lib / moles / 2.2.14/net/eepro100. O
in this way, the mole eepro100. O can be loaded at the Ethernet port, You can also use the command to view the currently loaded mole information:
[ root@ice /Etc] # lsmod
mole size used by
eepro100 15652 (autoclean)
the meaning of the returned result is that the currently loaded mole is eepro100, with 15652 bytes in size and two users, The method is to clear automatically.
2. Modify the / etc / lilo.conf file
in some relatively new Linux versions, because the operating system automatically detects all related hardware, there is no need to modify the / etc / lilo.conf file at this time, You can modify the lilo.conf file. Add the following command to the / etc / lilo.conf file:
append = & quot; ether=5,0x240,eth0 ether=7,0x300,eth1" <
the meaning of this command is that the IO address of eth0 is 0x240, the interrupt is 5, the IO address of eth1 is 0x300, and the interrupt is 7.
in fact, this statement comes from the parameter passed when the system boot image file,
Lilo: Linux ether = 5,0x240, eth0 ether = 7,0x300, eth1
this method can also make the Linux system configure two network cards, When using more than three network cards, you can follow the same method.
after configuring the network card, you should configure the TCP / IP parameters. In general, when installing the Linux system, you will be prompted to configure the network parameters, You can use the following commands:
? Ifconfig eth0 a.b.c.d netmask e.f.g.h
a.b.c.d is the IP address of eth0, and e.f.g.h is the netmask.
in fact, in Linux system, we can set multiple IP addresses for a network card, such as the following command:
? Ifconfig eth0: 1 202.112.11.218 netmask 255.255.192
then, Use the command "ifconfig - a" to see the interfaces of all network interfaces:
eth0 link encap:Ethernet HWaddr 00:90:27:58:AF:1A
inet addr:202.112.13.204 Bcast :202.112.13.255 M ask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 M etric:1
RX packets:435510 errors :0 dropped:0 overruns :0 frame:2
TX packets:538988 e rrors:0 dropped :0 overruns:0 carrier :0
c ollisions:318683 txqueuelen :100
I nterrupt:10 Base address:0xc000
eth0:1 Link encap:Ethernet HWaddr 00:90:27:58:AF:1A
inet addr:202.112.11.218 Bcast :202.112.11.255 M ask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 M etric:1
I nterrupt:10 Base address:0xc000 < br />
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask :255.0.0.0
UP LOOPBACK RUNNING MTU:3924 M etric:1
RX packets:2055 errors :0 dropped:0 overruns :0 frame:0
TX packets:2055 errors :0 dropped:0 overruns :0 carrier:0
c ollisions:0 txqueuelen : 0
we can see that there are three network interfaces, eth0, eth0:1, lo, Eth0 is the real Ethernet interface. Eth0:1 and eth0 are the same network card, but they are bound with another address. Lo is the sending address. Eth0 and eth0:1 can use IP addresses of different network segments, which is very useful when the same physical network segment uses different network addresses<
in addition, the network card has a mode of prosimc. In this mode, the network card will receive all the packets in the network. Some network monitoring tools under Linux, such as tcpmp and snort, all set the network card to hybrid mode.
the ifconfig command can change the IP address of the network card ring the running time, but if the system is restarted, the IP address of the network card will be changed, Linux still starts the network interface according to the original default settings. At this time, you can use netconfig or NETCONF command to reset the default network parameters. Netconfig command is to reconfigure the basic TCP / IP parameters, including whether to dynamically obtain IP address (dhcpd and BOOTP), IP address of network card, network mask, default gateway and preferred domain name server address. NETCONF command can configure all network parameters in detail, which is divided into three parts: client task, server task and other configuration. In the client configuration, it mainly includes the configuration of basic host (host name, valid domain name, network alias, IP address of corresponding network card, network mask, network device name, kernel driver of network device), DNS address configuration, default gateway address configuration, NIS address configuration, IPX interface configuration, PPP / slip configuration and so on. In the server configuration, it mainly includes the configuration of NFS, DNS, Apache webserver, samba and Wu ftpd. Among the other configuration options, one is about the host configuration in the / etc / hosts file, one is about the network configuration information in the / etc / networks file, and the last is about the configuration information using linuxconf
under the command of linuxconf, you can also configure the network information, but you can find that the linuxconf program calls NETCONF to configure the network
in addition, the system configuration files about the network are stored in the / etc / sysconfig / network scripts directory. Examples are as follows:
: & lt; br>& lt; br>
ifcfg-eth0 * ifdown post * ifup aliases * ifup PPP *
ifcfg-eth1 * ifdown PPP * ifup IPX * ifup routes *
ifcfg lo * ifdown sl * ifup PLIP * ifup sl *
ifdown @ ifup @ ifup post * network functions
ifcfg-eth0 is the configuration information of Ethernet port eth0, and its contents are as follows:
device = & quot; eth0" /* Specify the network device name * /
IPADDR = & quot; 202.112.13.204" /* Indicate the IP address of the network device * /
netmask = & quot; 255.255.255.192" /* Specify network mask * /
Network = 202.112.13.192 / * specify network address * /
broadcast = 202.112.13.255 / * specify broadcast address * /
onboot = & quot; yes" /* Indicates whether the network card is activated at system startup * /
bootproto = & quot; none" /* Indicates whether to use BOOTP protocol * /
therefore, we can also modify this file to change the network parameters under Linux[/ Size]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -, It introces the files related to the configuration of Linux network services.
1. The configuration file of Lilo
in Linux system, there is a system boot program, Lilo (Linux loadin), which can be used to realize the selective startup of multiple operating systems. Its configuration file is / etc / lilo.conf.in this configuration file, the configuration parameters of Lilo are mainly divided into two parts, One is the global configuration parameters, including setting the boot device and so on. The other is the local configuration parameters, including the configuration parameters of each boot image file. I will not describe each parameter in detail here, but only two important parameters: password and restricted option. The password option adds password protection to each boot image file.
as we all know, In Linux system, there is a single user mode. In this mode, the user logs in to the Linux system as a super user. By adding parameters (Linux single or Linux init 0) ring Lilo boot, people can directly enter the single user mode super user environment without password, This will be very dangerous. So the password configuration option is added in lilo.conf to add password protection to each image file.
you can use the password option in global mode (add the same password to all image files), or add a password to each indivial image file, You may find it troublesome to enter the password every time. You can use the restricted option, which enables Lilo to check the password only when the parameters (such as Linux single) are entered ring Linux startup. These two options can greatly increase the security of the system, It is recommended to set them in lilo.conf file.
since password is stored in plaintext in / etc / lilo.conf file, it is necessary to change the attribute of / etc / lilo.conf file to only root readable (0400).
in addition, in the early version of Lilo, there was a limitation that the boot sector must be stored in the first 1024 cylinder, which was broken in Lilo version 2.51, After downloading and decompressing the latest version, use the command make & quot; Note: physical security is the most basic security, even if the password protection is added in lilo.conf, if there is no password protection in lilo.conf
4. Generally speaking, undefined index is the exact writing problem in the process of writing. Notice generally prompts for errors that are not directly related to the execution of code, but don't forget that notice sometimes returns some rendant error information
5. Go to the crater.
although the place is large,
the mines are relatively concentrated,
it won't let you go around.
moreover,
a vein can be g many times,
that's where it's a little scary
although the place is large,
the mines are relatively concentrated,
it won't let you go around.
moreover,
a vein can be g many times,
that's where it's a little scary
6. < / UL >
In practical work, we often encounter the operation of restarting the network card in Linux system. There are three methods as follows:
1, service network restart
< UL >you can use CRT tools to connect to the Linux command line interface; You can also enter the operating system interface, and then select the terminal input:
3, ifconfig eth0 up can be used to start the network card
Ifconfig eth0 down can be used to disable the NIC7. Truffle is a world-class development environment, testing framework, Ethereum resource management channel, dedicated to making Ethereum development easier, truffle has the following:
built in smart contract compilation, linking, deployment and binary file management
automatic contract testing under rapid development
scripted and extensible deployment and publishing framework
the network environment management function deployed to no matter how many public or private networks
uses the package management provided by ethpm & NPM and erc190 standard
a direct interactive console that communicates directly with the contract (after writing the contract, you can verify it on the command line)
the configurable construction process supports tight integration
external scripts can be executed in truffle environment< Truffle is the most popular development framework, whose mission is to make development easier
installation method:
$NPM install - G truffle
environment requirements
nodejs 5.0 +
windows, Linux, or Mac OS X
truffle needs Ethereum client and supports standard JSON RPC API. For development, some are more suitable, which will be introced in the following chapters (for example, testrpc provides real-time feedback ring coding and debugging)
suggestions for Windows users
if you are a Windows user, we recommend that you use PowerShell or git bash to install and use the truffle framework. These two shell environments provide more convenient features than the default
if you have to use the command line, see the discussion here on how to configure truffle.
built in smart contract compilation, linking, deployment and binary file management
automatic contract testing under rapid development
scripted and extensible deployment and publishing framework
the network environment management function deployed to no matter how many public or private networks
uses the package management provided by ethpm & NPM and erc190 standard
a direct interactive console that communicates directly with the contract (after writing the contract, you can verify it on the command line)
the configurable construction process supports tight integration
external scripts can be executed in truffle environment< Truffle is the most popular development framework, whose mission is to make development easier
installation method:
$NPM install - G truffle
environment requirements
nodejs 5.0 +
windows, Linux, or Mac OS X
truffle needs Ethereum client and supports standard JSON RPC API. For development, some are more suitable, which will be introced in the following chapters (for example, testrpc provides real-time feedback ring coding and debugging)
suggestions for Windows users
if you are a Windows user, we recommend that you use PowerShell or git bash to install and use the truffle framework. These two shell environments provide more convenient features than the default
if you have to use the command line, see the discussion here on how to configure truffle.
8. Unknown_Error
Hot content