----- 주의: 삽질 기록이니 따라하지 마세요 ------
Vapor 다시 시도해보겠다.
일단 새마음 새뜻으로 vm 새로 만들어서 Swfit 설치까지 하겠다.
이전에 했던 Swift 까는 방법은
sudo apt-get update
wget https://swift.org/builds/swift-5.2.5-release/ubuntu1804/swift-5.2.5-RELEASE/swift-5.2.5-RELEASE-ubuntu18.04.tar.gz
tar xzf swift-5.2.5-RELEASE-ubuntu18.04.tar.gz
sudo mv swift-5.2.5-RELEASE-ubuntu18.04 /usr/share/swift
echo "export PATH=/usr/share/swift/usr/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
이제 우분투에 Swift 설치하는건 외우겠다.
# Vapor 위한 스크립트 다운로드
eval "$(curl -sL https://apt.vapor.sh)"
이게 안된단 말이다 하 답답하네 진짜
다른 방법으로 하겠다.
# Vapor toolbox
https://docs.vapor.codes/4.0/install/linux/
Vapor: Install → Linux
Install on Linux To use Vapor, you will need Swift 5.2 or greater. This can be installed using the toolchains available on Swift.org Supported Distributions and Versions Vapor supports the same versions of Linux distributions that Swift 5.2 or newer versio
docs.vapor.codes
git clone https://github.com/vapor/toolbox.git
cd toolbox
git checkout <desired version>
swift build -c release --disable-sandbox --enable-test-discovery
mv .build/release/vapor /usr/local/bin
오래걸렸지만 다 깔렸다.
# vapor 프로젝트 init
vapor new demo
vapor build
처음 빌드하면 겁나 오래 걸린다.
한 30분 넘게 기다리고있는 것 같다.
vapor run serve
localhost 에서 실행은 되는데 동작이 안된다.
방화벽 설정까지 다했는데..?
# 일단 이 vapor 가 깔렸는데 접속 문제인것 같다.
postgresql 이랑 supervisor 랑 nginx 설치하자
sudo apt-get install supervisor postgresql nginx
일단 다음에 더 공부해서 다시 시도
https://dev.to/leogdion/a-vapor-guide-setup-and-deployment-with-heroku-and-ubuntu-49jn
A Vapor Guide-Setup and Deployment with Heroku and Ubuntu
In this article I am going to cover how to get started: setting up your Mac for Vapor development, how to integrate with a database like PostgreSQL, deploy to Heroku as well as Ubuntu.
dev.to
다음글
GCP - 무료 Vapor 서버 만들기 - Ubuntu+Swift(3)
----- 이번 포스팅에서는 Hello World 성공했습니다. ------ 저번 포스팅까지 한것 GCP 무료 인스턴스 생성 (Ubuntu18.04) Ubuntu Swift5 환경 구축 Swift 컴파일되는거 확인 Vapor 프레임워크 설치 Vapor Build..
haningya.tistory.com
'Server > Vapor - Server_Side_Swift' 카테고리의 다른 글
Vapor 서버 만들기 - Ubuntu+Swift+Vapor+Github+Supervisor(5) (0) | 2020.08.16 |
---|---|
Vapor 서버 만들기 - Ubuntu+Swift+Vapor+Github(4) (0) | 2020.08.16 |
GCP - 피땀흘린 서버 인스턴스 이미지로 백업하기 (0) | 2020.08.16 |
GCP - 무료 Vapor 서버 만들기 - Ubuntu+Swift+Vapor(3) (0) | 2020.08.15 |
GCP - 무료 Vapor 서버 만들기 - Ubuntu+Swift(1) (2) | 2020.08.14 |
댓글