+------------------------------------------------------------------------+ | LNMP V1.3 for CentOS Linux Server, Written by Licess | +------------------------------------------------------------------------+ | A tool to auto-compile & install LNMP/LNMPA/LAMP on Linux | +------------------------------------------------------------------------+ | For more information please visit http://www.lnmp.org | +------------------------------------------------------------------------+ Please setup root password of MySQL.(Default password: root) Please enter: root MySQL root password: root =========================== Do you want to enable or disable the InnoDB Storage Engine? Default enable,Enter your choice [Y/n]: Y You will disable the InnoDB Storage Engine! =========================== You have 5 options for your DataBase install. 1: Install MySQL 5.1.73 2: Install MySQL 5.5.48 (Default) 3: Install MySQL 5.6.29 4: Install MariaDB 5.5.48 5: Install MariaDB 10.0.23 6: Install MySQL 5.7.11 Enter your choice (1, 2, 3, 4, 5 or 6): 2 You will install MySQL 5.5.48 =========================== You have 6 options for your PHP install. 1: Install PHP 5.2.17 2: Install PHP 5.3.29 3: Install PHP 5.4.45 (Default) 4: Install PHP 5.5.36 5: Install PHP 5.6.22 6: Install PHP 7.0.7 Enter your choice (1, 2, 3, 4, 5 or 6): 6 You will install PHP 7.0.7 =========================== You have 3 options for your Memory Allocator install. 1: Don't install Memory Allocator. (Default) 2: Install Jemalloc 3: Install TCMalloc Enter your choice (1, 2 or 3): 1 You will install not install Memory Allocator. Press any key to install...or Press Ctrl+c to cancel
配置 nginx
vi /usr/local/nginx/conf/nginx.conf 参考如下修改 nginx 的配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
listen80 default_server; listen [::]:80 default_server; root /var/www/laravel/public; index index.php index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location / { try_files$uri$uri/ /index.php?$query_string; } location~ \.php$ { try_files$uri /index.php =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }