Install nodejs to build a ghost personal blog, nodejsghost

Source: Internet
Author: User

Install nodejs to build a ghost personal blog, nodejsghost

Record the process of tossing nodejs in linux today and learn from each other:


(I don't know why I used the source code for installation. When I call npm, The npmlog will always fail to be found. Later I used a binary code for installation. If the ox knows why, hope you can leave a message. Thank you)


Step 1: Download The nodejs binary Library

Wget http://nodejs.org/dist/v0.10.32/node-v0.10.32-linux-x64.tar.gz

Step 2: Download the ghost open source code:

Wget https://ghost.org/zip/ghost-0.5.2.zip


Decompress the files in the nodejs and ghost directories respectively.


Part 3: Install the frameworks and libraries required by nodejs:

./Bin/npm-g install -- production


Part 4: add the js configuration file to node.

1: the cd is redirected to the ghost directory. Otherwise, the packet. json file cannot be found.

2: vim modify the config. js file to set the address and port you want to listen

3: Call nodet in the absolute path to add the configuration js file:

../Nodejs/bin/node config. js


Part 5: Start the nodejs service:

../Nodejs/bin/npm restart


Next, you can enter the URL and port you just set in config. js in the browser.



How to install nodejs in Windows

1. Download The nodejs version (. msi file) in Windows );
2. Double-click the installation;
3. Set environment variables, such:
Path c: \ Program Files (x86) \ nodejs
NODE_PATH C: \ Program Files (x86) \ nodejs \ node_modules

This completes the environment.

How to Build the nodejs server environment?

1. node_modules only stores some dependent packages. The specific database files are stored in the mysql directory.
2. To make the system accessible without opening the editor, you only need to locate the directory of your system in the console and start it with the node command.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.