日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > 数据库 >内容正文

数据库

ubuntu搭建lnmp+Yaf+Redis环境

發(fā)布時(shí)間:2023/12/31 数据库 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ubuntu搭建lnmp+Yaf+Redis环境 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

2019獨(dú)角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>

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





轉(zhuǎn)載于:https://my.oschina.net/tpythoner/blog/536856

總結(jié)

以上是生活随笔為你收集整理的ubuntu搭建lnmp+Yaf+Redis环境的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。