EC-CUBEをCentOS6.4にインストールした際の備忘

準備物
AMI:ami-9ffa709e
  CentOS-6.4-x86_64-GA-EBS-9ededd96-9ff7-4ba1-ae15-2c99f7e93990-ami-d79bf0be.1
  aws-marketplaceのCentOS release 6.4 (Final)

初期セットアップはしてあります→こちらに備忘があります

必要なパッケージをインストール
# yum -y install httpd php php-gd freetype-devel php-mbstring php-xml libcurl-devel php-mcrypt  mysql-server
Complete!
# yum -y install mysql-server php-mysql
Complete!

phpの設定ファイルのタイムゾーンを変更する
# vi /etc/php.ini
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
;date.timezone =Asia/Tokyo

EC-CUBE本体をダウンロードする 正式版(Ver2.12.5) (最終更新日:2013年6月26日)
# wget http://downloads.ec-cube.net/src/eccube-2.12.5.tar.gz
-bash: wget: command not found

いつもインストールされている気でいる
# yum- -y install wget
Complete!
# yum -y install wgetwget http://downloads.ec-cube.net/src/eccube-2.12.5.tar.gz
–2013-06-29 06:41:09–  http://downloads.ec-cube.net/src/eccube-2.12.5.tar.gz
Resolving downloads.ec-cube.net… 112.78.219.13
Connecting to downloads.ec-cube.net|112.78.219.13|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 10134746 (9.7M) [application/x-gzip]
Saving to: `eccube-2.12.5.tar.gz’

EC-CUBEのファイルを展開する
# tar zxvf eccube-2.12.5.tar.gz
# ll
total 9904
drwxr-xr-x. 7 root root     4096 2013-06-25 09:53 eccube-2.12.5
-rw-r–r–. 1 root root 10134746 2013-06-25 09:53 eccube-2.12.5.tar.gz

MySQLを起動させる
# /etc/init.d/mysqld start
Initializing MySQL database:  Installing MySQL system tables…
OK
Filling help tables…
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password ‘new-password’
/usr/bin/mysqladmin -u root -h ip-10-146-75-216 password ‘new-password’

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

[  OK  ]

Starting mysqld:  [  OK  ]

MySQLの初期インストールを実行する
# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we’ll need the current
password for the root user.  If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 … Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]
 … Success!

Normally, root should only be allowed to connect from ‘localhost’.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]
 … Success!

By default, MySQL comes with a database named ‘test’ that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]
 – Dropping test database…
 … Success!
 – Removing privileges on test database…
 … Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]
 … Success!

Cleaning up…

All done!  If you’ve completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

試しにMySQLへログインしてみる
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 10
Server version: 5.1.69 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.

EC-CUBE用のデータベースを作成する
mysql> CREATE DATABASE eccube DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ERROR 1115 (42000): Unknown character set: ‘utf8a’
mysql> CREATE DATABASE eccube DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on eccube.* to eccube@localhost identified by ‘kou
mysql> grant all on eccube.* to eccube@localhost identified by ‘eccubeeccube’;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

EC-CUBEのhtmlファイルをWWW配下にコピーし、オーナーと権限を変更
# cp -r eccube-2.12.5/html/* /var/www/html/
# chown -R apsache:apache /var/www/html/
# find /var/www/html -type d | xargs chmod 775

EC-CUBEのdataファイルをWWW配下にコピーし、オーナーと権限を変更
# cp -r eccube-2.12.5/data/ /var/www/
# chown -R apache:apache /var/www/data
# find /var/www/data/ -type d | xargs chmod 775

MySQLとhttpdの自動起動を設定する
# chkconfig mysqld on
# chkconfig httpd on

後は、AWSのパブリックDNS名でアクセスしてウィザードの設定すればEC-CUBUが表示されます

シェアする

  • このエントリーをはてなブックマークに追加

フォローする

adana escort adıyaman escort afyon escort ağrı escort aksaray escort amasya escort ankara escort antalya escort ardahan escort artvin escort aydın escort balıkesir escort bartın escort batman escort bayburt escort bilecik escort bingöl escort bitlis escort bolu escort burdur escort bursa escort çanakkale escort çankırı escort çorum escort denizli escort diyarbakır escort düzce escort edirne escort elazığ escort erzincan escort erzurum escort eskişehir escort gaziantep escort gebze escort giresun escort gümüşhane escort hakkari escort hatay escort ığdır escort ısparta escort istanbul escort izmir escort izmit escort kahramanmaraş escort karabük escort karaman escort kars escort kastamonu escort kayseri escort kilis escort kırıkkale escort kırklareli escort kırşehir escort kocaeli escort konya escort kütahya escort malatya escort manisa escort mardin escort mersin escort muğla escort muş escort nevşehir escort niğde escort ordu escort osmaniye escort rize escort sakarya escort samsun escort şanlıurfa escort siirt escort sinop escort şırnak escort sivas escort tekirdağ escort tokat escort trabzon escort tunceli escort uşak escort van escort yalova escort yozgat escort zonguldak escort marmaris escort bodrum escort alanya escort side escort konyaaltı escort muratpaşa escort manavgat escort çeşme escort sincan escort çankaya escort keçiören escort mamak escort etimesgut escort buca escort konak escort karabağlar escort bornova escort karşıyaka escort bayraklı escort alsancak escort ataşehir escort pendik escort maltepe escort kartal escort kadıköy escort görükle escort atakum escort ayvalık escort deutsche escort berlin escort düsseldorf escort hamburg escort münchen escort stuttgart escort berlin escort düsseldorf escort hamburg escort münchen escort stuttgart escort deutsche escort köln escort ataşehir escort avcılar escort bağcılar escort bahçelievler escort bakırköy escort başakşehir escort bayrampaşa escort bebek escort beşiktaş escort beykoz escort beylikdüzü escort beyoğlu escort çatalca escort çekmeköy escort esenler escort esenyut escort fatih escort gaziosmanpaşa escort güngören escort kadıköy escort kağıthane escort kartal escort küçükcekmece escort maltepe escort pendik escort sancaktepe escort sarıyer escort şile escort silivri escort şişli escort sultanbeyli escort sultangazi escort taksim escort tuzla escort ümraniye escort üsküdar escort zeytinburnu escort manavgat escort