HOSTING WITH ALICLOUD ALIBABA -HOW TO AND TIPS

June 26, 2017   /   by Marco  / Categories :  Business, Technology, Websites, Wordpress

Currently, Alicloud has a special that give you Elastic Cloud hosting for USD$30 for the first year – this is really cheap! What you get is:

Alibaba Cloud - banner

If you want to try it out click on this link – AliCloud or click on the image.

One of the main reasons why I decided to try Alicloud was because of the free DDoS attack protection and also because it is a very competative and cheap price. One of the downsides with this hosting is the memory limitation of 1GB.

I’m a newbie when it comes to AWS (never really used it before and only ever player around with it) but I did manage to set up the VPS instance with AliCloud and thought I’d share it with you here. When selecting which regions you want your Elastic Cloud instance to reside, pick one where you think most of the traffic will come from.

When the setup was completed I logged in and changed the password to the VPS Instance.

CHANGE ROOT PASSWORD TO ALICLOUD INSTANCE

Login to the console

Alibaba Cloud - Login

 

Once logged in click on Elastic Computer Service in the Base Services

Alibaba Cloud - Elastic Compute Service

This page will show you all the regions and whether you have instances in that regions. In my case, I have one in the Silicon Valley (US) and another in the Sydney area. The Silicon Valley is for a website where the majority of visitors is from the US and Europe.

I have one in the Asia Pacific SE 2 (Sydney) region as I wanted one that was local and closer to my user base. At the bottom just choose the region where the service resides.Alibaba Cloud - Sydney Region

To manage the instance click on the number next to Running.

Alibaba Cloud - Silicon Valley Region Instance

Click on more on and then Reset Password

Alicloud setting - more reset password

Then enter a password that meets all the criteria specified: 8-30 characters. It must contain three character types (uppercase letters, lowercase letters, numbers and the following special characters). Click on Submit.

Alicloud - Reset Password

As per the note, for the password to apply you will need to restart the instance. To do this click on the more button and select restart

Alibaba Cloud - Restart

Select Restart and Click on OK

Alibaba Cloud - Restart. Options

The instance will now restart and you will see the status changing to Stopping

The status of the instance will change to Running when it’s ready and has completely restarted.

Alibaba Cloud - Restart. Status Running

Now use a SSH tool like PUTTY and connect to the instance. Use root as the username and enter the password you just changed.

Alibaba Cloud - SSH

ADDING SWAPSPACE TO ALICLOUD

The instance only has 1GB of memory and 40GB of storage. I recommend you add some additional swap space so you can use for virtual memory.

A quick way to check how memory you have is to type TOP.

Alicloud - Swap space

As you can see there is no swap space allocated so let’s add some. Follow these steps (these are for a CentOS platform):

Check storage available

 

Alibaba Cloud - storage space on instance

Since this instance will only house several WordPress sites, I’m planning to just add 4 times the amount of virtual memory.  You can stick with double but I’m just going with 4 times to give it some more buffer. Now create the swapfile:

Alibaba Cloud - create swapfile

Verify that the swap file has been created:

Alibaba Cloud - storage space on instance check

For security reasons, give the right permission to the swapfile by typing:

Alibaba Cloud - create swapfile permissions

Check the permissions

Alibaba Cloud - check swapfile permissions

Setup the swapfile

Alibaba Cloud - storage space on instance make swapfile

Use the swapfile

Alibaba Cloud - storage space on instance swapon swapfile

Check if the swapfile is active

Alibaba Cloud - storage space on instance swapon

Alibaba Cloud - check swapfile after swapfile creationg TOP

Now we need to make the swap file permanent by editing the fstab file

Alibaba Cloud - make swapfile permanent

Change the cache pressure to a more optimal setting to 50 (default is 100)

Alibaba Cloud - cache pressure optimal

We need to do make the changes so it’s applied at the next reboot

add at the bottom:

Alibaba Cloud - cache pressure optimal startup

Change swappiness setting

Business Legions Alicloud - Swappiness

Add the setting to make it permanent

vi /etc/sysctl.conf

Business Legions Alicloud - swapiness permanent

reboot the instance after making the changes

INSTALL HOSTING CONTROL PANEL – VESTACP ON ALICLOUD

I decided to use VESTACP as the Hosting control panel. The reason why is simple – it’s FREE. I use their advanced install settings page for creating the download script. I do this because I don’t need several features like mail or DNS hosting to save on memory, processor and storage I don’t install these features.

Go to this link: vestacp.com/install for the install instructions

Business Legions Alicloud - VestaCP install instructions

If you want to customise the install so you can choose which feature are installed then follow the below steps. In the advanced settings don’t install MAIL and DNS (make sure they have NO)

Business Legions AliCloud - VestaCP advanced instructions

Click on the Generate Install Command and it will display the commands you will need to paste in your AliCloud instance

Business Legions AliCloud - VestaCP advanced instructions generate install command

Now you need to download the installation script

 

Then run it by

 

When prompted to continue, enter Y and press the ENTER key

Business Legions AliCloud - VestaCP advanced install instructions execute

The script will run and the process will take about 15 minutes

Business Legions Alicloud - VestaCP install instructions execute script process

Once the installation is complete you will see the settings to connect to the Vesta Control Panel.

