https://github.com/czbone/oneliner-env
Build server environment by one-liner command
https://github.com/czbone/oneliner-env
ansible-role centos lemp mariadb mysql nginx php
Last synced: 6 months ago
JSON representation
Build server environment by one-liner command
- Host: GitHub
- URL: https://github.com/czbone/oneliner-env
- Owner: czbone
- License: mit
- Created: 2018-12-05T00:42:04.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-02T08:11:20.000Z (over 3 years ago)
- Last Synced: 2025-04-12T06:51:36.066Z (6 months ago)
- Topics: ansible-role, centos, lemp, mariadb, mysql, nginx, php
- Language: Shell
- Homepage:
- Size: 229 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 1行で環境構築
サーバに`root`ログインし1行のコマンドを実行するだけで環境構築できるスクリプトです。
必要なソフトウェアがすべて納まり、連携動作も取れている1台のサーバ環境を作ります。
環境構築は難しい、たいへん時間がかかるという問題を即座に解決します。このプロジェクトは、正確に動作するごく標準的な環境を構築するのを目的としています。
それ以上の環境が必要な場合は、出来た環境からさらに独自のカスタマイズを行うのがベターです。## 対象OS
- CentOS Stream 8CentOS 8の場合はStream 8へ移行してください。
## ライセンス
[](https://lbesson.mit-license.org/)
# 内容
ローカルにAnsibleをインストールし、Ansible GalaxyのPlaybookを基本に少しカスタマイズして環境構築しています。
次の特色があります。- 最新のソフトウェア環境
- 日本語最適化# 使い方
新規にOSをインストールしたサーバに`root`でログインし、以下の1行のコマンドをそのままコピーして実行します。
## Webサーバ(LEMP)環境構築 (所要時間: 約10分)
Linux(L),Nginx(N),MariaDB(M),PHP(P)のLEMP環境を作成します。### バージョン
- Nginx 1.21.x
- PHP 8.1.x
- MariaDB 10.7.x### 実行コマンド
```
curl https://raw.githubusercontent.com/czbone/oneliner-env/master/script/build_lemp.sh | bash
```# 動作チェック
環境構築後、WebブラウザでURLにアクセスし、簡単に動作チェックを行います。「localhost」部分は環境に合わせて変更してください。
phpinfoが表示されます。
```
http://localhost/index.php
```テスト用DBに日本語文字列を登録し再表示させます。文字化けせずに日本語が表示されていればOKです。
```
http://localhost/index2.php
```# 検証環境
- Vagrant Box: centos/stream8# 依存関係
以下のAnsibleロールが含まれています。
- nginxinc.nginx(公式ロール)
- MariaDB role(https://github.com/czbone/ansible-role-mariadb )
- geerlingguy.repo-remi
- geerlingguy.ntp
- geerlingguy.php-versions
- geerlingguy.php
- geerlingguy.php-mysql