본문으로 건너뛰기

You're viewing documentation for a pre-release version. View the latest stable version

번역 없음

이 페이지는 아직 번역되지 않아 기본 언어로 표시됩니다.

Install on Linux#

To use Vapor, you will need Swift 6.4 or greater. It can be installed using the official installer Swiftly (recommended), or the toolchains available on Swift.org.

Supported Distributions and Versions#

Vapor supports the same versions of Linux distributions that Swift 6.4 or newer versions supports. Please refer to Swift.org in order to find updated information about which operating systems are officially supported.

Linux distributions not officially supported may also run Swift by compiling the source code, but Vapor cannot prove stability. Learn more about compiling Swift from the Swift repo.

Install Swift#

Visit the Swift website for instructions on how to install Swiftly and Swift on Linux. After that, install Swift with the following command:

$ swiftly install latest

Check the installed version with:

$ swift --version

Swift version 6.4.1 (swift-6.4.1-RELEASE)
Target: x86_64-unknown-linux-gnu

Manual installation with the toolchain#

Visit Swift.org’s Alternate Install Options guide for instructions on how to install Swift on Linux.

Docker#

You can also use Swift’s official Docker images which come with the compiler preinstalled. Learn more at Swift’s Docker Hub.

Install Toolbox#

Now that you have Swift installed, let’s install the Vapor Toolbox. This CLI tool is not required to use Vapor, but it helps to create new Vapor projects.

Homebrew#

The Toolbox is distributed via Homebrew. If you do not have Homebrew yet, visit brew.sh for install instructions.

brew install vapor

Double check to ensure that the installation was successful by printing help.

vapor --help

You should see a list of available commands.

Makefile#

If you want, you can also build the Toolbox from source. View the Toolbox’s releases on GitHub to find the latest version.

git clone https://github.com/vapor/toolbox.git
cd toolbox
git checkout <desired version>
make install

Double check the installation was successful by printing help.

vapor --help

You should see a list of available commands.

Next#

Now that you have installed Swift and the Vapor Toolbox, create your first app in Getting Started → Hello, world.