- 1. Choose Linode as my cloud hosting provider
- 2. Connect to Linode
- 3. Install nodejs in Ubuntu
- 4. Get your First Ionic Project
Linode is a Cloud Hosting provide high performance SSD Linux VPS. I choose Linode because of the stability of its services.
Visit my referral link to create an Linode account. Don’t forget to use promo code
LINODE10 to get $10 sign up credit.
Sign in and select a Linode plan and data center, as shown below.
Usually you should select the data center closest to you to get best performance. If you are not sure which one to select, download the speed test to find the location for you. I choose the first $10/mo plan, it’s enough for me now and you can upgrade to an higher plan at any time.
Get to Linode Manager and select your new Linode. Click
Deploy an Image and you’ll be prompted to deploy a Linux distribution, as shown below.
Ubuntu 14.04 LTS in Distribution, enter a size for the disk in the Deployment Disk Size, you can change disk size later, leave the default size of Swap Disk, enter your own Root Password and click
After you deployed Ubuntu in your Linode VPS, it’s still turned off. You need to log into the Linode Manager select your Linode and click the
Boot button on your Linode dashboard.
Now your Linode is fully provisioned and available in the data center and it’s already turned on. So what we need to do is to connect to our Linode using SSH protocol.
Go to Linode Manager page, select your Linode and click the
Remote Access tab. You will see your
Public IPs as below.
$ ssh email@example.com
For your first time logging in, you need to type
yes and press Enter to continue connecting after terminal showing a authenticity warning. After that enter the password you created for the
root when you deplyed the Ubuntu.
A hostname is a nickname of your Ubuntu system and we need to set this up first.
# echo "hostname" > /etc/hostname
Enter the above command to set the hostname, replacing
double quotation marks with your own hostname.
# nano /etc/hosts
Use above nano command to open
/etc/hosts file and add line
126.96.36.199 Huahua into file and save it.
Huahua is my hostname, you should replace it with your own hostname.
# dpkg-reconfigure tzdata
This command let you access to the timezone setting interface. Check the current system date and time using following command:
Watch below video for details about setting your system’s hostname and timezone
In order to patch security holes in packages and help protect your Linode against unauthorized access, you need to install the available software updates for your Linode’s Linux distribution.
# apt-get update
We need to install nodejs in Ubuntu so that we can run ionic project in our Linode VPS.
Add a PPA maintained by NodeSource. The PPA will be added to your configuration and your local package cache will be updated automatically.
# curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash -
# sudo apt-get install --yes nodejs
Used to compile and install native addons from npm
# apt-get install --yes build-essential
Check nodejs version to make sure you have it installed
# nodejs -v
After you have installed Node.js, we are almost there for our first Ionic app.
# sudo npm install -g cordova
# sudo npm install -g ionic
# ionic start ionic_test
# cd ionic_serve
Now I am good to access to my first ionic project within browsers by typing 188.8.131.52:8100.
Actually if you want to keep your Ionic project online even after you disconnect the SSH, you should run the following command to start Ionic serve. Good luck, have fun!
# screen -d -m -L ionic serve --nolivereload