Linux配置LNMP環境 一 配置Nginx

2022-03-20 10:31:27 字數 751 閱讀 2343

1.  先cd到/usr/local/src 

3. 解壓到當前目錄

4. cd到解壓的nginx-1.12.0目錄,ls看到裡面有乙個configure檔案

5. 然後按照./configure --prefix=/usr/local/nginx

7. 然後再安裝nginx帶上pcre的路徑./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/src/pcre-8.39 ,

安裝nginx,**:./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/src/pcre-8.39

8. 最後安裝成功. cd /usr/local/nginx/ 目錄ls看到sbin目錄有乙個nginx ,啟動nginx **: ./sbin/nginx

有些人啟動之後會提示80埠占用, 因為有些人安裝的linux的伺服器版的.預設安裝了httpd 把它殺掉pill -9 httpd

這個時候你就可以在你的本地接輸入虛擬機器的ip位址了. 成功了!~!~!~

如果不能訪問:

1.在你本地ping虛擬機器的ip(如果能ping虛擬機器網路配置有問題,自行搜尋配置)

2. telnet空格你的ip空格80(如果是ip能ping通,這個80埠不通,則是防火牆的原因,關閉防火牆service iptables stop)

3.知識補充netstat -nltp|grep 80 檢視80埠誰用著呢

lnmp環境配置

安裝libmcrypt checking for c compiler default output file name.configure error c compiler cannot create executables see config.log for more details.解決辦法...

lnmp環境配置

1 配置ssh遠端連線 sudo apt get install ssh 2 配置環境 wget co lnmp1.5.tar.gz tar zxf lnmp1.5.tar.gz cd lnmp1.5 install.sh lnmp 教程 3 配置埠號訪問專案 root賬號不能遠端連線資料庫 5 新...

阿里雲 LNMP 環境配置

使用yum安裝apache伺服器 yum install nginx 修改為 listen 80 vim etc nginx conf.d default.conf 檢視nginx狀態 nginx t 啟動nginx服務 service nginx start 配置 nginx 虛擬主機,注意,網域...