• Stars
    star
    748
  • Rank 60,661 (Top 2 %)
  • Language
    Shell
  • Created about 8 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A shell script for setting up Laravel Production environment on Ubuntu 14.04 & Ubuntu 16 & Ubuntu 18 system.

group

简介

适用于 Ubuntu 16.04 / 18.04 / 20.04 的 LNMP 安装脚本,并设置了国内镜像加速。

请确保所有命令都以 root 账户执行,如果登录账户不是 root,则需要执行 sudo -H -s 切换为 root 账户后再下载安装。

注:下文将使用 {version} 来替代你选中的系统,如 16.04 / 18.04 / 20.04。

软件列表

  • Git
  • PHP 7.4
  • Nginx
  • MySQL
  • Sqlite3
  • Composer
  • Nodejs 10
  • Yarn
  • Redis
  • Beanstalkd
  • Memcached

可选软件列表

以下软件需手动执行安装脚本:

  • Elasticsearch:./{version}/install_elasticsearch.sh,默认为 6.x,如果要安装 7.x 则执行 ./{version}/install_elasticsearch.sh 7

安装

Ubuntu 16.04

wget -qO- https://raw.githubusercontent.com/summerblue/laravel-ubuntu-init/master/download.16.04.sh - | bash

Ubuntu 18.04

wget -qO- https://raw.githubusercontent.com/summerblue/laravel-ubuntu-init/master/download.18.04.sh - | bash

Ubuntu 20.04

wget -qO- https://raw.githubusercontent.com/summerblue/laravel-ubuntu-init/master/download.20.04.sh - | bash

特别说明

此脚本会将安装脚本下载到当前用户的 Home 目录下的 laravel-ubuntu-init 目录并自动执行安装脚本。

安装结束之后会在屏幕上输出 Mysql root 账号的密码,请妥善保存。

如果当前不是 root 账户则不会自动安装,需要切换到 root 账户后执行 ./{version}/install.sh

日常使用

1. 新增 Nginx 站点

./{version}/nginx_add_site.sh

会提示输入站点名称(只能是英文、数字、-_)、域名(多个域名用空格隔开),确认无误后会创建对应的 Nginx 配置并重启 Nginx。

2. 新增 Mysql 用户、数据库

./{version}/mysql_add_user.sh

会提示输入 root 密码,如果错误将无法继续。输入需要创建的 Mysql 用户名,以及确认是否需要创建对应用户名的数据库。

创建完毕之后会将新用户的密码输出到屏幕上,请妥善保存。

3. 以 www-data 身份执行命令

本项目提供了一个 sudowwwalias,当需要以 www-data 用户身份执行命令时(如 git clone 项目php artisan config:cache 等),可以直接在命令前加上 sudowww,同时在原命令两端加上单引号,如:

sudowww 'php artisan config:cache'

More Repositories

1

laravel-shop

Laravel 电商实战教程的项目代码
PHP
2,443
star
2

phphub5

PHPHub Ver 5 is a Forum project Powered by Laravel 5.1, and it is also the project build up PHP & Laravel China community (此项目已弃用)
PHP
1,946
star
3

phphub

