码迷,mamicode.com
首页 > 其他好文 > 详细

yum方式安装lnmp

时间:2018-10-20 16:15:42      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:http   ati   配置   htm   with   dmi   pen   pre   fas   

1、安装mysql
>>>yum -y install mariadb mariadb-server
给root用户设置密码
>>>mysqladmin -uroot password "pwd123"
>>>grant all privileges on *.* to ‘root‘@‘localhost‘ identified by ‘pwd123‘ with grant option;#高版本可能出现问题
>>>grant all privileges on *.* to "root"@"localhost" identified by "pwd123";


2、安装php
>>>yum -y install php php-fpm php-mysql php-gd
centos7.2不需要设置php.ini和php-fpm.conf

3、安装nginx
>>>yum -y install nginx
或者源码安装
>>>yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
>>>./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module --with-http_ssl_module


4、配置
nginx
location ~ \.php$ {
  root html/aaaa;
  fastcgi_pass 127.0.0.1:9000;
  fastcgi_index index.php;
  include fastcgi.conf;
}

yum方式安装lnmp

标签:http   ati   配置   htm   with   dmi   pen   pre   fas   

原文地址:https://www.cnblogs.com/linyouyi/p/9821556.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!