zoukankan      html  css  js  c++  java
  • LNMP安装

    1. 环境准备

     

    1. 安装小工具

    安装lrzsz  拖入安装包  usr/local/src/目录

    [root@localhost src]# rpm -ivh nginx-1.8.0-1.el7.ngx.x86_64.rpm

     

    安装数据库

    [root@localhost src]# yum -y install mariadb mariadb-server

     

    安装mysql驱动

    [root@localhost src]# yum -y install php php-devel php-mysql

     

    安装php管理

    [root@localhost src]# rpm -ivh php-fpm-5.4.16-36.el7_1.x86_64.rpm

     

    1. 修改配置文件 备份一份

     

    [root@localhost src]# vim /etc/nginx/

    conf.d/         koi-utf         mime.types      scgi_params     win-utf         

    fastcgi_params  koi-win         nginx.conf      uwsgi_params    

    [root@localhost src]# cp /etc/nginx/nginx.conf  /etc/nginx/nginx.conf.bak

    [root@localhost src]# vim /etc/nginx/nginx.conf

    [root@localhost src]# cd /etc/nginx/conf.d/

    [root@localhost conf.d]# ls

    default.conf  example_ssl.conf

    [root@localhost conf.d]# vim default.conf

     

    修改配置文件

    [root@localhost conf.d]# vim default.conf

    [root@localhost conf.d]# cp default.conf  default.conf.bak

    [root@localhost conf.d]# vim default.conf

     

     

    重新启动

    进入mysql数据库

     

    安装unzip 解压文件

    Yum -y install unzip

    Unzip upload.zip -d /usr/share/nginx/html/

     

    [root@localhost src]# cd /usr/share/nginx/html/

    [root@localhost html]# ll

    [root@localhost html]# chmod -R 777 upload/

    [root@localhost html]# ll

    [root@localhost html]# systemctl restart php-fpm

    [root@localhost html]# systemctl restart nginx

    [root@localhost html]# systemctl restart mysql

    Failed to restart mysql.service: Unit mysql.service failed to load: No such file or directory.

    [root@localhost html]# systemctl restart mariadb

    [root@localhost html]# ip a

     

    访问页面

  • 相关阅读:
    笔记:Oracle查询重复数据并删除,只保留一条记录
    64位系统安装ODBC驱动的方法
    批量Excel数据导入Oracle数据库
    Oracle自我补充之Decode()函数使用介绍
    解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误
    Linux命令区
    Linux下安装PHP+Nginx+Msql
    Thinkphp时间转换与统计的问题
    phpStydy配置memcache扩展
    Thinkphp+Nginx(PHPstudy)下报的404错误,403错误解决
  • 原文地址:https://www.cnblogs.com/ada54410017/p/11201053.html
Copyright © 2011-2022 走看看