11
2- ## 说明
2+ ## Intro
33
4- 此脚本用于在一台全新的 Ubuntu 14.04 LTS 上部署适合 Laravel 使用的 LNMP 生产环境。
4+ This is a shell script for setting up Laravel Production environment on Ubuntu 14.04 system.
55
6- ## 软件信息
6+ ## Software list
77
88* Ubuntu 16.04
99* Git
1717* Memcached
1818* Beanstalkd
1919
20- ## 安装步骤
20+ ## Installation
2121
22- 1). 下载 ` deploy.sh ` 脚本
22+ 1). Pull down the script
2323
2424```
25- $ wget https://raw.githubusercontent.com/summerblue/laravel-ubuntu-init/master/deploy.sh
26- $ chmod +x deploy.sh
25+ wget https://raw.githubusercontent.com/summerblue/laravel-ubuntu-init/master/deploy.sh
26+ chmod +x deploy.sh
2727```
2828
29- 2). 设置 MYSQL 密码
29+ 2). Config MySQL password
3030
31- ` vi deploy.sh ` 根据情况修改以下:
31+ ` vi deploy.sh ` edit your password:
3232
3333```
3434# Configure
35- MYSQL_ROOT_PASSWORD="这里填写复杂的密码 "
35+ MYSQL_ROOT_PASSWORD="{{--Your Password--}} "
3636MYSQL_NORMAL_USER="estuser"
37- MYSQL_NORMAL_USER_PASSWORD="这里填写复杂的密码 "
37+ MYSQL_NORMAL_USER_PASSWORD="{{--Your Password--}} "
3838```
3939
40- 3). 开始安装
40+ 3). Start install
4141
42- 有需要的话可以使用网易镜像加速:
42+ For ** Chinese ** user, you may want to using a mirror for speed up:
4343
4444```
45- $ wget http://mirrors.163.com/.help/sources.list.trusty -O /etc/apt/sources.list
45+ wget http://mirrors.163.com/.help/sources.list.trusty -O /etc/apt/sources.list
4646```
4747
48- 开始安装:
48+ Run the shell script:
4949
5050```
51- $ ./deploy.sh
51+ ./deploy.sh
5252```
5353
54- > 注:请使用 root 运行。
54+ > Note: You must run as ` root ` .
5555
56- 安装后会有类似输出:
56+ It will finish installation with this message:
5757
5858```
5959--
@@ -66,28 +66,28 @@ Mysql Normal User Password: xxx你的密码xxx
6666--
6767```
6868
69- ## 安装完以后的配置和注意事项
69+ ## After installation
7070
71- ### 1. 修改站点目录权限
71+ ### 1. Web root permission
7272
73- 通过此脚本配置的 Nginx 将使用 www 用户权限,因此需要在你的站点根目录下运行以下命令更新权限。
73+ Nginx using ` www ` user, in order to have a correct permission, you should change the owner of the directory:
7474
7575```
76- cd /data/www/{你的网站目录 }
76+ cd /data/www/{YOU PROJECT FOLDER NAME }
7777chown www:www -R ./
7878```
7979
80- ### 2. 添加站点的 nginx 配置
80+ ### 2. Add a site
8181
82- 下面是站点的 nginx 配置模板,写入按照域名命名的文件中,并放入到 ` /etc/nginx/sites-enabled ` 目录下。
82+ Here is a Nginx config file template for Laravel Project, you should put it at ` /etc/nginx/sites-enabled ` folder.
8383
84- 如: ` /etc/nginx/sites-enabled/phphub.org `
84+ For example ` /etc/nginx/sites-enabled/phphub.org ` :
8585
8686```
8787server {
8888 listen 80;
89- server_name {你的域名 };
90- root "{站点根目录 }";
89+ server_name {{---YOU-DOMAIN-NAME---} };
90+ root "{{---YOU-PROJECT-FOLDER---} }";
9191
9292 index index.html index.htm index.php;
9393
@@ -100,8 +100,8 @@ server {
100100 location = /favicon.ico { access_log off; log_not_found off; }
101101 location = /robots.txt { access_log off; log_not_found off; }
102102
103- access_log /data/log/nginx/{你的网站标识 }-access.log;
104- error_log /data/log/nginx/{你的网站标识 }-error.log error;
103+ access_log /data/log/nginx/{{---YOU-PROJECT-NAME---} }-access.log;
104+ error_log /data/log/nginx/{{---YOU-PROJECT-NAME---} }-error.log error;
105105
106106 sendfile off;
107107
@@ -123,7 +123,7 @@ server {
123123}
124124```
125125
126- 配置完以后重启 nginx 即可。
126+ Restart Nginx when you done:
127127
128128```
129129service nginx restart
0 commit comments