GithubHelp home page GithubHelp logo

zhouqunic / lnmp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maicong/lnmp

0.0 1.0 0.0 612 KB

Support: Nginx 1.12/1.13 + MySQL 5.5/5.6/5.7/8.0(MariaDB 5.5/10.0/10.1/10.2/10.3) + PHP 5.4/5.5/5.6/7.0/7.1/7.2 + phpMyAdmin(Adminer)

License: MIT License

PHP 13.95% Shell 86.05%

lnmp's Introduction

CentOS 7 安装 LNMP 环境

可供安装的版本

yum 源方式:

Nginx 1.12/1.13
MySQL 5.5/5.6/5.7/8.0
MariaDB 5.5/10.0/10.1/10.2/10.3
PHP 5.4/5.5/5.6/7.0/7.1/7.2
phpMyAdmin
Adminer

源码编译方式:

OpenSSL 1.1.0f
Nginx 1.13.7
PHP 7.2.0

安装

使用 yum 源安装:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/maicong/LNMP/master/lnmp.sh)"

使用源码编译安装:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/maicong/LNMP/master/source.sh)"

使用

服务管理

# MySQL
systemctl {start,stop,status,restart} mysqld.service

# MariaDB
systemctl {start,stop,status,restart} mariadb.service

# PHP
systemctl {start,stop,status,restart} php-fpm.service

# Nginx
systemctl {start,stop,status,restart,reload} nginx.service

站点管理

# 列表
service vhost list

# 启动(重启)、停止
service vhost {start,stop} [<domain>]

# 新增、编辑
service vhost {add, edit} [<domain>] [<server_name>] [<index_name>] [<rewrite_file>] [<host_subdirectory>]

# 删除
service vhost del [<domain>]

参数说明

  • start 启动、重启
  • stop 停止
  • add 新增
  • edit 编辑
  • del 删除
  • <domain> 站点标识,默认:domain
  • <server_name> 域名列表,使用 , 隔开,默认:domain.com,www.domain.com
  • <index_name> 首页文件,依次生效,默认:index.html,index.htm,index.php
  • <rewrite_file> 伪静态规则文件,保存在 /etc/nginx/rewrite/,默认:nomal.conf
  • <host_subdirectory> 是否支持子目录绑定,on 或者 off,默认 off

示例

# 启动或重启所有站点
service vhost start

# 停止所有站点
service vhost stop

# 列出所有站点
service vhost list

# 添加一个标识为 `mysite`,域名为 `mysite.com` 的站点
service vhost add mysite mysite.com

# 启动或重启标识为 `mysite` 的站点
service vhost start mysite

# 停止标识为 `mysite` 的站点
service vhost stop mysite

# 编辑标识为 `mysite` 的站点
service vhost edit mysite

# 删除标识为 `mysite` 的站点
service vhost del mysite

备份

# 新建一个备份
service vbackup start

# 删除一个备份
service vbackup del [<file>.tar.gz]

# 列出所有备份
service vbackup list

协议

The MIT License (MIT)

lnmp's People

Contributors

maicong avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.