zoukankan      html  css  js  c++  java
  • Nginx-php-mysql


     1.依赖包

    yum -y install pcre* openssl*
    2.php
    rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
    yum install php56w php56w-cli php56w-common php56w-devel php56w-pear php56w-gd php56w-mbstring php56w-mysql php56w-xml php56w-bcmath php56w-ldap php56w-fpm
    service php-fpm start (启动fpm模块)
    3.mysql
    查看自己得数据库版本
    yum list installed | grep mysql
    删除自己得老版本数据库
    yum remove mysql* -y
    添加新得数据库下载
    rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
    安装数据库和vim编译器
    yum -y install mysql-server mysql vim
    配置my.cnf文件 (InnoDB引擎默认为开启)
    vim /etc/my.cnf
    [mysqld]
    innodb_file_per_table=1
    启动数据库
    service mysqld start
    修改数据库默认用户密码以及匿名登录
    mysql_secure_installation
    4.nginx
    安装
    wget http://nginx.org/download/nginx-1.13.5.tar.gz
    tar zxvf nginx-1.13.5.tar.gz
    cd nginx-1,13,5
    ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre
    make && make install
    启动、关闭、重置
    /usr/local/nginx/sbin/nginx (启动)
    /usr/local/nginx/sbin/nginx -s stop (关闭)
    /usr/local/nginx/sbin/nginx -s reload(重置)
    echo "/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf/" >> /etc/rc.local
    vi etc/nginx.conf
    server {
    listen 80;
    server_name localhost;
    autoindex on;
    #charset koi8-r;
    #access_log /var/log/nginx/log/host.access.log main;

    location / {
    root html;
    index index.html index.htm index.php;
    }

    location ~ .php$ {
    root html;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
    include fastcgi_params;
    }..

    网页:http://ip/访问即可


  • 相关阅读:
    css3 rotate(1turn)的用法
    canvas svg webgl threejs d3js 的区别
    利用css3给座右铭设置漂亮的渐变色
    svg相关的知识
    Mark标记功能的实现(像手工标记的一样)
    终于搞清楚了正向代理与反向代理的区别
    获取免费ip_存入excel_用了线程池_封装清晰
    爬去京东——智能音箱
    滑动验证码
    天气爬取的笔记
  • 原文地址:https://www.cnblogs.com/wazy/p/7717420.html
Copyright © 2011-2022 走看看