tail -f /var/www/html/eccube/data/logs/site.log
vi /var/www/html/eccube/data/config/config.php ---- define ('HTTP_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/eccube/html/'); define ('HTTPS_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/eccube/html/'); define ('ROOT_URLPATH', '/'); // DocumentRootを変更する場合 ----
<?php define ('ECCUBE_INSTALL', 'ON'); define ('HTTP_URL', 'http://www.example.com/eccube/html/'); define ('HTTPS_URL', 'http://www.example.com/eccube/html/'); define ('ROOT_URLPATH', '/eccube/html/'); define ('DOMAIN_NAME', ''); define ('DB_TYPE', 'mysql'); define ('DB_USER', 'eccube_db_user'); define ('DB_PASSWORD', ''); define ('DB_SERVER', '127.0.0.1'); define ('DB_NAME', 'eccube_db'); define ('DB_PORT', ''); define ('ADMIN_DIR', 'admin/'); define ('ADMIN_FORCE_SSL', FALSE); define ('ADMIN_ALLOW_HOSTS', 'a:0:{}'); define ('AUTH_MAGIC', 'wrouhaevechomaprioweciakichiovouweslioja'); define ('PASSWORD_HASH_ALGOS', 'sha256');
sudo su - cd /tmp yum install httpd php php-mbstring php-gd php-mysql mysql mysql-server chkconfig httpd on chkconfig mysqld on # 時計を日本に yes | cp -f /usr/share/zoneinfo/Japan /etc/localtime cat > /etc/sysconfig/clock << 'EOS' ZONE="Asia/Tokyo" UTC=false ARC=false EOS ntpdate ntp.nict.jp; hwclock --systohc; # apache 文字化け防止と、ディレクトリインデックスを止める vi /etc/httpd/conf/httpd.conf ---- AddDefaultCharset UTF-8 <Directory "/var/www/html"> ... Options -Indexes FollowSymLinks ---- # php utf-8を使用可能に vi /etc/php.ini ---- output_handler = mb_output_handler auto_detect_line_endings = Off date.timezone = "Asia/Tokyo" mbstring.language = Japanese mbstring.internal_encoding = UTF-8 mbstring.encoding_translation = On mbstring.detect_order = auto mbstring.http_input = pass mbstring.http_output = pass mbstring.substitute_character = none; ---- service httpd restart # DB作成 vi /etc/my.cnf ---- [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 skip-character-set-client-handshake character-set-server=utf8 default-table-type=InnoDB [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [mysql] default-character-set=utf8 prompt="\u@\h[\d]> " auto-rehash [client] default-character-set=utf8 [mysqldump] default-character-set=utf8 max_allowed_packet=16M ---- service mysqld restart mkpasswd -s 0 > ~/.mysql-eccube_db cat ~/.mysql-eccube_db DBパスワード mysql -u root mysql use mysql; set password for root@localhost=password(''); grant SELECT,INSERT,DELETE,UPDATE,CREATE,DROP,FILE,ALTER,INDEX,CREATE ROUTINE,CREATE VIEW,LOCK TABLES ON *.* TO 'eccube_db_user'@'%' IDENTIFIED BY 'DBパスワード'; DELETE FROM mysql.user WHERE user=''; CREATE DATABASE eccube_db CHARACTER SET utf8; FLUSH PRIVILEGES; exit # 接続テスト mysql -u eccube_db_user -p`cat ~/.mysql-eccube_db` eccube_db exit # ec-cubeインストール cd /tmp wget http://downloads.ec-cube.net/src/eccube-2.11.5.tar.gz tar xvfz eccube-2.11.5.tar.gz mv eccube-2.11.5 /var/www/html/eccube chown -R apache:apache /var/www/html/eccube # ブラウザからインストーラへアクセス http://www.example.com/eccube/html/install # データベースの設定 # DBの種類:MySQL # DBサーバ:127.0.0.1 # ポート: # DB名:eccube_db # DBユーザ:eccube_db_user # DBパスワード:******** # 全て成功ならインストールスクリプトを削除 rm /var/www/html/eccube/html/install/index.php # / にアクセスされたら /eccube/html/にリダイレクト cat > /var/www/html/index.php << 'EOS' <?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://". $_SERVER['HTTP_HOST'] . "/eccube/html/"); EOS # ドメインが不定のAWSの場合、stop > startでアクセスできなくなるので一部変更 vi /var/www/html/eccube/data/config/config.php ---- define ('HTTP_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/eccube/html/'); define ('HTTPS_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/eccube/html/'); ----