Introduction to the method of Aliyun server installation Node.js/nginx/mysql

Source: Internet
Author: User
Tags install node aliyun

Installing Node


Description
First you have to have the Aliyun server!
This tutorial series takes the Aliyun server + Ubuntu 12.04 LTS operating system as an example.
Since the Node.js version in the software warehouse of the Ubuntu 12.04 LTS release is 0.6.x and does not meet the node.js requirements of Ghost, we install the latest version of Chris-lea from the Node.js warehouse.
Aliyun server defaults to provide the account is the root account, the implementation of instructions can not add sudo, but out of habit, or take it.
Start installation
Landing Aliyun Server
Recommended use of PuTTY tools, small, flexible, installation-free. Aliyun default to provide the login account is root, that is, the Linux operating system Super Administrator, you can do anything! But do not worry about bad system, Aliyun server reset operating system is very convenient! Open your guts and do it!

Install Node.js

Execute the following instructions sequentially:

sudo apt-get update
sudo apt-get install-y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install Nodejs
Note: Starting with Node.js v0.10.0, the Node.js installation package provided in the Chris Lea repository includes NPM and Nodejs-dev by default.

When you execute sudo add-apt-repository ppa:chris-lea/node.js This instruction, you are prompted to ask if you are sure you want to add the PPA above:

root@ay1402132141274203d6z:~# sudo add-apt-repository ppa:chris-lea/node.js
You are are about to add the following PPA to your system:
evented I/O for V8 JavaScript. Node ' s goal to provide a easy way to build scalable network programs
More Info:https://launchpad.net/~chris-lea/+archive/node.js
Press [ENTER] to continue or ctrl-c to cancel adding it

Don't bother, just press ENTER to ok!

Confirm that the installation is successful
After the execution of the series of instructions above, the Node.js is installed. Follow the instructions below to try the new node.js:

Node-v

When writing this article, the Node.js version is v0.10.25, that is, the output is:

v0.10.25
Make sure that NPM is installed correctly and typing the following instructions:

Npm-v
The output is:

1.3.24

Install Nginx

Compared with the previous installation of Node.js, the installation of Nginx is very simple!

Execute the following directives:

sudo apt-get install Nginx
Ok! Nginx's Ready! It's that simple!

Next we start the Nginx service:

sudo service nginx restart
Now test whether the page can be normal to open it! Find the IP address assigned to you when you purchase the Aliyun server, open the browser, enter the IP address above, return, do you see the following familiar page?


Installing MySQL


Ghost default to use the Sqlite3 database, but I still recommend using MySQL, to avoid future due to more data, access to a lot of performance degradation.

Note: This series of tutorials is only for Ubuntu 12.04 on Ali Cloud. This chapter describes the MySQL installation, settings are for the 5.5 version. If your version is different, there may be problems, suggest a Google solution.
Start installing MySQL
Follow the instructions below to start installing MySQL:

sudo apt-get install mysql-server mysql-client
Because the MySQL installation package is larger, the installation time will be slightly longer. During installation, you will be prompted to set a password for root (where root is the admin account of the MySQL database), which is more complex and more secure. The following figure:

Related Article

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.