這個腳本是使用shell編寫,爲了快速在生產環境上部署lnmp/lamp/lnmpa(Linux、Nginx/Tengine/OpenResty、MySQL/MariaDB/Percona、PHP),適用於CentOS 6~7(包括redhat)、Debian 6~8、Ubuntu 12~16的32位和64位。
腳本特性
- 持續不斷更新
- 源碼編譯安裝,大多數源碼是最新stable版,並從官方網址下載
- 提供多個數據庫版本(MySQL-5.7, MySQL-5.6, MySQL-5.5, MariaDB-10.1, MariaDB-10.0, MariaDB-5.5, Percona-5.6, Percona-5.5, AliSQL-5.6, PostgreSQL, MongoDB)
- 提供多個PHP版本(PHP-7.1, PHP-7.0,PHP-5.6, PHP-5.5,PHP-5.4,PHP-5.3)
- 提供Nginx、Tengine、OpenResty
- 提供多個Apache版本(Apache-2.4,Apache-2.2)
- 根據自己需求安裝PHP緩存加速器,提供ZendOPcache、xcache、apcu、eAccelerator。及php加解密工具ionCube、ZendGuardLoader、swoole、xdebug、Composer
- 根據自己需求安裝Pureftpd、phpMyAdmin
- 根據自己需求安裝memcached、redis
- jemalloc優化MySQL、Nginx
- 提供添加、刪除虛擬主機腳本
- 提供Nginx/Tengine/OpenResty/Apache、MySQL/MariaDB/Percona、PHP、Redis、phpMyAdmin升級腳本
- 提供本地、遠程(服務器之間rsync)、阿里雲OSS、騰訊雲COS和upyun備份
- 提供CentOS 6、7下HHVM安裝
安裝步驟
- yum -y install wget screen curl python#for CentOS/Redhat
- #apt-get -y install wget screen curl python# for Debian/Ubuntu
- wget http://aliyun-oss.linuxeye.com/lnmp-full.tar.gz #阿里雲經典網絡內網下載
- wget http://mirrors.linuxeye.com/lnmp-full.tar.gz # 包含源碼,國內外均可下載
- wget http://mirrors.linuxeye.com/lnmp.tar.gz # 不包含源碼,建議僅國外主機下載
- tar xzf lnmp-full.tar.gz
- #tar xzf lnmp.tar.gz
- cd lnmp # 如果需要修改目錄(安裝、數據存儲、Nginx日誌),請修改options.conf文件
- screen -S lnmp # 如果網路出現中斷,可以執行命令`screen -R lnmp`重新連接安裝窗口
- ./install.sh # 請勿sh install.sh或者bash install.sh這樣執行
感謝原文博主分享,在此做一個記錄,原文地址:https://blog.linuxeye.cn/31.html