Ubuntu 14.04 搭建 lnmp环境
2017-03-24 10:14
239 查看
1 php
安装
2 nginx
安装
配置
3 mysql
安装版本
安装
php5.4--php5.6版本
$ sudo apt-get install python-software-properties $ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:ondrej/php $ sudo apt-get update $ sudo apt-get -y install php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip php5.6-xml php5.6-fpm
2 nginx
安装
nginx
$ sudo apt-get install nginx
配置
nginx的
fpm配置
`location ~ \.php$ { try_files $uri $uri/ =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php5.6-fpm.sock; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }`
3 mysql
安装版本
mysql5.7(5.5不支持
utf8bom字符编码)
$ wget http://dev.mysql.com/get/mysql-apt-config_0.8.0-1_all.deb[/code]
安装deb包$ dpkg -i mysql-apt-config_0.8.0-1_all.debapt更新 ,安装$ sudo apt-get update $ sudo apt-get install mysql-server
4 创建用户组,新用户
创建用户组groupadd super
在super用户组下创建用户useradd -g super leon
修改leon用户密码passwd leon Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
修改新用户的shell类型 和sudo权限,修改/etc/sudoers文件su //获取su权限 chmod u +x /etc/sudoers //修改为可写 //添加一个 super 用户组的人 可以在任何主机上 运行 root的身份 运行所有命令 % super ALL=(ROOT) ALL
发现新用户leon无法使用shell命令,打开/etc/passwd修改用户 使用的shell类型sudo usermod -s shell类型 用户名 sudo usermod -s /bin/bash leon
相关文章推荐
- 在Ubuntu 14.04上搭建LNMP环境
- Debian 7/Ubuntu14.04 LNMP环境搭建
- 阿里云 线上 ubuntu 14.04环境搭建 lnmp
- Ubuntu 14.04 LNMP源码编译环境搭建 Nginx-1.9.1 PHP-5.6.9 Mariadb-10.0.19 完整教程
- 如何在ubuntu 14.04中搭建LNMP环境
- LEMP(LNMP)环境搭建(ubuntu16.04(ubuntu14.04)+nginx+mysql5.7+php7.1)
- Ubuntu 14.04 LNMP 环境搭建
- Ubuntu 搭建LNMP环境图文教程 配置nginx支持PHP
- ubuntu13.04 搭建 Nginx + PHP + PHP-FPM + Mysql (lnmp) 环境
- Ubuntu 14.04 Android 环境搭建错误解决(adb)
- Ubuntu 14.04 64bit上安装LNMP环境
- Ubuntu14.04 android开发环境搭建
- ubuntu14.04上搭建android开发环境
- Ubuntu 14.04 LTS下安装 LNMP环境
- Ubuntu 14.04中搭建开发环境
- ubuntu通过apt-get方式搭建lnmp环境以及php扩展安装
- thinkpad X240 安装Ubuntu14.04 系统并搭建android开发环境
- Ubuntu安装nginx php5-fpm mysql (lnmp环境搭建)