apacahe, mysql, php순으로 APM 설치
yum -y install httpd
yum -y install mysql mysql-server mysql-connector-odbc mysql-devel
yum -y install php
관련 라이브러리 설치
yum -y install gd gd-devel
yum -y install libpng libpng-devel
yum -y install libjpeg libjpeg-devel
yum -y install freetype freetype-develps
yum -y install fontconfig fontconfig-devel
yum -y install libxml2 libxml2-devel
yum -y install openssl openssl-devel
yum -y install gmp gmp-devel
yum -y install mhash mhash-devel
yum -y install libmcrypt libmcrypt-devel
yum -y install php-mysql
yum -y install php-pear
yum -y install php-gd
yum -y install php-imap
yum -y install php-ldap
yum -y install php-xmlrpc
yum -y install php-xml
yum -y install php-odbc
yum -y install php-mbstring
yum -y install php-mhash
mysql 의 my.cnf 설정
# cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
#vi /etc/my.cnf
[mysqld]
datadir = /home/myhome/mysql/data //mysql 저장 디렉토리를 별도로 둘경우
mysql 자동실행 설정 (또는 ntsysv)
# chkconfig --list | grep mysqld
mysqld 0:해제 1:해제 2:활성 3:활성 4:활성 5:활성 6:해제
위와 같이 나오지 않는다면?
# chkconfig --level 2345 mysqld on
mysql실행 및 비밀번호 변경
/etc/rc.d/init.d/mysqld start
/usr/bin/mysqladmin -uroot password
비밀번호변경
# mysql -u root -p
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
mysql> use mysql;
Database changed
mysql> update user set password=password('ok112158') where user='root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> quit