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

     

    访问页面

  • 相关阅读:
    C语言中结构体变量之间赋值
    ZOJ
    【微服务干货系列】使用微服务架构之前,你必须知道的
    使用heartbeat+monit实现主备双热备份系统
    rsync 3.1.1源代码编译安装配置
    oracle 11g GRID 中 关于 OLR 须要知道的一些内容
    字母游戏
    移动开发人员应避免的 4 大陷阱
    看看这个经常被0基础程序猿弄不懂的 “事件”
    【剑指offer】和为定值的连续正数序列
  • 原文地址:https://www.cnblogs.com/ada54410017/p/11201053.html
Copyright © 2011-2022 走看看