Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "How to install a web development environment on a VPS or a dedicated server"
excerpt: "Find out how to install a web development environment on a VPS or an OVHcloud dedicated server"
updated: 2024-03-13
updated: 2025-10-15
---

## Objective
Expand All @@ -22,24 +22,38 @@ If you would like to install a CMS (**C**ontent **M**anagement **S**ystem) on yo

## Requirements

- A [VPS] solution (https://www.ovhcloud.com/asia/vps) or a [dedicated server](/links/bare-metal/bare-metal) in your [OVHcloud Control Panel](/links/manager)
- A [VPS] solution (/links/bare-metal/vps) or a [dedicated server](/links/bare-metal/bare-metal) in your [OVHcloud Control Panel](/links/manager)
- Administrative (sudo) access to your server via SSH

## Instructions

Log in to your VPS via SSH with your username and password.

### Update the package index

Before installing the components, update the package list:

```bash
sudo apt update
```

Apply the available updates:

```bash
sudo apt -y upgrade
```

### Install PHP

Install PHP:

```sh
sudo apt install php php-cli php-mysql php-xml php-gd php-curl -y
```bash
sudo apt install -y php php-cli php-fpm php-xml php-gd php-curl
```

To check that PHP is installed properly, enter the following command:

```sh
```bash
sudo php -v
```

Expand All @@ -56,13 +70,13 @@ If PHP is correctly installed, you should see this message:

Install Nginx:

```sh
```bash
sudo apt install nginx -y
```

To verify that Nginx is installed properly, enter the following command:

```sh
```bash
sudo nginx -v
```

Expand All @@ -76,28 +90,44 @@ If you have any queries, please refer to [Nginx official website](https://www.ng

> [!primary]
>
> For this guide, we choose MariaDB, but you are free to install the DBMS of your choice.
>

Install MariaDB:

```sh
sudo apt install mariadb-server -y
```

Secure and configure MariaDB:

```sh
sudo mysql_secure_installation
```

Set a password for your DBMS and follow the instructions on the screen. Once the MariaDB installation is complete, you should see the following message:

![env dev web](images/success_msg_mariadb.png){.thumbnail}
> Select the tab corresponding to the DBMS you want to use. The appropriate PHP extension will be installed in each case.

> [!tabs]
> MySQL / MariaDB
>> Install MariaDB (or MySQL) and the associated PHP extension:
>>
>> ```bash
>> sudo apt install -y mariadb-server php-mysql
>> ```
>>
>> Secure the installation:
>>
>> ```bash
>> sudo mysql_secure_installation
>> ```
>>
>> Set a password for your DBMS and follow the on-screen instructions. Once the MariaDB (or MySQL) installation is complete, the following message should appear:
>>
>> ![env dev web](images/success_msg_mariadb.png){.thumbnail}
>>
> PostgreSQL
>> Install PostgreSQL and the corresponding PHP extension:
>>
>> ```bash
>> sudo apt install -y postgresql postgresql-contrib php-pgsql
>> ```
>>
>> Create a database and a user (example):
>>
>> ```bash
>> sudo -u postgres psql -c "CREATE DATABASE db_name;"
>> sudo -u postgres psql -c "CREATE USER db_user WITH ENCRYPTED PASSWORD 'strong_password';"
>> sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE db_name TO db_user;"
>> ```

### Conclusion

You have just installed PHP, an Nginx server and MariaDB DBMS. You now have a functional web development environment on your VPS or OVHcloud dedicated server. If you wish, you can now install the CMS (**C**ontent **M**anagement **S**ystem) of your choice, such as WordPress. To find out more, please read the guides “[How to install WordPress with WP-CLI on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_site_on_vps)” and “[How to install WordPress with Docker on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_docker_on_vps)”.
You have just installed PHP, an Nginx server, and a DBMS (MariaDB/MySQL or PostgreSQL). You now have a functional web development environment on your VPS or OVHcloud dedicated server. If you wish, you can now install the CMS (**C**ontent **M**anagement **S**ystem) of your choice, such as WordPress. To find out more, please read the guides “[How to install WordPress with WP-CLI on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_site_on_vps)” and “[How to install WordPress with Docker on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_docker_on_vps)”.

For some general tips on securing a GNU/Linux-based server, see our guides:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "How to install a web development environment on a VPS or a dedicated server"
excerpt: "Find out how to install a web development environment on a VPS or an OVHcloud dedicated server"
updated: 2024-03-13
updated: 2025-10-15
---

## Objective
Expand Down Expand Up @@ -29,17 +29,31 @@ If you would like to install a CMS (**C**ontent **M**anagement **S**ystem) on yo

Log in to your VPS via SSH with your username and password.

### Update the package index

Before installing the components, update the package list:

```bash
sudo apt update
```

Apply the available updates:

```bash
sudo apt -y upgrade
```

### Install PHP

Install PHP:

```sh
sudo apt install php php-cli php-mysql php-xml php-gd php-curl -y
```bash
sudo apt install -y php php-cli php-fpm php-xml php-gd php-curl
```

To check that PHP is installed properly, enter the following command:

```sh
```bash
sudo php -v
```

Expand All @@ -56,13 +70,13 @@ If PHP is correctly installed, you should see this message:

Install Nginx:

```sh
```bash
sudo apt install nginx -y
```

To verify that Nginx is installed properly, enter the following command:

```sh
```bash
sudo nginx -v
```

Expand All @@ -76,28 +90,44 @@ If you have any queries, please refer to [Nginx official website](https://www.ng

> [!primary]
>
> For this guide, we choose MariaDB, but you are free to install the DBMS of your choice.
>

Install MariaDB:

```sh
sudo apt install mariadb-server -y
```

Secure and configure MariaDB:

```sh
sudo mysql_secure_installation
```

Set a password for your DBMS and follow the instructions on the screen. Once the MariaDB installation is complete, you should see the following message:

![env dev web](images/success_msg_mariadb.png){.thumbnail}
> Select the tab corresponding to the DBMS you want to use. The appropriate PHP extension will be installed in each case.

> [!tabs]
> MySQL / MariaDB
>> Install MariaDB (or MySQL) and the associated PHP extension:
>>
>> ```bash
>> sudo apt install -y mariadb-server php-mysql
>> ```
>>
>> Secure the installation:
>>
>> ```bash
>> sudo mysql_secure_installation
>> ```
>>
>> Set a password for your DBMS and follow the on-screen instructions. Once the MariaDB (or MySQL) installation is complete, the following message should appear:
>>
>> ![env dev web](images/success_msg_mariadb.png){.thumbnail}
>>
> PostgreSQL
>> Install PostgreSQL and the corresponding PHP extension:
>>
>> ```bash
>> sudo apt install -y postgresql postgresql-contrib php-pgsql
>> ```
>>
>> Create a database and a user (example):
>>
>> ```bash
>> sudo -u postgres psql -c "CREATE DATABASE db_name;"
>> sudo -u postgres psql -c "CREATE USER db_user WITH ENCRYPTED PASSWORD 'strong_password';"
>> sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE db_name TO db_user;"
>> ```

### Conclusion

You have just installed PHP, an Nginx server and MariaDB DBMS. You now have a functional web development environment on your VPS or OVHcloud dedicated server. If you wish, you can now install the CMS (**C**ontent **M**anagement **S**ystem) of your choice, such as WordPress. To find out more, please read the guides “[How to install WordPress with WP-CLI on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_site_on_vps)” and “[How to install WordPress with Docker on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_docker_on_vps)”.
You have just installed PHP, an Nginx server, and a DBMS (MariaDB/MySQL or PostgreSQL). You now have a functional web development environment on your VPS or OVHcloud dedicated server. If you wish, you can now install the CMS (**C**ontent **M**anagement **S**ystem) of your choice, such as WordPress. To find out more, please read the guides “[How to install WordPress with WP-CLI on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_site_on_vps)” and “[How to install WordPress with Docker on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_docker_on_vps)”.

For some general tips on securing a GNU/Linux-based server, see our guides:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "How to install a web development environment on a VPS or a dedicated server"
excerpt: "Find out how to install a web development environment on a VPS or an OVHcloud dedicated server"
updated: 2024-03-13
updated: 2025-10-15
---

## Objective
Expand Down Expand Up @@ -29,17 +29,31 @@ If you would like to install a CMS (**C**ontent **M**anagement **S**ystem) on yo

Log in to your VPS via SSH with your username and password.

### Update the package index

Before installing the components, update the package list:

```bash
sudo apt update
```

Apply the available updates:

```bash
sudo apt -y upgrade
```

### Install PHP

Install PHP:

```sh
sudo apt install php php-cli php-mysql php-xml php-gd php-curl -y
```bash
sudo apt install -y php php-cli php-fpm php-xml php-gd php-curl
```

To check that PHP is installed properly, enter the following command:

```sh
```bash
sudo php -v
```

Expand All @@ -56,13 +70,13 @@ If PHP is correctly installed, you should see this message:

Install Nginx:

```sh
```bash
sudo apt install nginx -y
```

To verify that Nginx is installed properly, enter the following command:

```sh
```bash
sudo nginx -v
```

Expand All @@ -76,28 +90,44 @@ If you have any queries, please refer to [Nginx official website](https://www.ng

> [!primary]
>
> For this guide, we choose MariaDB, but you are free to install the DBMS of your choice.
>

Install MariaDB:

```sh
sudo apt install mariadb-server -y
```

Secure and configure MariaDB:

```sh
sudo mysql_secure_installation
```

Set a password for your DBMS and follow the instructions on the screen. Once the MariaDB installation is complete, you should see the following message:

![env dev web](images/success_msg_mariadb.png){.thumbnail}
> Select the tab corresponding to the DBMS you want to use. The appropriate PHP extension will be installed in each case.

> [!tabs]
> MySQL / MariaDB
>> Install MariaDB (or MySQL) and the associated PHP extension:
>>
>> ```bash
>> sudo apt install -y mariadb-server php-mysql
>> ```
>>
>> Secure the installation:
>>
>> ```bash
>> sudo mysql_secure_installation
>> ```
>>
>> Set a password for your DBMS and follow the on-screen instructions. Once the MariaDB (or MySQL) installation is complete, the following message should appear:
>>
>> ![env dev web](images/success_msg_mariadb.png){.thumbnail}
>>
> PostgreSQL
>> Install PostgreSQL and the corresponding PHP extension:
>>
>> ```bash
>> sudo apt install -y postgresql postgresql-contrib php-pgsql
>> ```
>>
>> Create a database and a user (example):
>>
>> ```bash
>> sudo -u postgres psql -c "CREATE DATABASE db_name;"
>> sudo -u postgres psql -c "CREATE USER db_user WITH ENCRYPTED PASSWORD 'strong_password';"
>> sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE db_name TO db_user;"
>> ```

### Conclusion

You have just installed PHP, an Nginx server and MariaDB DBMS. You now have a functional web development environment on your VPS or OVHcloud dedicated server. If you wish, you can now install the CMS (**C**ontent **M**anagement **S**ystem) of your choice, such as WordPress. To find out more, please read the guides “[How to install WordPress with WP-CLI on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_site_on_vps)” and “[How to install WordPress with Docker on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_docker_on_vps)”.
You have just installed PHP, an Nginx server, and a DBMS (MariaDB/MySQL or PostgreSQL). You now have a functional web development environment on your VPS or OVHcloud dedicated server. If you wish, you can now install the CMS (**C**ontent **M**anagement **S**ystem) of your choice, such as WordPress. To find out more, please read the guides “[How to install WordPress with WP-CLI on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_site_on_vps)” and “[How to install WordPress with Docker on a VPS or a dedicated server](/pages/bare_metal_cloud/virtual_private_servers/install_wordpress_docker_on_vps)”.

For some general tips on securing a GNU/Linux-based server, see our guides:

Expand Down
Loading