0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS7にconcrete5をインストール

Last updated at Posted at 2020-02-12

CentOS7の最小構成にLAMP環境とconcrete5バージョン8をインストールしてサンプルサイトを表示するまでの手順。

Apache

インストール

# yum install httpd
# systemctl enable httpd

設定

/etc/httpd/conf/httpd.conf
...
DocumentRoot "/var/www/html/<インストールディレクトリ>/public"
...

そのほかの設定はよしなに。

MariaDB

最新版をインストール

# curl https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash
# yum install mariadb-server
# systemctl enable mariadb

初期設定

/etc/my.cnf
[client]
...
default-character-set=utf8mb4
...
[mysql]
...
default-character-set=utf8mb4
...
[mysqld]
...
collation-server = utf8mb4_unicode_ci
init-connect='SET NAMES utf8mb4'
character-set-server = utf8mb4
...

そのほかの設定はよしなに。

# systemctl start mariadb
# mysql_secure_installation

ルートのパスワードを設定するなどよしなに。

データベースとユーザーの作成

# mysql -u root -p
create database <データベース名>;
grant all on <データベース名>.* to <ユーザー名>@localhost identified by '<パスワード>';

PHP

最新版(7.4)をインストール

# yum install epel-release yum-utils
# yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
# yum-config-manager --enable remi-php74
# yum install php php-gd php-pecl-zip php-mbstring php-mysql php-xml

設定

必要に応じてよしなに。

concrete5

インストール

# yum install patch unzip
# curl https://getcomposer.org/installer | php -- --install-dir /usr/bin --filename composer
# composer create-project -n concrete5/composer /var/www/html/<インストールディレクトリ>

初期設定

# cd /var/www/html/<インストールディレクトリ>
# ./vendor/bin/concrete5 c5:install -i

質問に答える。時間帯は日本なら JST 。デフォルト言語は日本語なら ja_JP

仕上げ

パーミッションとSELinux

# chown -R apache:apache /var/www/html/<インストールディレクトリ>
# restorecon -R /var/www/html/<インストールディレクトリ>
# setsebool -P httpd_can_network_connect_db 1
# setsebool -P httpd_unified 1

ファイアウォール

# firewall-cmd --permanent --add-service=http
# firewall-cmd --permanent --add-service=https
# firewall-cmd --reload

Apache 起動

# systemctl start httpd
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?