Huawei Cloud Self-Service Account Ordering Step by Step Guide to Setting Up LAMP Stack on Huawei Cloud Instance

Huawei Cloud / 2026-08-26 16:47:47

Step by Step Guide to Setting Up LAMP Stack on Huawei Cloud Instance (with the account stuff you’ll actually hit)

Huawei Cloud Self-Service Account Ordering You’re searching for “LAMP on Huawei Cloud” because you want to spin up a working environment fast— but in practice the blockers usually show up before you ever touch Linux or Apache: account verification, payment method quirks, region/network constraints, and risk-control restrictions that can pause provisioning. This guide follows the real flow: from buying the cloud instance → verifying your account (if needed) → funding/renewal → provisioning the VM → deploying LAMP with a repeatable checklist.


1) Before you deploy: make sure your Huawei Cloud account won’t stall provisioning

On Huawei Cloud, the “technical steps” are rarely the first risk point. I’ve seen multiple cases where people prepare a deployment guide, then discover the console can’t create the resource or the payment fails. Here’s what to check first so your LAMP setup doesn’t die in the first hour.

1.1 Purchase decision: pay-as-you-go vs. monthly/annual (and how it impacts your test)

  • Pay-as-you-go (on-demand) is usually the fastest for LAMP testing. You can create an ECS, deploy, verify, and delete without thinking about contract periods.
  • Subscription (monthly/annual) can be cheaper if you’re confident you’ll keep the VM. But if your identity verification or billing method is still pending, subscription workflows sometimes drag longer and complicate refunds.

Practical tip: For first-time LAMP deployments, start with pay-as-you-go. If your application survives load testing and you know the duration, switch to a longer commitment.

Huawei Cloud Self-Service Account Ordering 1.2 KYC/verification: what triggers it and what usually fails

Huawei Cloud International-like flows (varies by region/account type) often require some identity checks. Common triggers:

  • New account creating paid compute resources
  • First time using credit/debit for a larger amount
  • Enterprise org account setup or invoice/billing profile
  • Unusual location/network patterns during payment attempts

Most common verification failure reasons I’ve seen:

  • Document mismatch (name/ID number formatting differs; using a nickname or different spelling)
  • Low image quality (blur, glare, cropped edges)
  • Wrong submission type for your account region (selecting consumer vs enterprise flow)
  • Huawei Cloud Self-Service Account Ordering VPN/proxy used during submission (system sometimes flags it as “inconsistent identity access”)
  • Billing address / phone number mismatch

Actionable fix: Complete verification before you try provisioning ECS. Use the same real-world details across: account profile → billing profile → documents.

1.3 Risk control reviews: what can restrict usage after you “successfully” sign up

Even after signup, Huawei Cloud may apply risk-control controls if the account is new or flagged. This can show up as:

  • Payment authorization failures (even with valid card)
  • Limits on purchase quantity or certain product categories
  • Delayed activation of services or throttled provisioning

Huawei Cloud Self-Service Account Ordering What helps: maintain consistent access patterns (no frequent geo changes), add and verify your contact number, and avoid rapid successive failed payments.


2) Funding and payment methods: choose based on what avoids downtime

People usually ask: “Can I pay by card? Do I need prepaid? What about renewals?” The answer is less about “which is supported” and more about “which fails less often under risk-control.”

2.1 Common payment methods (and real operational differences)

Payment method Best for Common issue How to reduce failure
Credit/Debit card Fast provisioning, short tests Authorization blocked by bank or risk-control Use card in your verified billing profile; avoid VPN; ensure sufficient balance
Bank transfer / wire (where available) Enterprise billing, predictable budgeting Processing delay; invoice/billing alignment needed Confirm account number details and timing; avoid last-minute renewals
Prepaid/Top-up balance (if your account supports it) Teams that want spend control Top-up not immediately reflected during peak times Top up ahead of the billing cycle; verify receipt in billing center
Subscription / renewal plan Long-running stacks Renewal can fail if billing profile changes Lock billing details; set alerts; verify auto-renew status

2.2 Renewal gotcha: you don’t want your VM to stop mid-deployment

If you choose a subscription for your ECS, make sure you understand what happens on failure: some platforms stop new actions; others keep resources running but fail renewal/scale-out. For LAMP, it usually means Apache could go down after service interruption.

Recommendation: For production-like tests, turn on billing alerts and schedule a manual check at least 3–5 days before expiry. If you’re using top-up, confirm the balance before you update packages.


3) Provision the Huawei Cloud ECS you need for LAMP (practical configuration checklist)

