LoginSignup
6
5

More than 5 years have passed since last update.

concrete5.7 開発環境構築

Last updated at Posted at 2015-09-19

プラットフォーム

  • osx 10.10.5
  • virtualBox5.0.2
  • centos6.7

事前準備

以下のコンポーネントをインストール

  • apache2.2
  • mysql5.6
  • php5.3

以下を実施

  • iptables無効化
  • selinux無効化

apache2

httpd (2.2.15-47)
$ sudo yum install httpd
httpd-devel
$ sudo yum install httpd-devel

mysql5

まず、mysql関連のコンポーネントを調べる。
$ sudo yum list intalled | grep mysql
あれば削除する。
$ sudo yum erase mysql-libs

次にmysql5.6のrpmをダウンロードする。(http://downloads.mysql.com/archives/community/)
# wget http://downloads.mysql.com/archives/get/file/MySQL-client-5.6.25-1.linux_glibc2.5.x86_64.rpm
# wget http://downloads.mysql.com/archives/get/file/MySQL-server-5.6.25-1.linux_glibc2.5.x86_64.rpm
# wget http://downloads.mysql.com/archives/get/file/MySQL-shared-compat-5.6.25-1.linux_glibc2.5.x86_64.rpm
# wget http://downloads.mysql.com/archives/get/file/MySQL-devel-5.6.25-1.linux_glibc2.5.x86_64.rpm

それぞれインストールする。
# yum install MySQL-client-5.6.25-1.linux_glibc2.5.x86_64.rpm
# yum install MySQL-server-5.6.25-1.linux_glibc2.5.x86_64.rpm
# yum install MySQL-shared-compat-5.6.25-1.linux_glibc2.5.x86_64.rpm
# yum install MySQL-devel-5.6.25-1.linux_glibc2.5.x86_64.rpm

インストールを確認する。
# mysql --version

my.cnfを作成する。

/etc/my.cnf
[mysqld]

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
user = mysql
port = 3306
datadir = /var/lib/mysql
socket  = /var/lib/mysql/mysql.sock
symbolic-links=0
default-storage-engine = InnoDB
character-set-server = utf8
collation-server = utf8_general_ci

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

mysqlを起動する
# service mysql start

rootパスワードと初期設定
# mysql_secure_installation
初期パスワードは、~root/.mysql_secretを参照する。
基本的には、すべてY

mysqlにログインしてみる
# mysql -u root -p

databaseとユーザーを作成、権限を付与する。
mysql> create database concrete5;
Query OK, 1 row affected (0.00 sec)

mysql> create user 'concrete5'@'localhost' identified by 'concrete5';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON concrete5.* TO 'concrete5'@'localhost';
Query OK, 0 rows affected (0.00 sec)

php5.3

各コンポーネントをインストールする。
# yum install php
# yum install php-devel
# yum install php-mbstring
# yum install php-mysql
# yum install php-pear
# yum install php-gd
# yum install php-xml

インストールを確認する。
# php --version
PHP 5.3.3 (cli) (built: Jul 9 2015 17:39:00)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

concrete5をインストールする

concrete5のグループとユーザーを作成する。
# groupadd -g 5000 concrete5
# adduser -u 5000 -g 5000 -d /home/concrete5 -s /bin/bash concrete5

/home/concrete5 をapacheでread/write許可する
# chmod 777 /home/concrete5

concrete5を取得、展開する。
# cd /home/concrete5/system
# wget http://www.concrete5.org/download_file/-/view/81601/concrete5.7.5.1.zip
# unzip concrete5.7.1.zip

以下の3ディレクトリにapache(other)書込権限を付与する。
# chmod o+w concrete5.7.5.1/packages
# chmod o+w concrete5.7.5.1/application/config
# chmod o+w concrete5.7.5.1/application/files

httpd.confにて、DocumentRootを修正、index.phpを登録。

httpd.conf
DirectoryIndex index.php index.html

concrete5.7.5.1とphp5.3の組み合わせは問題があり、このままだとFatalが発生する。

error_log
[Sun Sep 06 12:26:41 2015] [error] [client 192.168.56.1] PHP Fatal error:  Can't inherit abstract function Concrete\\Core\\Asset\\AssetInterface::getAssetType() (previously declared abstract in Concrete\\Core\\Asset\\Asset) in /home/concrete5/system/concrete5.7.5.1/concrete/src/Asset/Asset.php on line 9

concrete5.7.5.1/concrete/src/Asset/Asset.php の 63行目をコメントアウトする。

Asset.php
 60     const ASSET_POSITION_HEADER = 'H';
 61     const ASSET_POSITION_FOOTER = 'F';
 62 
 63     // 20150906 mn 1 abstract public function getAssetType();
 64 
 65     public function getOutputAssetType()
 66     {
 67         return $this->getAssetType();
 68     }

concrete5を初期設定する

トップページにアクセスし、初期設定を行う。

6
5
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
6
5