This script, dev_env_setup.sh
, automates the process of setting up a development environment on a Linux system. It installs and configures various tools and services, including Nginx, PHP, Composer, NVM(node version manager), and Supervisor.
Here's a brief overview of what the script does:
- Updates the system's package lists and upgrades all installed packages.
- Installs essential development tools like git, curl, cron, vim & unzip.
- Installs and configures multiple versions(7.4, 8.2, 8.3) of PHP.
- Installs and configures Composer.
- Installs and configures NVM and Node.js(16.18, 20.10).
- Installs and configures Nginx.
- Generates an SSL certificate for localhost.
- Installs and configures Supervisor.
- Cleans up unnecessary packages.
To use this script, you need to have bash
installed on your system.
Edit hosts file
- Windows: C:\Windows\System32\drivers\etc\hosts
- macOS and Linux: /etc/hosts
127.0.0.1 api.domain.test
127.0.0.1 domain.test
Make sure to give the script execute permissions before running it:
chmod +x dev_env_setup.sh
You can run the script with the following command:
./dev_env_setup.sh