Your LAMP stack deployment depends heavily on network accessibility and storage sizing more than CPU/RAM. Below is the checklist I use when deploying for real customers.

3.1 Region and VPC/subnet selection

  • Pick a region close to your users and where you have acceptable latency. LAMP is not heavy, but connection latency affects “it feels slow” complaints.
  • Use a VPC/subnet where you can create firewall/security group rules. Don’t choose a locked-down network and then spend time hunting for why port 80/443 isn’t reachable.

3.2 Instance sizing: avoid both under- and over-provisioning

Minimal LAMP for a small site:

  • CPU: 1–2 vCPU
  • RAM: 1–2 GB (2 GB is safer if you install PHP + caching)
  • Disk: 20 GB minimum for OS + packages + logs + website files
  • OS: choose a stable Linux distribution image (commonly Ubuntu or CentOS-like)

Cost-control tip: start with the smallest that can compile/install packages comfortably. If you expect WordPress or heavier PHP apps, go up to 2 GB.

3.3 Security group / inbound rules (ports you must open)

LAMP needs:

  • 22 for SSH (restrict by your IP if possible)
  • 80 for HTTP
  • 443 only if you plan to add TLS/HTTPS (optional for day-1)

Real-world mistake: People open 80/443 to “0.0.0.0/0” without enabling rate limits, then their logs explode in hours. At minimum, restrict SSH to your office/home IP and consider WAF or fail2ban later.


4) Upload SSH access and confirm you can log in before deploying

Before installing LAMP, verify SSH connectivity from your machine. It sounds trivial, but it saves hours.

  1. In your ECS details, confirm the login username and authentication method (key pair is typical).
  2. Huawei Cloud Self-Service Account Ordering From your local terminal, test:
    ssh -i /path/to/key.pem user@ECS_PUBLIC_IP
  3. If you can’t connect: re-check security group inbound for port 22 and ensure the correct IP/route/VPC is used.

Operational note: If your SSH fails only sometimes, it can be due to local firewall rules, not cloud. But if it fails consistently, it’s almost always security group or wrong username.


5) Step-by-step: install LAMP on the Huawei Cloud ECS

Below uses a common pattern (Ubuntu-like commands). If your image is different, the flow is the same: install Apache → install MySQL/MariaDB → install PHP and PHP extensions → configure firewall and permissions.

5.1 Update the OS and install Apache

sudo apt-get update
sudo apt-get -y install apache2

Verify Apache locally and from your browser:

sudo systemctl status apache2 --no-pager
curl -I http://127.0.0.1

5.2 Install and secure MySQL/MariaDB

sudo apt-get -y install mysql-server

Secure installation (important for exposed services):

sudo mysql_secure_installation

If prompted: set root password, remove anonymous users, disallow root remote login, and remove test DB.

5.3 Install PHP and required modules

sudo apt-get -y install php libapache2-mod-php php-mysql

Enable mod_php if needed and restart Apache:

sudo systemctl restart apache2

5.4 Create a PHP test page

echo '<?php phpinfo(); ?>' | sudo tee /var/www/html/info.php

Test:

  • Browser: http://YOUR_ECS_PUBLIC_IP/info.php
  • Or from your machine (if firewall is correct).

5.5 Common LAMP permission issues you’ll otherwise waste time on

  • “403 Forbidden”: check /var/www/html permissions and Apache config.
  • PHP not executing: ensure the .php handler is enabled; verify Apache has libapache2-mod-php loaded.
  • MySQL connection errors from PHP: verify php-mysql installed and credentials.

6) Lock it down: security group + OS firewall + log hygiene (do this before exposing 80/443)

A lot of “LAMP install guide” content ignores attack surface. In cloud environments, you’ll be scanned quickly. Here’s the practical checklist.

6.1 OS firewall (UFW example)

If your image includes UFW:

sudo apt-get -y install ufw
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
# sudo ufw allow 443/tcp  # only if needed
sudo ufw enable

6.2 Fail2ban for SSH (recommended)

sudo apt-get -y install fail2ban
sudo systemctl enable --now fail2ban

6.3 MySQL hardening reminders

  • Do not expose MySQL port to the public internet. Keep it bound locally if possible.
  • Create a dedicated database user for your app with minimal privileges.
  • Enable proper logging and review error logs regularly.

7) Cost comparisons: what you pay for LAMP on Huawei Cloud (and what commonly surprises people)