(Deprecated See - https://github.com/summerblue/phphub5 ) PHPHub is a Forum project written in Laravel 4.2, and it is also the project build up PHP & Laravel China community - http://phphub.org.
PHP
1,814
star
4

larabbs

A forum project base on Laravel
HTML
1,066
star
5

laravel-package-top-100

对 Packagist 上打了 Laravel 标签 的扩展包进行整理,截止到现在 2016 年 8 月 9号,有超过 7176 个扩展包,以下是下载量最大的 100 个。
PHP
993
star
6

laravel5-cheatsheet

A quick reference guide (cheat sheet) for Laravel 5.1 LTS, listing artisan, composer, routes and other useful bits of information.
PHP
786
star
7

psr.phphub.org

PSR 中文翻译
CSS
390
star
8

news.laravel-china.org

Source Code of the https://news.laravel-china.org/ website, build on top of Laravel 5.1. Laravel 资讯网站源代码,使用 Laravel 5.1 构建
PHP
365
star
9

generator

Laravel 5.3+ Scaffold Generator, Support both bootstrap and Semantic UI
PHP
334
star
10

gohub

Gohub,以论坛 API 为主题,设计的初衷是将其打造为高性能、功能齐全的 API 框架。基于 gin, cobra, viper, zap, gorm, redis, mysql, sqlite, email, jwt
Go
327
star
11

administrator

a fork from Frozennode/Administrator
CSS
290
star
12

phphub-ui

Product planing and UI Design for PHPHub App and Web site.
278
star
13

laravel-blog

Laravel-Blog is a blog application written in Laravel 4.2.
JavaScript
191
star
14

goblog

Goblog 是一个基于 Go 标准库构建的博客系统。此项目非常适合作为 Go 新手的第一个上手项目。
Go
186
star
15

laravel-tutorial

Laravel 中文新手书籍《Laravel 入门教程》的源代码
PHP
145
star
16

laravel-tutorial-sample

PHP
137
star
17

weibo

Laravel 中文新手课程《L01 Laravel 教程 - Web 开发实战入门》的源代码
PHP
105
star
18

github-toc

Chrome Extension allows to show you a "table of content" generated by Github project README or WIKI.
JavaScript
66
star
19

larabbs-weapp

CSS
64
star
20

laravel-taggable

Taggable Trait for using tag inside Laravel Eloquent models, with Baum's Nested Set pattern support.
PHP
54
star
21

baidu-translate-ios-sdk

百度翻译 iOS SDK (非官方)
Objective-C
46
star
22

github-menu-back

Improvement of Github Top Menu
CSS
46
star
23

annotator

划词高亮功能
JavaScript
35
star
24

laracast_robot

A robot a download laracasts.com videos
JavaScript
29
star
25

zhihu

L07 Laravel 教程 - Laravel TDD 源码
PHP
28
star
26

administrator-demo

demo for https://github.com/summerblue/administrator
JavaScript
22
star
27

chrome-phphub-notifier

Notify you when interesting thing is happening at PHPHub.
JavaScript
18
star
28

http-class-for-php

HTTP Class for PHP , support for Both Curl and Socket
PHP
11
star
29

QiniuSdk_v7_demo

Little Demo Code for Qiniu v7.* SDK https://github.com/qiniu/objc-sdk
Objective-C
10
star
30

php-emoji-for-apns

a php helper function to send emoji encoded string to apns
PHP
10
star
31

lt-settler

为 《Laravel 入门教程》 https://laravel-china.org/laravel-tutorial/5.1/about 定制的 homestead box 打包脚本
Shell
10
star
32

Amr2Wav

A library that convert audio file format from amr to wav .
Objective-C
8
star
33

CS193pWinter-2013

Stanford CS193p Developing Applications for iOS Winter 2013 Source Code
Objective-C
4
star
34

laravel-quickstart-intermediate-5.1

Source code for http://laravel-china.org/docs/5.1/quickstart-intermediate, base on Laravel 5.1
PHP
3
star
35

voicecloud_with_amr2wav_demo

此项目是 `科大讯飞 - 语音识别` 转换 amr 音频格式的 DEMO.
Objective-C
3
star
36

ios-framework-comments

为 iOS 常用框架添加注释, 作为学习 iOS 开发的资料
Objective-C
2
star
37

nsscreencasts_robot

Video downloader for nsscreencasts.com
JavaScript
2
star
38

summerblue.me

Source code of the http://summerblue.me
ApacheConf
2
star
39

CS193pWinter-2011

Stanford CS193p Developing Applications for iOS Winter 2011 Source Code
Objective-C
1
star
40

weibo7.x

PHP
1
star
41

kindness-is-more-important

We value kindness and friendly more than anything.
1
star
42

baker-doc-chinese

A quick translation in Chinese for http://bakerframework.com/
1
star
43

githunt-x

fork from kamranahmedse/githunt add feature like: night mod, search, more time filter, next page ...
JavaScript
1
star
44

emoji-cheat-sheet

fork from https://github.com/WebpageFX/emoji-cheat-sheet.com , for PHPHub loading speed
HTML
1
star