马来西亚云服务

ssh root@your_server_ip -p22

Replace your_server_ip and -p22 with your actual IP and SSH port. 

Once logged in, you’re ready to start server configuration. 

Step 2: Install Apache Web Server

Apache is a widely used open-source web server and perfect for hosting dynamic websites.

A. For Debian/Ubuntu:

sudo apt update

sudo apt install apache2 -y

B. For CentOS/RHEL:

sudo dnf update

sudo dnf install httpd -y

C. For openSUSE:

sudo zypper refresh

sudo zypper install apache2

D. Start and Enable Apache:

Start and Enable Apache

To test if Apache is working, visit your VPS IP address in a browser—you should see the default Apache welcome page.

Step 3: Install PHP

PHP allows your server to interpret and execute dynamic scripts. Let’s install PHP and the necessary extensions. 

A. Debian/Ubuntu:

sudo apt install php php-cli php-mysql php-curl php-gd php-mbstring php-xml -y 

B. CentOS/RHEL:

sudo dnf install php php-cli php-mysqlnd php-curl php-gd php-mbstring php-xml -y 

C. openSUSE:

sudo zypper install php php-cli php-mysql php-curl php-gd php-mbstring php-xml 

D. Restart Apache:

sudo systemctl restart apache2 

E. Verify PHP installation:

php -v 

Step 4: Install MySQL

MySQL is the database that stores your website’s content and user data. 

A. Debian/Ubuntu:

sudo apt install mysql-server -y

B. CentOS/RHEL:

sudo dnf install mysql-server -y 

C. openSUSE:

sudo zypper install mysql mysql-client 

Then, enable and start MySQL: 

sudo systemctl start mysql 

sudo systemctl enable mysql

Step 5: Set Up a Virtual Host

Virtual hosts allow multiple websites to run on a single server by assigning separate configurations. 

A. Create a Directory for Your Website:

sudo mkdir -p /var/www/yourdomain.com/public_html 

Set permissions: 

sudo chown -R $USER:$USER /var/www/yourdomain.com/public_html 

sudo chmod -R 755 /var/www 

B. Create a Sample Page:

nano /var/www/yourdomain.com/public_html/index.html 

Paste the following and save: 

<html> 
 <head><title>Welcome!</title></head> 
 <body><h1>Website Hosted Without Control Panel</h1></body> 
</html> 

C. Configure Apache Virtual Host:

For Ubuntu/Debian:

sudo nano /etc/apache2/sites-available/yourdomain.com.conf 

For CentOS:

sudo nano /etc/httpd/conf.d/yourdomain.com.conf 

Add this content: 

Apache

D. Enable and reload Apache:

sudo a2ensite yourdomain.com.conf 

sudo systemctl reload apache2

You should now see your test page by visiting your domain or IP. 

Step 6: Upload Website Files or Install WordPress

A: Upload Files via FTP

Use FileZilla or WinSCP and connect via SFTP using your VPS IP and credentials. Upload your website files into the /public_html directory. 

B: Install WordPress via Command Line

Navigate to your website root: 

cd /var/www/yourdomain.com/public_html 

Download and extract WordPress: 

wget https://wordpress.org/latest.tar.gz 
tar xfz latest.tar.gz 
mv wordpress/* ./ 
rm -rf wordpress latest.tar.gz 

Step 7: Create a MySQL Database and User

Log in to MySQL: 

mysql -u root -p 

 Inside the MySQL shell: 

Inside the MySQL

Step 8: Complete the CMS Installation

Go to http://yourdomain.com and follow the WordPress setup wizard: 

Once setup is complete, you’ll be redirected to the WordPress dashboard. 

Step 9: Secure Your Website with SSL

Use Let’s Encrypt to install a free SSL certificate: 

sudo apt install certbot python3-certbot-apache -y 

sudo certbot --apache -d yourdomain.com -d www.yourdomain.com 

Renew certificates automatically: 

sudo certbot renew --dry-run 

VPS Malaysia: Managed vs Self-Managed Options

At VPS Malaysia, we offer both managed and self-managed VPS hosting plans, suitable for both beginners and professionals. 

VPS Malaysia

Self-Managed VPS:

Managed VPS:

If you prefer control and customization, go with self-managed. For convenience and ease of use, a managed VPS is your best bet. 

Final Thoughts

Hosting a website manually on a VPS is a rewarding experience that gives you complete control over your hosting environment. From improved performance and enhanced security to reduced costs, the benefits are numerous. 

However, it does require a bit more time, patience, and technical know-how. 

Whether you’re spinning up a test environment, deploying a client’s website, or running a secure trading app, VPS Malaysia self-managed plans offer the flexibility you need. And if you’d rather avoid the manual work, you can always go with a managed VPS with SPanel, giving you the best of both worlds.  

FAQs: VPS Hosting Without a Control Panel

Q1. Is cPanel mandatory for VPS hosting?

No. You can configure a VPS entirely through the command line. Control panels are optional but useful for less experienced users. 

Q2. Can beginners manage a VPS without a GUI?

Yes, but there’s a learning curve. Tutorials like this one, paired with practice, make the process approachable. 

Q3. What’s better—Linux or Windows VPS?

For hosting websites, Linux VPS is preferred due to its stability, flexibility, and community support. 

Q4. How do I back up a website without a control panel?

You can schedule backups using cron jobs and tools like rsync, mysqldump, or cloud storage CLI utilities (e.g., AWS CLI). 

Q5. Can I run multiple websites on one VPS?

Absolutely. Using virtual hosts in Apache or Nginx, you can host multiple domains on a single VPS. 

Kaif

Share
Published by
Kaif
8 months ago

Recent Posts

Is WordPress 6.9 a Game Changer? Here’s a Look

1. Introduction WordPress 6.9, codenamed "Gene," is the final major release of 2025 and one…

7 days ago

Docker vs Kubernetes: Containerization Showdown

1. Introduction to Containerization 1.1 What Is Containerization and Why It Matters Modern software development…

1 week ago

How to Set Up n8n? A Step-by-Step Guide for Self-Hosted Workflow Automation

1. Introduction If you've ever wanted to automate repetitive tasks — like syncing data between…

3 weeks ago

Top Survival Games Perfect for Dedicated Server Hosting

Introduction Survival games have become one of the most enduring and beloved genres in modern…

1 month ago

Containerize and Deploy Node.js Applications With VPS Malaysia

1. What is Node.js? Node.js lets you use JavaScript to build the "brain" of a…

1 month ago