Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental:配布用zipの生成スクリプトとそのサンプル #127

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add sample deploy document.
uzulla committed Sep 14, 2020
commit a3f2f48d75aee07b241ab25e4a992c791b5857d8
48 changes: 48 additions & 0 deletions app/docs/DEPLOY_ubuntu20.04.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Ubuntu 20.04 最短構築

## 初期Linux設定
```
$ sudo su
# apt -y update && apt -y upgrade && shutdown -r now

$ sudo su
# ufw allow 22
# ufw allow 80
# ufw allow 443
# ufw enable
# ufw status
# timedatectl set-timezone Asia/Tokyo
# apt -y install apache2 php-mysql php-mbstring php-gd php-curl php-intl php-zip mysql-server php7.4 unzip
# apt -y install language-pack-ja-base language-pack-ja
# locale -a
(ja_JP.UTF-8の確認)
```

## mysql
```
$ sudo mysql_secure_installation
> create user 'fc2blog'@'localhost' identified by 'topsecretpasswordforyoursafe';
> grant all on fc2blog.* to 'fc2blog'@'localhost' with grant option;
> flush privileges;
> exit
```

## deploy
```
$ cd
$ wget http://github.com/..../fc2blog-dist-XXX.zip (例
$ unzip fc2blog-dist-XXX.zip
$ sudo su
# cp -a fc2blog-dist-XXX/* /var/www
# cp fc2blog-dist-XXX/app/resource/apache/100-fc2blog.conf /etc/apache2/sites-available/
# vi /etc/apache2/sites-available/100-fc2blog.conf
# a2dissite 000-default.conf
# a2ensite 100-fc2blog.conf
# a2enmod rewrite
# systemctl restart apache2

# cp /var/www/app/config.sample.php /var/www/app/config.php
# vi /var/www/app/config.php
```

`http://{ホスト}/install.php` を開く
18 changes: 18 additions & 0 deletions app/docs/apache/.htaccess.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## ログ設定
### エラーを画面に表示する、可能ならば本番時はコメントアウト推奨
#php_value display_errors on
#php_value display_startup_errors On
#php_value error_reporting -1
### エラーをログする、本番時も有効化推奨
php_value log_errors On

## mod_rewirte 設定、通常修正不要
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]

RewriteRule . index.php [L]

14 changes: 14 additions & 0 deletions app/docs/apache/100-fc2blog.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<VirtualHost *:80>
ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/public

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /var/www/public>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>