1. Install the Linux system
(You can skip this step if you have installed Linux)
Recommended virtual machine options: VirtualBox or Vmware (Professional version permanent activation code: 5A02H-AU243-TZJ49-GTC7K-3C61N)
I use Vmware here .
After installing Vmware, click on New Virtual Machine, select to install the operating system later, and then configure it. The virtual machine settings are as follows:
{
Guest operating system: other;
Version: other 64-bit;
Virtual machine name: node.js;
Location: D: VMnode.js;
Other defaults;
}
The virtual machine is built and the configuration is as shown on the right.
There is a problem that needs attention here: it is the network adapter of the virtual machine. I choose bridge mode here. In this mode, the operating system virtualized by VMWare is like an independent host in the LAN (the host and the virtual machine are in a peer-to-peer status), and it can access any machine in the network. (My host IP here is 192.168.1.49 and the virtual machine IP is 192.168.1.59). If your network environment is not suitable for bridging, please select NAT mode.
Then download the image. I choose centos as the system here. Of course, other Linux systems are also available. Directly click on the first one on Baidu centos download, and then download DVDISO. About 4GB.
After downloading the image, click Virtual Machine Settings and select the ISO image file in the CD/DVD tab.
Click Start, go to our virtual machine and select the first one to start the installation.
1. The installation process is in progress, use the default language (English), and then click continue to continue.
2. Click here
to select Basic Web Server, select Development Tools on the right, and then click Done to return.
3. Click , although it is the default and selected here, you still need to click again to select
and then click the button in the lower right corner to start the installation. .
While waiting for the installation, click to start setting the administrator password. After setting up, wait for the installation to complete, about 3-5 minutes. After the installation is complete, click the reboot button to restart.
Username after restart: root Password: The password you just set during the installation process.
CENTOS is now installed. Let’s simply make some settings.
Use vi to modify the network card configuration file in the etc/sysconfig/network-scripts/ directory, and modify the last ONBOOT to yes. Because by default in centos7, the network card is turned off. After the modification is completed, wq save and exit. As shown in the figure below
After modifying the configuration file, enter the command systemctl restart network to restart the virtual machine network.
Enter the command ifconfig and you can see that the IP address has been obtained.
If you are worried, you can also try pinging www.baidu.com. At this time, the virtual machine has been connected to the external network.
2. Nodejs and related software installation
First write an xshell installation. (Optional, not installing will not affect Nodejs development)
xshell: Xshell can be used to access remote servers under different systems under the Windows interface, so as to better achieve the purpose of remote control of the terminal.
Please download from Baidu, and click Next to install.
Personally, I find it easier to use. After the installation is complete, click New, enter the name node, host node, port number 22, and then enter the login name root and password to enter centos. Because the virtual machine here is bridged, so that the IP of the virtual machine will not change in the future, I added 192.168.1.59 node at the end of the C:WindowsSystem32driversetchosts file. In the future, the IP of the virtual machine will be fixed here to facilitate subsequent development.
/*****************I am the willful dividing line*******************************/
Now install a few things in centos (must!)
1. Install an epel, enter the command yum install epel-release
2. To install nodejs, enter the command yum install nodejs. After the download and installation is completed, enter the command node --version to check whether the version number is installed.
3. To install the mongodb server, enter the command yum install mongodb-server
4. To install the mongodb client, enter the command yum install mongodb, wait for the download and installation to complete, enter the command mongo --version to check whether the version number is installed
5. To install redis, enter the command yum install redis. After waiting for the download and installation to complete, enter the command redis-cli --version to check whether the version number is installed.
node.js
After all the above steps are completed, the development environment for node.js is completed. It deserves applause and congratulations! ! !
Three.node test run
Let’s simply write a small program to run it.
vim test.js var name = "qin";console.log("hello "+name);
wq Save and exit, enter the command node test.js to see the results.

JavaScriptusestwotypesofcomments:single-line(//)andmulti-line(//).1)Use//forquicknotesorsingle-lineexplanations.2)Use//forlongerexplanationsorcommentingoutblocksofcode.Commentsshouldexplainthe'why',notthe'what',andbeplacedabovetherelevantcodeforclari

The main difference between Python and JavaScript is the type system and application scenarios. 1. Python uses dynamic types, suitable for scientific computing and data analysis. 2. JavaScript adopts weak types and is widely used in front-end and full-stack development. The two have their own advantages in asynchronous programming and performance optimization, and should be decided according to project requirements when choosing.

Whether to choose Python or JavaScript depends on the project type: 1) Choose Python for data science and automation tasks; 2) Choose JavaScript for front-end and full-stack development. Python is favored for its powerful library in data processing and automation, while JavaScript is indispensable for its advantages in web interaction and full-stack development.

Python and JavaScript each have their own advantages, and the choice depends on project needs and personal preferences. 1. Python is easy to learn, with concise syntax, suitable for data science and back-end development, but has a slow execution speed. 2. JavaScript is everywhere in front-end development and has strong asynchronous programming capabilities. Node.js makes it suitable for full-stack development, but the syntax may be complex and error-prone.

JavaScriptisnotbuiltonCorC ;it'saninterpretedlanguagethatrunsonenginesoftenwritteninC .1)JavaScriptwasdesignedasalightweight,interpretedlanguageforwebbrowsers.2)EnginesevolvedfromsimpleinterpreterstoJITcompilers,typicallyinC ,improvingperformance.

JavaScript can be used for front-end and back-end development. The front-end enhances the user experience through DOM operations, and the back-end handles server tasks through Node.js. 1. Front-end example: Change the content of the web page text. 2. Backend example: Create a Node.js server.

Choosing Python or JavaScript should be based on career development, learning curve and ecosystem: 1) Career development: Python is suitable for data science and back-end development, while JavaScript is suitable for front-end and full-stack development. 2) Learning curve: Python syntax is concise and suitable for beginners; JavaScript syntax is flexible. 3) Ecosystem: Python has rich scientific computing libraries, and JavaScript has a powerful front-end framework.

The power of the JavaScript framework lies in simplifying development, improving user experience and application performance. When choosing a framework, consider: 1. Project size and complexity, 2. Team experience, 3. Ecosystem and community support.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Chinese version
Chinese version, very easy to use

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver Mac version
Visual web development tools
