This repository contain a script that can be used to set up an environment for:
- web development, includes:
- virtual machine setup in VirtualBox 6.11 for development environment
- cloud setup in DigitalOcean and Hostwinds for testing and staging environment
- bare-metal (physical server) setup for production environment
- mail server, includes:
- set up a mail server in cloud
The virtual machine that will be used is VirtualBox.
- Download and install2 the guest OS.
- User Setup in the guest.
- Install VBox Guest in the guest.
- Download this project using the host.
- Enable the Shared Folders from host to guest, then copy the downloaded file and extract it.
- Run command
sudo ./setup.sh
and choose option1. Vbox (Desktop)
to initiate the setup, install the required applications, and end up the setup.
- Download and install3 the guest OS.
- User Setup in the guest.
- Fix Error in the guest.
- Clone this project and open the folder.
git clone https://github.com/ba1x/env-setup.git cd env-setup
- Run command
sudo ./setup.sh
and choose option2. Vbox (Server)
to initiate the setup, install the required applications, and end up the setup.
Make sure to add the SSH keys
in the Client Area before starting the setup below.
- Create a new droplet with the required specification and choose
SSH Keys
(that already added) for the Authentication. - Login to the server.
ssh root@SERVER_IP_ADDRESS # login using SSH
- Clone this project and open the folder.
git clone https://github.com/ba1x/env-setup.git cd env-setup
- Run command
./setup.sh
and choose option3. Cloud (DigitalOcean/Hostwinds)
to initiate the setup, install the required applications, and end up the setup.
-
Create an unmanage Linux VPS hosting with the required specification and choose
SSH Keys
(that already added) for the Authentication. -
Log in to the server using SSH:
ssh root@SERVER_IP_ADDRESS # login using SSH
-
Download and install the prerequisite apps (Git and UFW).
sudo apt update && sudo apt install git ufw -y
-
Clone this project and open the folder.
git clone https://github.com/ba1x/env-setup.git cd env-setup
-
Run command
./setup.sh
and choose option3. Cloud (DigitalOcean/Hostwinds)
to initiate the setup, install the required applications, and end up the setup.
- Download and install4 the OS.
- User Setup.
- (Optional) Proxy Setup.
- Clone this project and open the folder.
git clone https://github.com/ba1x/env-setup.git cd env-setup
- Run command
sudo ./setup.sh
and choose option4. Physical Server
to initiate the setup, install the required applications, and end up the setup.
Footnotes
-
Minimal Installation ↩
-
Partition for
10 GB
HDD/SSD and1 GB
RAM.
↩/ 7.0 GB ext4 /boot 500 MB ext4 /home 500 MB ext4 /var 1.0 GB ext4 SWAP 1.0 GB swap
-
Partition for
1 TB
HDD/SSD and8GB
RAM.
↩/ 240 GB ext4 /boot 2.5 GB ext4 /home 500 GB ext4 /srv 2.5 GB ext4 /usr 100 GB ext4 /var 20 GB ext4 /var/lib 50 GB ext4 SWAP 16 GB swap