作者:王诗昀彦廷 | 来源:互联网 | 2014-05-29 08:43
这货是来自LEB的介绍。所以阿福仅仅只做翻译。当然前戏太长了。阿福只说一点点,那就是MariaDB这货是MySQL的替代品,说实话,当甲骨文收购sun的是MySQL就不在为那些技术们所推崇了,原作者再次搞出来一个叫MariaDB的玩意。好吧,其实阿福也不太熟悉这玩意。
这货是来自LEB的介绍。所以阿福仅仅只做翻译。当然前戏太长了。阿福只说一点点,那就是MariaDB这货是MySQL的替代品,说实话,当甲骨文收购sun的是MySQL就不在为那些技术们所推崇了,原作者再次搞出来一个叫MariaDB的玩意。好吧,其实阿福也不太熟悉这玩意。总之架构和MySQL差不多。
首先更新CentOS
yum update
然后,清楚不必要的组件如apache
yum erase httpd httpd-tools
然后安装nginx和php-fpm
yum install nginx php-fpm
找到下面的一段
# pass the PHP scripts to FastCGI server listening on
127.0.0.1:9000
#
#location ~ \.php$ {
#
root
html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME
/scripts$fastcgi_script_name;
#
include
fastcgi_params;
#}
修改为
# pass the PHP scripts to FastCGI server listening on
127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have “cgi.fix_pathinfo = 0;” in php.ini
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
下面安装MariaDB
先新建一个yum,vi /etc/yum.repos.d/MariaDB.repo
# MariaDB 5.5 CentOS repository list ? created 2013-12-27 07:29
UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-x86
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
然后
yum install MariaDB-server MariaDB-client php-mysql
然后/etc/init.d/php-fpm restart
然后搞定~