LNMP官方网站:http://lnmp.org

http://oneinstack.com/install/

 

安装详细介绍:http://lnmp.org/install.html

1,安装LNMP执行:

wget -c http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gz && tar zxf lnmp1.2-full.tar.gz && cd lnmp1.2-full && ./install.sh lnmp
wget -c http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gz && tar zxf lnmp1.2-full.tar.gz && cd lnmp1.2-full && ./install.sh lnmpa

如需要安装LNMPA或LAMP,将./install.sh 后面的参数替换为lnmpa或lamp即可。

全自动安装过程,无需人工干预,下载完成自动编译安装,以下几项需要选择:

+------------------------------------------------------------------------+
| LNMP V1.2 for CentOS Linux Server, Written by Licess                     |
+------------------------------------------------------------------------+
| A tool to auto-compile & install LNMP/LNMPA/LAMP on Linux   |
+------------------------------------------------------------------------+
| For more information please visit http://www.lnmp.org                  |
+------------------------------------------------------------------------+
Please setup root password of MySQL.(Default password: root)
Please enter: root    --这是MYSQL密码 
MySQL root password: root
===========================
Do you want to enable or disable the InnoDB Storage Engine?
Default enable,Enter your choice [Y/n]: y
You will enable the InnoDB Storage Engine
===========================
You have 5 options for your DataBase install.
1: Install MySQL 5.1.73
2: Install MySQL 5.5.42 (Default)
3: Install MySQL 5.6.23
4: Install MariaDB 5.5.42
5: Install MariaDB 10.0.17
Enter your choice (1, 2, 3, 4 or 5): 3
You will Install MySQL 5.6.23
===========================
You have 5 options for your PHP install.
1: Install PHP 5.2.17
2: Install PHP 5.3.29
3: Install PHP 5.4.41 (Default)
4: Install PHP 5.5.25
5: Install PHP 5.6.9
Enter your choice (1, 2, 3, 4 or 5): 5
You will install PHP 5.6.9
===========================
You have 3 options for your Memory Allocator install.
1: Don't install Memory Allocator. (Default)
2: Install Jemalloc
3: Install TCMalloc
Enter your choice (1, 2 or 3): 1
You will install not install Memory Allocator.

Press any key to install...or Press Ctrl+c to cancel    ----到这儿按任意键开始安装 ,整个过程大约一两小时

Install lnmp V1.2 completed! enjoy it.
--最后出现这一句,就是安装成功了。

注意:安装成功后,用SFTP就可直接用ROOT连接。

2,安装站点管理:

http://lnmp.org/faq/lnmp-vhost-add-howto.html

主要命令:

lnmp vhost add     --添加站点
lnmp vhost list      --列出所有站点
lnmp vhost del     --删除站点
LNMP 1.2下需要执行:chattr -i /网站目录/.user.ini 后才能删除网站目录。

3,安全设置:上传网站后建议执行:

chown www:www -R /path/to/dir     #对网站目录进行权限设置,/path/to/dir替换为你网站目录。

4,限制部分不需要执行PHP的目录:

vi /usr/local/nginx/conf/vhost/网站名.conf

location ~ /(js|upload)/.*\.(php|php5)?$ {
deny all;
}

location ~ /.*\.(php|php5)?$ {
deny all;
}

