前にもやったが、記憶が曖昧になっているため、整理。
まずはphpのインストールから。
# yum install epel-release # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm # yum install --enablerepo=remi,remi-php70 php php-mbstring php-devel php-pdo php-gd php-mysqlnd
# nano /etc/php.ini
;;;;;;;;;;;;;;;;;;; ; Module Settings ; ;;;;;;;;;;;;;;;;;;; date.timezone = "Asia/Tokyo"
[mbstring] ; language for internal character representation. ; This affects mb_send_mail() and mbstring.detect_order. ; http://php.net/mbstring.language mbstring.language = Japanese ; Use of this INI entry is deprecated, use global internal_encoding instead. ; internal/script encoding. ; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) ; If empty, default_charset or internal_encoding or iconv.internal_encoding is $ ; The precedence is: default_charset < internal_encoding < iconv.internal_encod$ mbstring.internal_encoding = UTF-8 ; Use of this INI entry is deprecated, use global input_encoding instead. ; http input encoding. ; mbstring.encoding_traslation = On is needed to use this setting. ; If empty, default_charset or input_encoding or mbstring.input is used. ; The precedence is: default_charset < intput_encoding < mbsting.http_input ; http://php.net/mbstring.http-input mbstring.http_input = pass ; Use of this INI entry is deprecated, use global output_encoding instead. ; http output encoding. ; mb_output_handler must be registered as output buffer to function. ; If empty, default_charset or output_encoding or mbstring.http_output is used. ; The precedence is: default_charset < output_encoding < mbstring.http_output ; To use an output encoding conversion, mbstring's output handler must be set ; otherwise output encoding conversion cannot be performed. ; http://php.net/mbstring.http-output mbstring.http_output = pass ; enable automatic encoding translation according to ; mbstring.internal_encoding setting. Input chars are ; converted to internal encoding by setting this to On. ; Note: Do _not_ use automatic encoding translation for ; portable libs/applications. ; http://php.net/mbstring.encoding-translation mbstring.encoding_translation = Off ; automatic encoding detection order. ; "auto" detect order is changed according to mbstring.language ; http://php.net/mbstring.detect-order mbstring.detect_order = auto ; substitute_character used when character cannot be converted ; one from another ; http://php.net/mbstring.substitute-character mbstring.substitute_character = none; ; overload(replace) single byte functions by mbstring functions. ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), ; etc. Possible values are 0,1,2,4 or combination of them. ; For example, 7 for overload everything. ; 0: No overload ; 1: Overload mail() function ; 2: Overload str*() functions ; 4: Overload ereg*() functions ; http://php.net/mbstring.func-overload mbstring.func_overload = 0 ; enable strict encoding detection. ; Default: Off mbstring.strict_detection = Off ; This directive specifies the regex pattern of content types for which mb_outp$ ; is activated. ; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) mbstring.http_output_conv_mimetype=
# systemctl restart httpd
続いてMARIADBのインストール
# yum install mariadb mariadb-server # systemctl start mariadb.service # systemctl enable mariadb.service
# nano /etc/my.cnf
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd character-set-server=utf8 [mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid # # include all files from the config directory # !includedir /etc/my.cnf.d
# mysql_secure_installation
rootのパスワードを作成しておくのと、あとの質問はすべてデフォルトで(Y)
# /usr/bin/mysql -u root -p
パスは通しておいたほうが良い。起動できることを確認
最後にphpmyadminのインストール
# wget https://files.phpmyadmin.net/phpMyAdmin/4.8.2/phpMyAdmin-4.8.2-all-languages.zip # unzip phpMyAdmin-4.8.2-all-languages.zip # mv phpMyAdmin-4.8.2-all-languages /var/www/html/phpmyadmin # chown -R apache /var/www/html/phpmyadmin
これでIPアドレス/phpmyadminにアクセスすればOK