阿里云LNMP服务器简易安装配置
来源:互联网 发布:网络水晶头哪个牌子好 编辑:程序博客网 时间:2024/06/06 03:18
环境:Centos7.x+PHP7.0+Nginx+Mysql连接驱动
- 安装nginx
- yum install -y nginx
- 启动、开启自启动
- systemctl start nginx
- systemctl enable nginx
- cd /etc/nginx/conf.d
- vi www.xxx.com.conf
- server {
listen 80;
server_name www.xxx.com;
root /home/wwwdata/www.xxx.com/frontend/web;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}
- service nginx restart
- cd /home/wwwdata/www.xxx.com/frontend/web
- vi test.html:xxx
- 访问网站http://www.xxx.com/test.html,如可访问,则nginx安装运行正常
- 安装PHP7、MySQL及扩展
- rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
- yum install -y php70w-fpm
- 启动、开机自启动
- systemctl start php-fpm
- systemctl enable php-fpm
- 安装 PHP 扩展(此处可以yum search php70w看看需要哪些扩展)
- yum install php70w-cli php70w-gd php70w-mysqlnd php70w-pdo php70w-mcrypt php70w-mbstring php70w-json php70w-opcache php70w-xml php70w-intl php70w-pecl-apcu php70w-devel -y
- 重新加载php-fpm:systemctl reload php-fpm
- session问题:
- session.save_path = "/tmp"无效,注意上面一行的注释(; for php-fpm, see /etc/php-fpm.d/*conf)
- vi /etc/php-fpm.d/www.conf找到
- php_value[session.save_path] = /var/lib/php/session
- php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache
- cd /var/lib/php/
- mkdir session wsdlcache
- chmod -R 777 .
- 重启nginx: service nginx restart
- 重启php-fpm: service php-fpm restart
- 压力测试
- wget http://www.ha97.com/code/webbench-1.5.tar.gz
- tar zxvf webbench-1.5.tar.gz
- cd webbench-1.5
- yum install -y ctags
- mkdir /usr/local/man
- make && make install
- webbench -c 1000 -t 60 http://www.xxx.com
0 0
- 阿里云LNMP服务器简易安装配置
- 阿里云CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL)
- 阿里云CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL)
- 【阿里云服务器】LAMP或LNMP一键安装教程
- 阿里云 lnmp 一键安装包配置路径
- 阿里云 Centos 7安装PHP7 配置LNMP
- 在阿里云ubuntu14.04下安装配置lnmp环境
- centos7 配置lnmp环境 阿里云 php多版本安装
- 阿里云 LNMP 环境配置
- 阿里云 LNMP 环境配置
- 阿里云ubuntu16 lnmp配置
- 阿里云 LNMP 环境配置
- 阿里云centos 安装lnmp
- 云服务器安装LNMP
- 阿里云服务器 lnmp搭建有感
- 腾讯云服务器配置LNMP环境并安装wordpress
- 阿里云服务器下安装配置phpMyAdmin
- 阿里云服务器安装配置mysql数据库
- java URL 抓取搜索引擎搜到的词条数
- Java中主要Map类概述
- 获取Bootcamp 6 下载地址(mac装win10)
- Win8/Win8.1/Win10下Vivado例化MIG报错的解决办法
- 应用增加推送功能
- 阿里云LNMP服务器简易安装配置
- Bootstrap学习三--布局组件
- 自定义下拉能露出背景的RelativeLayout(FrameLayout)之想朋友圈那样下拉能露出背景的功能
- POJ 1082 Calendar Game 已翻译
- 最详细的Hexo Next主题配置教程
- js函数的调用者和所有者
- C socket通信
- 码农成长记——js的开端
- 帝国cms添加新模型