LAMP itself is cheap; the surprise is that billing line items stack: ECS compute + disk + public bandwidth + IP. If you deploy and keep it running during trials without monitoring, costs accumulate faster than expected.

7.1 Typical cost components for a small LAMP VM

  • ECS instance (hourly or subscription rate)
  • System disk + any additional data disks
  • Public bandwidth (egress) depending on traffic volume
  • Public IP (sometimes bundled; sometimes separately billed)

7.2 Scenario-based cost guidance

  • Scenario A: 2–6 hour test
    Use pay-as-you-go. Terminate the instance after deployment verification. You’ll pay mostly for compute time and minimal egress.
  • Scenario B: 1–2 weeks QA environment
    Still usually pay-as-you-go for simplicity unless your team has a budget commitment.
  • Huawei Cloud Self-Service Account Ordering Scenario C: 3+ months “stable” staging
    Consider subscription and move to better cost governance (alerts, tags, automated shutdown).

7.3 A practical “avoid overspend” rule

Set a retention plan: if you’re running LAMP for testing, define the stop date and enforce it. In my experience, overspend happens because “temporary” environments get forgotten.


8) Troubleshooting: the issues you’ll likely hit when deploying LAMP on Huawei Cloud

8.1 “I can’t access the site from the browser”

  • Check security group inbound rules for port 80.
  • Verify the instance public IP and that the browser is hitting the right address.
  • Confirm Apache is running: systemctl status apache2.
  • Huawei Cloud Self-Service Account Ordering Check Apache listens on port 80 (ss -lntp | grep :80).

8.2 “PHP page downloads instead of executing”

  • Confirm PHP module is enabled and Apache restarted.
  • Check Apache config for PHP handler and DirectoryIndex.

8.3 “MySQL user auth fails”

  • Confirm you created the DB user with correct username/host.
  • Use the same authentication plugin expected by your MySQL/MariaDB version.
  • Ensure PHP uses correct DB credentials and database name.

8.4 Provisioning fails due to billing / verification / risk control

Huawei Cloud Self-Service Account Ordering Symptoms look different but the cause is often the same: account not fully verified or payment method authorization issues.

  • If the console won’t let you buy ECS: check your account verification status in billing/identity center.
  • If payment fails: retry after resolving bank authorization; avoid repeated rapid attempts.
  • If you hit a limit: request account risk-control review rather than brute forcing purchases.

9) Frequently asked questions (the ones that affect your deployment timeline)

Q1: Do I need to verify identity before I can create a VM?

Often yes once you move from free-tier/limited options into paid compute. If you see “pending verification” in the console or payments are blocked, complete KYC first—then provision ECS. Trying to deploy first typically causes delays that waste time.

Q2: Which payment method is safest for first-time provisioning?

In practice, the “safest” method is the one that matches your verified billing profile and avoids authorization loops. For many users that’s a properly set up card with correct billing address. For enterprises, bank transfer workflows tend to be predictable but require earlier planning to avoid timing issues.

Q3: How do I prevent LAMP from being exposed too early?

Do these in order: (1) provision ECS without opening port 80 publicly, (2) deploy LAMP and test via SSH/local curl, (3) then open port 80 only when you confirm Apache + PHP execution works.

Q4: Can I build LAMP using a private network only?

Yes. If your plan is internal access, you can avoid public exposure. You’d still need security rules for inbound from your internal clients. This is often the better default for staging environments.

Q5: How do I control costs for a test VM?

Use pay-as-you-go, set an explicit delete schedule, and monitor public bandwidth. Also clean up unused snapshots/images and remove extra disks if you tested storage layouts.

Q6: What’s the fastest “done” checklist for a working LAMP site?

  • SSH login works
  • Apache running and reachable on port 80
  • PHP runs (check /var/www/html/info.php)
  • MySQL starts, root is secured, app user credentials tested
  • Security group and UFW allow only required ports

10) Your next move (based on your intent)

If your intent is “deploy today,” the most efficient path is:

  • Confirm verification status and billing method first
  • Provision a pay-as-you-go ECS with a security group that allows 22 and (only after testing) 80
  • Install Apache + MySQL + PHP using the checklist above
  • Verify with info.php, then tighten security and confirm MySQL isn’t exposed
  • Set an expiry/delete plan to prevent accidental renewal/overrun

If you tell me your target region, Linux image (Ubuntu/CentOS/etc.), and whether you want public HTTP only or HTTPS too, I can adapt the exact commands and the firewall/security group order for your case.

TelegramContact Us
CS ID
@cloudcup
TelegramSupport
CS ID
@yanhuacloud