LNMP架構Nginx原始碼包安裝

2021-09-20 07:29:01 字數 2381 閱讀 4207

再此檔案中

#define nginx_version 1014000

#define nginx_version "1.14.0"

#define nginx_ver "nginx/" /後面後面是nginx版本號,為了安全將其隱藏

作三處修改

讓其預設先開啟php頁面

[root@server1 sbin]# ./nginx -t  ##檢測檔案語法的正確性

nginx: the configuration file /usr/local/lnmp/nginx/conf/nginx.conf syntax is ok

nginx: configuration file /usr/local/lnmp/nginx/conf/nginx.conf test is successful

[root@server1 sbin]# ./nginx -v ##檢視nginx的版本

nginx version: nginx/

[root@server1 sbin]# ./nginx -v ## 檢視安裝nginx時新增了那些配置

### 編寫預設發布頁,啟動nginx

vim /usr/local/lnmp/nginx/html/index.php

[root@server1 html]# cat index.php

<?php

phpinfo()

?>

/etc/init.d/php-fpm start

nginx ##啟動nginx,由於製作了軟連線

如果沒有寫php頁面,訪問html頁面

LNMP搭建 原始碼包

lnmp原始碼包搭建 linux centos 6.5 x86 64 bin 1 mysql 版本5.0.56 php 版本5.6.15 1.安裝nginx 安裝之前先安裝下各種依賴 啟動nginx usr local nginx sbin nginx 檢視是否啟動 ps aux grep ngin...

nginx原始碼分析 架構解析

nginx啟動流程 根據上面的手稿得知,nginx在迴圈中呼叫ngx process events and timers該函式來處理事件,在該函式中,最主要的乙個操作是呼叫了ngx process events函式,該函式是乙個巨集定義,然後我再工程裡面搜一下ngx event actions,結果...

nginx原始碼分析 架構解析

nginx啟動流程 根據上面的手稿得知,nginx在迴圈中呼叫ngx process events and timers該函式來處理事件,在該函式中,最主要的乙個操作是呼叫了ngx process events函式,該函式是乙個巨集定義,然後我再工程裡面搜一下ngx event actions,結果...