Tag Archives: linux

Install PHP on CentOS 7

CentOS 7에 php 라이브러리 설치하기..

yum install php
yum install php-mysql
yum install php-gd
yum install php-pear
yum install php-pdo
yum install php-mbstring

vi /etc/php.ini
short_open_tag = On

<?php ?>만 허용하다가 <? ?>도 가능.

http://www.cyberciti.biz/faq/howto-install-linux-apache-mariadb-php-lamp-stack-on-centos7-rhel7/

Install MariaDB on CentOS 7

* mariadb install
– yum install mariadb
– yum install mariadb-server

* service regist
– chkconfig mariadb on

* Securing MariaDB
– /usr/bin/mysql_secure_installation
Remove anonymous users? Y
Disallow root login remotely? Y
Remove test database and access to it? Y
Reload Privileage tables now? Y

iptables에서 3306 열어주고 외부에서 접속시….
Host ‘xxx.xxx.xxx.xxx’ is not allowed to connect to this MariaDB server

mysql – uroot -p
MariaDB>use mysql
MariaDB [mysql]> grant all privileges on *.* to ‘mariadb루트계정’@’%’ identified by ‘비밀번호’;

외부에서 해당 계정에 대해 접근허용