Laravel Environment Configuration Fool Tutorial

Source: Internet
Author: User
Tags chmod mkdir composer install sublime text git clone
First, install Ubuntu

1. After inserting the optical drive, reboot and press the DEL key.

2 boot Menu select UEFI:OPTIARC DVD rw ad7540a

3. Enter Ubuntu, welcome to the left of the interface to choose Chinese, continue.


4. Choose to clear the entire disk and install Ubuntu. If a partitioning problem occurs, click Continue.


5. Set user name and password, PC name Click Next, start installation, this process will take about 20 minutes.


6. After the screen appears reboot the computer, unplug the optical drive, restarts the computer. Second, the configuration environment (Lnmp->nginx, PHP, MySQL)

1. Install Git. Execute command: sudo apt install git

2. Install sublime text,

-Execute command:CD ~/

-Execute command: git clone https://github.com/lyfeyaj/sublime-text-imfix.git

-Execute command:CD sublime-text-imfix &&/sublime-imfix

Re-search Sublime-text open, lock to launcher, fix.

3. Install the Java Operating environment:
sudo apt-get install Default-jre (This step is important and must be done)

4. Install Smartgit

-Execute command: cd/opt

-Execute command: sudo chmod-r 777. (Change folder permissions)

-Execute command: wget http://haxibiao.com/work/smartgit.tar.gz

-Execute command: Tar xvf smartgit.tar.gz


5. Install Lnmp (nginx+mysql+php under Linux)

-Open the terminal to execute the following command:

-Execute command: sudo apt install screen

-Execute command: sudo-i

-Execute command: screen-s LNMP

-Execute command: cd/opt

-execute command: sudo su input password

-Execute command: wget-c http://soft.vpser.net/lnmp/lnmp1.4.tar.gz && tar zxf lnmp1.4.tar.gz && CD lnmp1.4

6. Modify the LNMP configuration file.

-Execute command: Cd/opt/lnmp1.4/include

-Execute command : Subl php.sh (Open script file)

Find (shortcut key is Crtl + h) disable-fileinfo, replace them all into enable-fileinfo.

-Execute command : Subl upgrade_php.sh

Find (shortcut key is Crtl + h) disable-fileinfo, replace them all into enable-fileinfo.


7. Configure the remote server to download the code.

-Execute Command exit (exit root mode)

Get the key file: If you already have a script that is responsible for this feature, you do not need to perform the following steps

-Execute command:sudo mkdir-p ~/.ssh

-Execute command:CD ~/.ssh

-Execute command : sudo chmod-r 777.

-Execute command: Here the key asks the boss to

-Execute command: Here the key asks the boss to

-Execute command: CD/

-Execute command: sudo mkdir data

-Execute command: cd/data

-Execute command:sudo mkdir www

Execute command: cd/data/www

-Execute command : sudo chmod-r 777.

-execute command: Git clone ssh://root@haxibiao.com:/data/www/haxibiao.com (Clone your own project's site code in the data/www/directory, clone- > Address input: SSH://root@dongdianyao.com:/data/www/< such as:dongdianyao.com> to local, such as:/code/dongdianyao.com)

8. Add 127.0.0.1 l.haxibiao.com to local/etc/hosts [System files, password required]

-Execute command subl/etc/hosts


9. Add server configuration to/usr/local/nginx/conf/nginx.conf file [System files, password required]

-Execute command subl/usr/local/nginx/conf/nginx.conf

Place the index index.html index.html index.php This line above the server declaration


Add the following code below the server

Server

{

server_name l.haxibiao.com;

Root/data/www/haxibiao.com/public;

Include enable-php.conf;

Location/{

Try_files $uri $uri//index.php $query _string;

}

}


Configuration nginx, need reload.

-Execute command: sudo nginx-t

-Execute command: sudo nginx-s reload

Note file:

subl/usr/local/nginx/conf/fastcgi.conf

Note the last line, plus the # key is OK.


10. Install composer NPM and Node.js

-execute command: sudo apt install composer

-execute command: sudo apt install npm

-Execute command: Sudo apt-get install nodejs-Legacy

11. Upgrade NPM.

First step:

Execute command : curl-o-https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | Bash

Step Two:

Execute command :source ~/.BASHRC

Step Three:

Execute command :NVM list-remote to see the latest version number

At last:

Execute command :nvm Install v8.7.0 If there is a newer version can fill in the updated version up!


12. Update PHP

cd/opt/lnpm1.4/

sudo bash upgrade.sh

13. Install NPM

Actions in the project root directory:

-Execute command:npm install (a bit long)

14. Modify PHP Configuration

-Execute command Subl/etc/php/7.0/cli/php.ini

Search disable-function, convert = back equivalent to PASSTHRU,CHROOT,SCANDIR,CHGRP,SHELL_EXEC,CHOWN,POPEN,INI_ALTER,INI_RESTORE,DL, Openlog,syslog,readlink,symlink,popepassthru,stream_socket_server

Install composer

-Execute command: Composer install

15. Enter Localhost/phpmyadmin in the browser address bar.

Click Create Haxibiao database.


16. Pulling data from the server

-Execute command cd/data/sqlfiles

-Execute command sudo chmod-r 777.

-Execute command cd/data/www/haxibiao.com

-Execute command bash getsql.sh


three. Subllime Editor Landscaping.

1. Add a Theme

crtl+shift+p Plug-in installation

Search Options Package Control:install Package


Search Select materialize Theme

after installation,


Open the settings (JSON file) in the preferences with three pieces of code in the selected area and copy the settings (Comma separated)


2.Sass Syntax Highlighting:

The first step: Install Package

Step two: Sass 3.PHP Syntax highlighting:

The first step: Install Package

Step two: Laravel Blade highlighter 4. Front-end code beautification:

Html-css-js prettify

Collating code: Htmlprettify










Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.