Business Legions Alicloud - VestaCP install instructions execute script complete

That’s it. It’s now ready to be accessed, but you will need to open up some firewall rules to allow access to different TCP/IP ports.

FIREWALL ACCESS ON ALICLOUD

Login to the AliCloud console and click on the Security Menu

Elastic Computing Services and then select  your instance

Business Legions Alicloud - Elastic Computing Service

 

Business Legions Alicloud - Elastic Computing Service Instance

Click on Security Group

Business Legions Alicloud - Instance Security Group

Click on Configure Rules

Business Legions Alicloud - Security Setting Configure Rules

Add the HTTP and 8083 Ports required to access the Vesta Control Panel and website. Add the following settings:

FOR HTTP

  • Select TCP port HTTP (80)
  • Add the Authorisation Object 0.0.0.0/0 (this will allow all IP address to access the website)
  • Add the description Allow INBOUND WEB ACCESS
  • Click on OK

Business Legions Alicloud - Security Setting Configure Rules Quickly Create Rules HTTP Rule

FOR FTP AND SSH ACCESS

There is already an existing rule for SSH (port 22) however, I wanted to restrict this access along with FTP access to only a few static IP address I use. The process is the same as above but you just need to use the port range (20/22). Here are the complete rules list (just remember to specify your IP address in the Authorisation Object.

Business Legions Alicloud - SSH AND FTP access restrictions

 

 

FOR VESTA CONTROL PANEL

  • Select Custom Port Range TCP port 8083/8083
  • Add the Authorisation Object 1.1.1.1/24 (Your IP or IP addresses that will require management access to the Vesta Control Panel)
  • Add the description Allow ACCESS TO VESTA CONTROL PANEL
  • Click on OK

Business Legions Alicloud - Security Setting Configure Rules Quickly Create Rules VESTA CP Rule

The list will display the new rules

Business Legions Alicloud - Security Setting Configure Rules Quickly Create Rules List

You can also delete port 3389 as this is not required on CentOS

Business Legions Alicloud - Security Setting Configure Rules Quickly Create Rules List Delete Port 3389

Business Legions Alicloud - Delete Security Group Rules Confirmation

ACCESS VESTA CONTROL PANEL

Now you should be able to access the Vesta Control panel. Just open up any web browser and enter the URL https://ipaddress:8083

You will receive the following Certificate Error message, just click on Advanced

Business Legions Alicloud - VestaCP controlBusiness Legions Alicloud - VestaCP control

Click on Proceed to …(unsafe)

Business Legions Alicloud - VestaCP control Advanced Proceed

This will bring you to the Vesta Control Panel

Business Legions Alicloud - VestaCP Login

Just enter the login detail you previously used during the install script and you will be logged into the Control Panel

VESTA CONTROL PANEL SETTINGS

DISABLE BACKUPS

If you want to save space on the instance you can remove backups or decrease the number of OS backups. Click on Packages on the top menu

Business Legions Alicloud - VestaCP Login Packages

Click on Edit

C:\Users\Administrator\Dropbox\Blog Images\Business Legions\Alicloud\Business Legions Alicloud - VestaCP Packages Default Edit.png

In the Backups field enter 0 and click on save

Business Legions Alicloud - VestaCP Packages Default Edit Backups 0

SHORTCUT LINK TO WEB FOLDER

create a shortcut link directory:

ln -s /home/admin/web/ /web

Business Legions Alicloud - VestaCP shortcut link to web folder

CHANGE TIMEZONE

I prefer to change the timezone to my local timezone so I know exactly the time

Business Legions Alicloud - Timezone

CHANGE MAXIMUM PACKET SIZE

For large database imports, we need to increase the maximum packet size allowed. Change it to 64M

Business Legions Alicloud - VestaCP my cnf settings max allowed packet

Restart the database

INSTALL WORDPRESS OR ANY OTHER CMS TOOL

Once you have installed Vesta CP you can create a database, website and pretty much install any self hosted CMS tool like WordPress, Drupal etc.

 

If you run into any problems leave me a comment and I’ll try to help.

 

 

 

DO YOU LIKE WHAT YOU'VE READ?
Join our subscription list and receive our content right in your mailbox. If you like to receive some Great deals our Freebies then subscribe now!

Our Sponsors

  • Follow us:

OTHER ARTICLES YOU MAY LIKE


HOW TO INCREASE MY CREDIT SCORE AFTER A BANKRUPTCY DISCHARGE

HOW TO INCREASE MY CREDIT SCORE AFTER A BANKRUPTCY DISCHARGE

If you are crushed under the heavy burden of debt, you can get relief by filing for bankruptcy. This will clear most of your existing debts. However, bankruptcy could have a significant effect on your credit by plummeting your credit score. With a low rating, it will be more difficult to qualify for credit facilities […]

read more
HOW TO OPEN THE METABOX P950HP BACK COVER

HOW TO OPEN THE METABOX P950HP BACK COVER

I recently needed to install a 960GB SSD Crucial Drive in my Metabox P950HP laptop and had no clue on how to do this. I tried removing all the screws from the back of the Metabox and pryed the back cover but it was stuck. I had a hunch there was something more to it […]

read more

Subscribe

Receive the latest news and awesome deals via email

Like our Page

Social Wall Social Wall