LNMPA一键部署

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
云数据库 RDS MySQL,高可用系列 2核4GB
简介: 快速搭建lnma环境

可能很多人觉得搭建lamp环境很麻烦,需要一个一个包安装,今天来分享一下lamp/lnmp/lnmpa一键包

1.更新软件列表

sudo apt-get update

2.下载一键包

wget http://mirrors.linuxeye.com/lnmp-full.tar.gz

root@iZwz92sq8e1hle3inkc5jkZ:~# wget http://mirrors.linuxeye.com/lnmp-full.tar.gz 
--2020-11-05 11:18:03--  http://mirrors.linuxeye.com/lnmp-full.tar.gz             
Resolving mirrors.linuxeye.com (mirrors.linuxeye.com)... 1.81.5.176, 240e:bf:b800:
1900:5c96:6aff:fe34:9c41, 240e:bf:b800:1900:c826:31ff:fe15:c8bf, ...              
Connecting to mirrors.linuxeye.com (mirrors.linuxeye.com)|1.81.5.176|:80... connec
ted.                                                                              
HTTP request sent, awaiting response... 200 OK                                    
Length: 327299956 (312M) [application/octet-stream]                               
Saving to: ‘lnmp-full.tar.gz’                                                     
                                                                                  
lnmp-full.tar.gz      89%[=================>   ] 280.00M  9.06MB/s    eta 5s

3.解压一键包

tar xzf lnmp-full.tar.gz

4.进入目录

cd lnmp

5.执行安装脚本

sudo ./install.sh

6.接下来按照自己的需求选择就好,这里仅供参考

#######################################################################           
#       OneinStack for CentOS/RedHat 6+ Debian 8+ and Ubuntu 14+      #           
#       For more information please visit https://oneinstack.com      #           
#######################################################################           

Please input SSH port(Default: 22): 22                                            

Do you want to enable iptables? [y/n]: y                                          

Do you want to install Web server? [y/n]: y                                       

Please select Nginx server:                                                       
        1. Install Nginx                                                          
        2. Install Tengine                                                        
        3. Install OpenResty                                                      
        4. Do not install                                                         
Please input a number:(Default 1 press Enter) 1                                   

Please select Apache server:                                                      
        1. Install Apache-2.4                                                     
        2. Install Apache-2.2                                                     
        3. Do not install                                                         
Please input a number:(Default 3 press Enter) 1                                   

Please select Apache2.4 mode:                                                     
        3. Do not install                                                         
Please input a number:(Default 3 press Enter) 1                                   

Please select Apache2.4 mode:                                                     
        1. php-fpm                                                                
        2. mod_php                                                                
Please input a number:(Default 1 press Enter) 1                                   
        3. worker                                                                 
Please input a number:(Default 1 press Enter) 1                                   

Do you want to install Database? [y/n]: y                                         

Please select a version of the Database:                                          
         1. Install MySQL-8.0                                                     
         2. Install MySQL-5.7                                                     
         3. Install MySQL-5.6                                                     
         4. Install MySQL-5.5                                                     
         5. Install MariaDB-10.5                                                  
         6. Install MariaDB-10.4                                                  
         7. Install MariaDB-10.3                                                  
         8. Install MariaDB-5.5                                                   
         9. Install Percona-8.0                                                   
        10. Install Percona-5.7                                                   
        11. Install Percona-5.6                                                   
        12. Install Percona-5.5                                                   
        13. Install AliSQL-5.6                                                    
        14. Install PostgreSQL                                                    
        15. Install MongoDB                                                       
Please input a number:(Default 2 press Enter) 2                                   
Please input the root password of MySQL(default: KBh3NIzS): 123456                

Please choose installation of the database:                                       
        1. Install database from binary package.                                  
        2. Install database from source package.                                  
Please input a number:(Default 1 press Enter) 1                                   
 
Do you want to install PHP? [y/n]: y                                              
        1. Install database from binary package.                                  
        2. Install database from source package.                                  
Please input a number:(Default 1 press Enter) 1                                   

Do you want to install PHP? [y/n]: y
Please select a version of the PHP:                                               
        1. Install php-5.3                                                        
        2. Install php-5.4                                                        
        3. Install php-5.5                                                        
        4. Install php-5.6                                                        
        5. Install php-7.0                                                        
        6. Install php-7.1                                                        
        7. Install php-7.2                                                        
        8. Install php-7.3                                                        
        9. Install php-7.4                                                        
Please input a number:(Default 7 press Enter) 5                                   
                                                                                  
Do you want to install opcode cache of the PHP? [y/n]: y                          
Please select a opcode cache of the PHP:                                          
        1. Install Zend OPcache                                                   
        3. Install APCU                                                           
Please input a number:(Default 1 press Enter) y                                   
input error! Please only input number 1,3                                         
Please select a opcode cache of the PHP:                                          
        1. Install Zend OPcache                                                   
        3. Install APCU                                                           
Please input a number:(Default 1 press Enter) 1                                   
 
Please select PHP extensions:                                                     
         0. Do not install                                                        
         1. Install zendguardloader(PHP<=5.6)                                     
         2. Install ioncube                                                       
         3. Install sourceguardian(PHP<=7.2)                                      
         4. Install imagick                                                       
         5. Install gmagick                                                       
         6. Install fileinfo                                                      
         7. Install imap                                                          
         8. Install ldap                                                          
         9. Install phalcon(PHP>=5.5)                                             
        10. Install yaf(PHP>=7.0)                                                 
        11. Install redis                                                         
        12. Install memcached                                                     
        13. Install memcache                                                      
        14. Install mongodb                                                       
        15. Install swoole                                                        
        16. Install xdebug(PHP>=5.5)                                              
Please input numbers:(Default '4 11 12' press Enter) 3                            
 
Do you want to install Pure-FTPd? [y/n]: y                                        

Do you want to install phpMyAdmin? [y/n]: y                                       

Do you want to install redis-server? [y/n]: n                                     

Do you want to install memcached-server? [y/n]: n                                 

Do you want to install HHVM? [y/n]: n

7.选择完成之后就等待安装,安装时间有点常,耐心等待一下,安装完成之后输入y重启服务器即可

相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
2月前
|
监控 Ubuntu Linux
在Linux中,如何使用Pacemaker和Corosync?
在Linux中,如何使用Pacemaker和Corosync?
|
运维 负载均衡 关系型数据库
【运维知识进阶篇】用Ansible Roles重构LNMP架构(Linux+Nginx+Mariadb+PHP),实现4个项目一键部署
【运维知识进阶篇】用Ansible Roles重构LNMP架构(Linux+Nginx+Mariadb+PHP),实现4个项目一键部署
171 0
|
SQL 关系型数据库 MySQL
LAMP平台部署及应用
LAMP平台部署及应用
116 0
|
关系型数据库 MySQL PHP
部署LAMP平台(二)
部署LAMP平台(二)
部署LAMP平台(二)
|
存储 关系型数据库 MySQL
|
关系型数据库 应用服务中间件 Apache
|
关系型数据库 PHP 数据库