larave 5.3 练习

0x01 编译安装nginx :

wget https://nginx.org/download/nginx-1.10.1.tar.gz
tar xvzf nginx-1.10.1.tar.gz
./configure \ --prefix=/etc/nginx\ --sbin-path=/usr/sbin/nginx\ --conf-path=/etc/nginx/nginx.conf\ --error-log-path=/var/log/nginx/error.log\ --http-log-path=/var/log/nginx/access.log\ --pid-path=/var/run/nginx.pid\ --lock-path=/var/run/nginx.lock\ --http-client-body-temp-path=/var/cache/nginx/client_temp\ --http-proxy-temp-path=/var/cache/nginx/proxy_temp\ --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp\ --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp\ --http-scgi-temp-path=/var/cache/nginx/scgi_temp\ --user=nginx\ --group=nginx\ --with-http_ssl_module\ --with-http_realip_module\ --with-http_addition_module\ --with-http_sub_module\ --with-http_dav_module\ --with-http_flv_module\ --with-http_mp4_module\ --with-http_gunzip_module\ --with-http_gzip_static_module\ --with-http_random_index_module\ --with-http_secure_link_module\ --with-http_stub_status_module\ --with-http_auth_request_module\ --with-threads\ --with-stream\ --with-stream_ssl_module\ --with-http_slice_module\ --with-mail\ --with-mail_ssl_module\ --with-file-aio\ --with-http_v2_module\ --with-ipv6\
1.nginx: [emerg] getpwnam("nginx") failed
sudo groupadd -f nginx && sudo useradd -g nginx nginx
or sudo useradd -r nginx
2.nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (2: No such file or directory)
sudo mkdir /var/cache/nginx && sudo chown nginx:nginx -R /var/cache/nginx
sudo nginx to start and see the localhost

0x02 编译安装php7和fpm

wget http://cn2.php.net/distributions/php-7.0.10.tar.gz
tar xvzf php-7.0.10.tar.gz
cd php-7.0.10.tar.gz
sudo apt-get install libbz2-dev libxml2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev libmcrypt-dev libpspell-dev librecode-dev locate libgmp-dev libxslt-dev
locate gmp.h |grep -v igmp
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
./configure --prefix=/usr/local/php \ --with-config-file-path=/etc \ --enable-fpm \ --with-fpm-user=nginx \ --with-fpm-group=nginx \ --enable-inline-optimization \ --disable-debug \ --disable-rpath \ --enable-shared \ --enable-soap \ --with-libxml-dir\ --with-xmlrpc \ --with-openssl \ --with-mcrypt \ --with-mhash \ --with-pcre-regex \ --with-sqlite3 \ --with-zlib \ --enable-bcmath \ --with-iconv \ --with-bz2 \ --enable-calendar \ --with-curl \ --with-cdb \ --enable-dom \ --enable-exif \ --enable-fileinfo \ --enable-filter\ --with-pcre-dir \ --enable-ftp \ --with-gd \ --with-openssl-dir \ --with-jpeg-dir \ --with-png-dir \ --with-zlib-dir \ --with-freetype-dir \ --enable-gd-native-ttf \ --enable-gd-jis-conv \ --with-gettext\ --with-gmp \ --with-mhash \ --enable-json \ --enable-mbstring \ --enable-mbregex \ --enable-mbregex-backtrack \ --with-libmbfl\ --with-onig \ --enable-pdo \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-zlib-dir \ --with-pdo-sqlite \ --with-readline \ --enable-session\ --enable-shmop \ --enable-simplexml \ --enable-sockets \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm\ --enable-wddx \ --with-libxml-dir \ --with-xsl \ --enable-zip \ --enable-mysqlnd-compression-support \ --with-pear \ --enable-opcache \ --enable-pcntl

install php-fpm
cp php.ini-production /etc/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
/etc/init.d/php-fpm start

configure nginx.conf

  listen    80;
  server_name   www.*.com;
  root  /path/to/root;
  charset UTF-8;
  location / { 
    try_files   $uri    /index.php?$query_string;
  }
  location ~ \.php{ 
    fastcgi_pass    127.0.0.1:9000; 
    fastcgi_index   index.php; 
    fastcgi_param   SCRIPT_NAME $document_root/$fastcgi_script_name; 
    include fastcgi_params;
  }

0x03 安装laravel5.3

1.first to install the composer
download composer
2.get the newest larave(In now is 5.3 version)
git clone https://github.com/laravel/laravel.git laravel_test && composer install
3.make the own key
cp .env.example .env && php artisan key:generate
4.install the gulp
npm install --global --save-dev gulp-cli gulp && npm install
5.go to make the larave work prefect(coming soon)

你可能感兴趣的:(larave 5.3 练习)