LNMP安装及配置的更多相关文章

  1. LNMP安装与配置之CentOS7的安装。

    LNMP与LAMP是我们常见的两种网站服务器架构.LNMP代表的就是Linux系统下Nginx+MySQL+PHP/Python,LAMP代表的则是Linux系统下Apache+MySQL+PHP/P ...

  2. lnmp 安装 访问 配置 laravel

    环境要求 Lnmp 一键安装包安装 php7.2+ Mysql 5.7 Innodb 开启 第一步 上传项目到 /home/wwwroot/default/ 或者composer命令行安装larave ...

  3. LNMP安装与配置之MySQL

    MySQL 是最流行的关系型数据库管理系统之一,今天的安装是在CentOS7环境下进行安装,安装的版本是MySQL5.7,有需要别的版本可点击  官网. 一.安装 1.配置YUM源 # 下载mysql ...

  4. LNMP安装与配置

    Nginx与apache.lighttp性能综合对比,如下图:                           注意:关闭rpm默认安装的apache和mysql 1.准备php函数的rpm包 y ...

  5. LNMP安装与配置之Nginx

    Nginx简介 Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器,同时也提供了IMAP/POP3/SMTP服务.Nginx是由伊戈尔·赛索耶夫为俄罗斯访问量第二的Ramb ...

  6. LNMP安装与配置之Python3

    环境 我们是在CentOS7下安装python3,但CentOS已经默认安装了Python2,而 Yum 等工具依赖原来的Python2.所以我们需要稍作配置让Python2与Python3可以共存. ...

  7. CentOS安装与配置LNMP

    本文PDF文档下载:http://www.coderblog.cn/doc/Install_and_config_LNMP_under_CentOS.pdf 本文EPUB文档下载:http://www ...

  8. LNMP安装Let’s Encrypt 免费SSL证书方法:自动安装与手动配置Nginx

    前几天介绍了最新StartSSL免费SSL申请与配置,很多人看到部落介绍SSL证书安装时总是推荐了OneinStack,因为OneinStack提供了一键添加和配置Let's Encrypt 免费SS ...

  9. CentOS 7上源码编译安装和配置LNMP Web+phpMyAdmin服务器环境

    CentOS 7上源码编译安装和配置LNMP Web+phpMyAdmin服务器环境 什么是LNMP? LNMP(别名LEMP)是指由Linux, Nginx, MySQL/MariaDB, PHP/ ...

随机推荐

  1. (4.14)存储:RAID在数据库存储上的应用

    关键词:(4.14)存储:RAID在数据库存储上的应用 转自:http://blog.51cto.com/qianzhang/1251260 随着单块磁盘在数据安全.性能.容量上呈现出的局限,磁盘阵列 ...

  2. IDEA 跑spring项目找不到get,set的问题

    @Autowired的用法和作用 这个注解就是spring可以自动帮你把bean里面引用的对象的setter/getter方法省略,它会自动帮你set/get. iDEA下安装lombok这个插件就可 ...

  3. Python基础-configparser和hashlib模块

    configparser模块 import configparser config = configparser.ConfigParser() #将配置写入到文件 config[', 'Compres ...

  4. CoreThink主题开发(九)使用H-ui开发博客主题之用户个人主页

    感谢H-ui.感谢CoreThink!  效果图: 这里使用table布局 /Theme/Blog/User/Index/home.html <extend name="$_home_ ...

  5. 内置函数(Day16)

    现在python一共为我们提供了68个内置函数.它们就是python提供给你直接可以拿来使用的所有函数     内置函数     abs() divmod() input() open() stati ...

  6. [转]c#中从string数组转换到int数组

    string[] input = { "1", "2", "3", "4", "5", " ...

  7. 协程(Coroutines)实现fibonacci函数

    def fibonacci(): yield 1 yield 1 l=[1,1] while True: l=[l[-1],sum(l[-2:])] yield l[-1] def tribonacc ...

  8. C++ IPv4与IPv6的兼容编码(转,出自http://blog.csdn.net/ligt0610/article/details/18667595)

    这里不再对IPv6 socket相关编程的基础知识进行讲解,只提供一个IP协议无关的服务端和客户端的代码,仅供参考. 服务端代码: #include <iostream> #include ...

  9. INDEL的重新比对和碱基质量分数的重新校准

    1.为什么要做这两步(why): indel的重新比对:这是由于比对软件的自身限制,其可能将包括indel的read解释为snp的read,这就导致calling的错误和后面的碱基质量分数的重新校准. ...

  10. MySQL-LRU_List Free_List Flush_List

    关于 LRU_List ,Free_List,Flush_List的介绍:   LRU算法:(Latest Recent Used)最近最少使用      数据库的缓冲池通过LRU算法来进行管理.   ...