博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubuntu搭建lnmp+Yaf+Redis环境
阅读量:6201 次
发布时间:2019-06-21

本文共 3154 字,大约阅读时间需要 10 分钟。

hot3.png

1. 更换镜像源

    deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

    deb http://mirrors.aliyuncs.com/ubuntu/ trusty main restricted universe multiverse

    deb http://mirrors.aliyuncs.com/ubuntu/ trusty-security main restricted universe multiverse

    deb http://mirrors.aliyuncs.com/ubuntu/ trusty-updates main restricted universe multiverse

    deb http://mirrors.aliyuncs.com/ubuntu/ trusty-proposed main restricted universe multiverse

    deb http://mirrors.aliyuncs.com/ubuntu/ trusty-backports main restricted universe multiverse

    deb-src http://mirrors.aliyuncs.com/ubuntu/ trusty main restricted universe multiverse

    deb-src http://mirrors.aliyuncs.com/ubuntu/ trusty-security main restricted universe multiverse

    deb-src http://mirrors.aliyuncs.com/ubuntu/ trusty-updates main restricted universe multiverse

    deb-src http://mirrors.aliyuncs.com/ubuntu/ trusty-proposed main restricted universe multiverse

    deb-src http://mirrors.aliyuncs.com/ubuntu/ trusty-backports main restricted universe multiverse

2. apt-get install openssh-server

3. apt-get install nginx

4. /etc/init.d/nginx start

5. apt-get install php5-cli php5-cgi mysql-server php5-mysql php5-fpm php5-curl php5-redis php5-xdebug php5-xmlrpc php5-mcrypt php5-dev

6.  vim /etc/mysql/my.cnf

    (1). 在[mysqld]下添加 default-character-set=utf8(mysql 5.5 版本添加character-set-server=utf8)

    (2). 在[client]下添加 default-character-set=utf8

7. vim /etc/php5/fpm/pool.d

    ;listen = /var/run/php5-fpm.sock

    listen = 127.0.0.1:9000

8. /etc/init.d/nginx restart /etc/init.d/php5-fpm restart

9. nginx php 配置文件

    server {

        listen 80;

        server_name localhost;

        charset utf-8;

        root    /home/tangxiaolong/kiwi/public;

        location / {

            index   index.htm index.html index.php;

            if (!-f $request_filename){

                rewrite (.*) /index.php;

            }

        }

        location ~ \.php$ {

            fastcgi_pass   127.0.0.1:9000;

            fastcgi_index  index.php;

            include  fastcgi_params;

        }

        access_log /var/log/nginx/access.log;

        error_log  /var/log/nginx/error.log;

    }

10. yaf 安装

    (1). phpize

         echo "export LC_ALL=C" >> /root/.bashrc

         source /root/.bashrc

         phpize

         ./configure --with-php-config=/usr/bin/php-config

    (2). make

    (3). make install

    (4). cli/fpm    ln -s ../../mods-available/yaf.ini ./20-yaf.ini

11. redis

    (1). wget http://download.redis.io/redis-stable.tar.gz

    (2). make && make install

    (3). redis-server /etc/redis.conf

转载于:https://my.oschina.net/tpythoner/blog/536856

你可能感兴趣的文章
JSP版LCX:端口转发神器 KPortTran
查看>>
解决提交数据的乱码
查看>>
2013年第45周三专注行动放弃小问题纠结
查看>>
黄聪:利用iframe实现ajax 跨域通信的解决方案(转)
查看>>
未来的学习
查看>>
批处理--批量打开程序&批量关闭程序
查看>>
七窍通五脏:心气足则味觉灵 肺燥热则鼻孔干 身体流出 5种 液体对应五脏
查看>>
页面跳转并提示的解决方案
查看>>
TextFlow with JavaFX 2
查看>>
K8 系统中省市县数据表的设计可以反映出什么? 通过一个基础业务表的设计品味软件系统的整体架构...
查看>>
Winform开发框架之简易工作流设计
查看>>
[转]CodeIgniter与Zend Acl结合实现轻量级权限控制
查看>>
Java 技术新手入门
查看>>
js基础
查看>>
HDUOJ-----2571跳舞毯
查看>>
返璞归真 asp.net mvc (7) - asp.net mvc 3.0 新特性之 Controller
查看>>
微信公众平台开发之在网页上添加分享到朋友圈,关注微信号等按钮
查看>>
HDUOJ---4503 湫湫系列故事——植树节
查看>>
【敏捷开发】Android团队开发规范
查看>>
Android开机启动Activity或者Service方法
查看>>