Skip to content

FlyEnv Quick Start Guide

Table of Contents

Installation

macOS

Install via Homebrew

zsh
brew update && brew install flyenv

Download and Install

ArchitectureFileGitHub ReleaseBaidu Netdisk
Intel X86_64{version}.dmgDownloadDownload
Apple Silicon{version}-arm64.dmgDownloadDownload

Note: If you only need a simple PHP and web server, you can try FlyEnv's derivative product: FlyPHPServer, available on the Mac App Store.

Windows

Download and Install

Currently, only x86_64 architecture is supported.

ArchitectureFileGitHub ReleaseBaidu Netdisk
X86_64{version}-Windows.zipDownloadDownload

Linux

Download and Install

Supports Debian / Ubuntu / Red Hat / Fedora / SUSE / CentOS systems, x86_64 and arm64 architectures.

ArchitectureFileGitHub ReleaseBaidu Netdisk
Debian/Ubuntu x86_64{version}_amd64.debDownloadDownload
Red Hat/Fedora/SUSE/CentOS x86_64{version}.x86_64.rpmDownloadDownload
Debian/Ubuntu arm64{version}_arm64.debDownloadDownload
Red Hat/Fedora/SUSE/CentOS arm64{version}.aarch64.rpmDownloadDownload

Pre-Launch Preparation

macOS

FlyEnv relies on Homebrew or Macports to manage services. Ensure you have one of the following tools installed:

For Chinese users: You can refer to HomebrewCN for installation.

Linux

It is recommended to install Homebrew to ensure the latest versions of services are used:

Getting Started

Notes

Before using FlyEnv, it is recommended to close other applications that may use the same ports (e.g., Apache/Nginx/MySQL) to avoid port conflicts.

Interface Setup

After opening FlyEnv, all functional modules are displayed on the left by default. You can hide unnecessary modules in the settings.

Interface Setup

Interface Setup

For example, if you are only doing PHP development, you can display only Apache, PHP, MySQL, and Redis modules.

PHP Development Interface Setup Example

Module Initialization

FlyEnv modules do not come with preset versions. Users need to select and install the required versions themselves. FlyEnv automatically detects modules installed via Homebrew or Macports.

  1. On the module version interface, select and install the required version. Install Required Version
  2. After installation, the installed version will be displayed on the module service interface. Installed Version
  3. You can also add a custom module version path. Add Custom Module Version Path

Module Service Launch

There are two ways to launch module services:

  1. Launch a Single Module: On the module service interface, select the version and click the launch button. Launch Single Module
  2. Launch All Modules: Click the "Launch All Modules" switch to start all displayed modules. Launch All Modules
  • You can set whether modules should launch together in the GroupStart column on the service interface. GroupStart

If a module fails to launch, you can check the failure reason in the module logs. Module Service Launch Logs

Adding a Site

On the site interface, create a new site and configure the domain, SSL, etc. After the web server is launched, click the site link to access it.

Add Site

Site List

Notes:

  1. It is recommended to close web servers not launched by FlyEnv (e.g., Apache/Nginx/Caddy) to avoid port conflicts.
  2. Ensure the correct PHP version for the site is launched.
  3. If DNS software is used, it may prevent the domain from resolving correctly to 127.0.0.1.

Setting Environment Variables

FlyEnv supports one-click environment variable setup:

  • macOS: Adds export PATH="xxx:$PATH" to the ~/.zshrc file.
  • Windows: Adds the path to the system environment variables.

Set Environment Variables

You can also set aliases for different PHP versions (e.g., php82, php83) for easier use in the terminal.

Set Aliases

Set Aliases

After setup, if the terminal does not reflect the changes, restart the terminal.

Upgrading FlyEnv

FlyEnv has a built-in auto-upgrade feature. If the upgrade fails, manually download and install the latest version.

Note: FlyEnv's program files and data files are separate, so upgrading will not cause data loss.

Uninstallation

Use the system's default uninstallation method to uninstall FlyEnv. Data folders will not be deleted unless a third-party tool (e.g., CleanMyMac) is used and the data folder is selected.

Data Folder Locations

  • macOS: ~/Library/PhpWebStudy
  • Windows: Located in the same directory as the FlyEnv installation folder, named PhpWebStudy-Data.
  • Linux: ~/.config/PhpWebStudy

Frequently Asked Questions (FAQ)

Q: What should I do if a module fails to launch?

  • A: Check if other applications are using the same ports (e.g., 80, 3306) and close them. The module logs will also contain error details.

Q: What should I do if a site is inaccessible?

  • A: Ensure the web server is launched. For PHP sites, ensure the correct PHP version is launched. Some frameworks require specific PHP extensions, so make sure they are installed. If non-standard ports (e.g., not 80 or 443) are used, include the port number when accessing the site.

Q: How to access a site using IP + port?

  • A: Set an alias for the site. For example, 127.0.0.1, 192.168.1.101. Then specify the port. For different sites, do not use the same port. Otherwise, you may access the wrong site.

Community and Support

By following these steps, you can quickly get started with FlyEnv and configure your development environment as needed.