In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "the method of installing node.js development environment in linux environment". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Because there is no server here, we build a linux environment locally through a virtual machine, so we first need to download virtuabox, Baidu or google to search virtuabox download.
After entering, you can choose according to your operating system. Here, take window as an example.
two。 To create a virtual machine, it is not difficult to install virtualbox. The next step in the whole process is fine. After installation, create a virtual machine, click New, and then set it as shown in the figure. Because we install centos 64-bit here, if you install other linux, you can choose it. The next step is the whole process, and you can choose the default.
The memory can be set according to your own computer memory.
3. After the virtual machine is created, you need to install an image for it, that is, the operating system. Install centos here and go to the next one on the Internet.
Http://isoredirect.centos.org/centos/7/isos/x86_64/centos-7-x86_64-dvd-1511.iso
If you are using a router to access the Internet, choose to bridge the network here.
Then start, the language choice default, try not to choose Chinese, in order to avoid some unnecessary problems, software choice
Install the hard drive, enter the key points, cancel it first, and then select
Then wait for it to be installed. During the installation process, you can choose to set the password of the root user, or add other users, and set the password
After installation, you need to set up the virtual machine network card settings.
Vi / etc/sysconfig/network-scripts/ifcfg-enp0s3
Open the configuration file through vi, if vi uses it, after opening the file, press I on the keyboard, you can enter the modification mode, change the onboot property to yes, press esc,shitf+:, and then wq to exit saving on it.
Systemctl restart network
Restart the network card by command, if there is an assigned address, it will be fine.
If you do not understand the above steps, you can install the virtual machine and centos on your own. You can have a detailed description and specific parameter configuration.
4. Install the necessary software, after the installation process, you will make a choice, YPay, all choose y, the following software installation is the same
Yum install epel-release
Install nodejs
Yum install nodejs
Install the server side of mongodb-server
Yum install mongodb-server
Install mongodb
Yum install mongodb
Install redis
Yum install redis
5. The basic environment is installed, and you can enter node directly by typing node on the command line. Then we see how to link the development under window, here is the use of securecrtportable, you can download xshell, is the same.
After clicking on the link, you can use this to perform command line operations.
Then open sublime text and download the sftp plug-in, which maps and synchronizes the local project directory with the project directory on the server
Set it as follows, but it should be noted that remote-path corresponds to the server directory, which requires an existing directory, and then there are some other parameters that can be configured, such as when to upload synchronously, and so on. For more information, you can search sftp on github.
{/ / the tab key will cycle through the settings when first created / / visit http://wbond.net/sublime_packages/sftp/settings for help / / sftp, ftp or ftps "type": "sftp", / / connection method "save_before_upload": upload "upload_on_save" before true,// save: upload "sync_down_on_open": false, "sync_skip_deletes": false when true,// saves "sync_same_age": true, "confirm_downloads": false, "confirm_sync": true, "confirm_overwrite_newer": false, "host": "nodejs", / / hostname or address "user": "root", / / connection user name "password": "sunlandong", / / password / / "port": "22", "remote_path": "/ home/nodejs/" / / Mapping directory between local directory and server directory We need to pay attention here. The directory of the server must have "ignore_regexes": ["\ .substituted-(project | workspace)", "sftp-config (- alt\\ d?)?\\ .json", "sftp-settings\\ .json", "/ venv/", "\\ .svn /", "\\ .hg /", "\ .git /", "\ .bzr", "_ darcs", "cvs", "\ .ds _ store" "thumbs\ .db", "desktop\ .ini"], / / ignore rules / / "file_permissions": "664", / / "dir_permissions": "775", / / "extra_list_connections": 0, "connect_timeout": 30, / / "keepalive": 120, / / "ftp_passive_mode": true, / / "ftp_obey_passive_host": false / / "ssh_key_file": "~ / .ssh/id_rsa", / / "sftp_flags": ["- f", "/ path/to/ssh_config"], / / "preserve_modification_times": false, / / "remote_time_offset_in_hours": 0, / / "remote_encoding": "utf-8", / / "remote_locale": "c", / / "allow_config_upload": false } this is the end of the introduction to "how to install the node.js development environment in the linux environment". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.