CENTOS 6 YUM APM INSTALL ( apache / php / mysql )
1 2 3 |
Server version: Apache/2.2.15 (Unix) PHP 5.4.45 (cli) (built: Feb 18 2017 15:55:26) mysql Ver 14.14 Distrib 5.5.58, for Linux (x86_64) using readline 5.1 |
1. yum 을 이용하여 설치 remi repository
1 2 |
[root@localhost ~]# yum install epel-release [root@localhost ~]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
2. install apache / mysql / php
1 2 3 4 |
[root@localhost ~]# yum --enablerepo=remi install httpd mysql mysql-server php php-common [root@localhost ~]# yum --enablerepo=remi install php-mysqlnd php-pgsql php-pecl-mongo \ php-pdo php-pecl-memcache php-pecl-memcached php-gd php-xml php-mbstring php-mcrypt php-pecl-apcu php-cli php-pear |
3. 시스템서비스 등록
1 2 3 4 5 6 7 |
[root@localhost ~]# chkconfig --levels 235 httpd on [root@localhost ~]# chkconfig --levels 235 mysqld on [root@localhost ~]# /etc/rc.d/init.d/httpd start [root@localhost ~]# /etc/rc.d/init.d/mysqld start |
4. 확인
1 2 3 4 5 6 7 |
[root@localhost ~]# vi /var/www/html <? phpinfo(); ?> |
5. 웹페이지 확인
6. mysql utf8 설정
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@localhost ~]# vi /etc/my.cnf [client] default-character-set = utf8 [mysql] default-character-set=utf8 [mysqld] character-set-server=utf8 collation-server=utf8_general_ci init_connect=SET collation_connection = utf8_general_ci init_connect=SET NAMES utf8 character-set-client-handshake = FALSE skip-character-set-client-handshake [root@localhost ~]# /etc/rc.d/init.d/mysqld restart |