Sandstormは、Webアプリケーションとサーバー用の無料のオープンソースプラットフォームです。 Sandstormを使用して、WordPress、GitLab、MediaWiki、Apache Wave、RoundCubeWebメールなどの多くのアプリケーションをデプロイできます。サーバーにアプリをインストールして管理するのに役立つ、シンプルでユーザーフレンドリーなWebインターフェイスが付属しています。他のプラットフォームと比較して、Sandstormは、根本的に使いやすいようにゼロから設計されています。
この投稿では、CentOS8VPSにサンドストームをインストールする方法を紹介します。
前提条件
- Atlantic.Netクラウドプラットフォーム上の新しいCentOS8サーバー
- サーバーで構成されているrootパスワード
ステップ1-Atlantic.Netクラウドサーバーを作成する
まず、Atlantic.Netクラウドサーバーにログインします。 2GB以上のRAMを搭載したオペレーティングシステムとしてCentOS8を選択して、新しいサーバーを作成します。 SSH経由でクラウドサーバーに接続し、ページの上部で強調表示されているクレデンシャルを使用してログインします。
CentOS 8サーバーにログインしたら、次のコマンドを実行して、ベースシステムを最新の利用可能なパッケージで更新します。
dnf update -y
ステップ2–ホスト名を設定する
開始する前に、サーバーの完全修飾ホスト名を設定する必要があります。次のコマンドを使用して設定できます:
hostnamectl set-hostname sandstorm.example.com
完了したら、次のステップに進むことができます。
ステップ3–サンドストームをインストールする
Sandstormは、サーバーにSandstormを簡単にインストールできる自動インストールスクリプトを提供します。
次のコマンドを使用して、Sandstormインストールスクリプトをダウンロードできます。
curl https://install.sandstorm.io >install.sh
スクリプトがダウンロードされたら、ダウンロードしたスクリプトを実行してインストールを開始します。
bash install.sh
以下に示すように、インストールオプションを選択するように求められます。
Sandstorm makes it easy to run web apps on your own server. You can have: 1. A typical install, to use Sandstorm (press enter to accept this default) 2. A development server, for working on Sandstorm itself or localhost-based app development
Enterを押します デフォルトのオプションを選択します。次の出力が表示されます。
How are you going to use this Sandstorm install? [1] We're going to: * Install Sandstorm in /opt/sandstorm * Automatically keep Sandstorm up-to-date * Create a service user (sandstorm) that owns Sandstorm's files * Configure Sandstorm to start on system boot (with systemd) * Listen for inbound email on port 25. Rest assured that Sandstorm itself won't run as root. OK to continue? [yes]
Enterを押します 続ける。次の出力が表示されます。
NOTE: It looks like your system already has some other web server installed (port 80 and/or 443 are taken), so Sandstorm cannot act as your main web server. This script can set up Sandstorm to run on port 6080 instead, without HTTPS. This makes sense if you're OK with typing the port number into your browser whenever you access Sandstorm and you don't need security. This also makes sense if you are going to set up a reverse proxy; if so, see https://docs.sandstorm.io/en/latest/administering/reverse-proxy/ If you want, you can quit this script with Ctrl-C now, and go uninstall your other web server, and then run this script again. It is also OK to proceed if you want. OK to skip automatic HTTPS setup & bind to port 6080 instead? [yes]
Enterを押します サンドストームポートを6080にバインドする 。次の出力が表示されます。
Note: Sandstorm's storage will only be accessible to the group 'sandstorm'. As a Sandstorm user, you are invited to use a free Internet hostname as a subdomain of sandcats.io, a service operated by the Sandstorm development team. ... Sandcats.io protects your privacy and is subject to terms of use. By using it, you agree to the terms of service & privacy policy available here: https://sandcats.io/terms https://sandcats.io/privacy Choose your desired Sandcats subdomain (alphanumeric, max 20 characters). Type the word none to skip this step, or help for help. What *.sandcats.io subdomain would you like? [] none
noneと入力し、 Enterを押します 。インストールが完了すると、次の出力が表示されます。
URL users will enter in browser: [http://sandstorm.example.com:6080] Sandstorm requires you to set up a wildcard DNS entry pointing at the server. This allows Sandstorm to allocate new hosts on-the-fly for sandboxing purposes. Please enter a DNS hostname containing a '*' which maps to your server. For example, if you have mapped *.foo.example.com to your server, you could enter "*.foo.example.com". You can also specify that hosts should have a special prefix, like "ss-*.foo.example.com". Note that if your server's main page is served over SSL, the wildcard address must support SSL as well, which implies that you must have a wildcard certificate. For local-machine servers, we have mapped *.local.sandstorm.io to 127.0.0.1 for your convenience, so you can use "*.local.sandstorm.io" here. If you are serving off a non-standard port, you must include it here as well. Wildcard host: [*.sandstorm.example.com:6080] Your server is now online! Visit this link to start using it: http://sandstorm.example.com:6080/setup/token/7f7f36c9e39f738a69564622123be64b373141a5 NOTE: This URL expires in 15 minutes. You can generate a new setup URL by running 'sudo sandstorm admin-token' from the command line. To learn how to control the server, run: sandstorm help
この時点で、Sandstormがインストールされ、ポート6080でリッスンしています。次のコマンドで確認できます。
ss -antpl | grep 6080
次のページが表示されます:
LISTEN 0 128 0.0.0.0:6080 0.0.0.0:* users:(("sandstorm/gtway",pid=28336,fd=7),("sandstorm/montr",pid=28265,fd=7),("sandstorm/top",pid=28262,fd=7))
ステップ4– SandstormWebUIにアクセスする
次に、Webブラウザーを開き、URL http://sandstorm.example.com:6080/setup/token/7f7f36c9e39f738a69564622123be64b373141a5を使用してサンドストームにアクセスします。 。次のページにリダイレクトされます:
サンドストーム設定の開始をクリックします 。次のページが表示されます:
Eメールを選択し、構成をクリックします。 ボタン。次のページが表示されます。
有効をクリックします 。次のページが表示されます。
メールサーバードメインを指定し、保存して続行をクリックします。 ボタン。次のページが表示されます。
SMTPホスト、ポート、ユーザー名、パスワードを入力し、[保存して続行 ボタン。次のページが表示されます:
今すぐスキップをクリックします 。次のページが表示されます:
メールアドレスを入力して、[ログインメールを送信]をクリックします。ログイン資格情報が記載されたメールが届きます。これらの資格情報を使用して、Sandstormサーバーにログインできます。
結論
おめでとう!これで、CentOS8VPSにSandstormが正常にインストールされました。 Sandstormは、開発者にとって非常に便利なツールです。ワンクリックでアプリをデプロイするのに役立ちます。 Sandstormの詳細とドキュメントについては、ドキュメントにアクセスしてください。