Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> 關於 Windows

Windows Azure Linux 安裝 LNMP 遇到的問題與解決紀錄

編輯:關於 Windows

原想安裝 Web 管理面板卻屢試失敗,最終改用 LNMP 一鍵安裝包,改用指令操作管理。

安裝教學請參考官網:https://lnmp.org/install.html

常見問題與解決

1. PHP-FPM 卡在 Starting 狀態

某些環境下預設 PHP 版本有問題,解決方法:退出安裝腳本,執行升級腳本將 PHP 升級至 5.3.27。

cd /root/lnmp1.0-full
./upgrade_php.sh
# 輸入 5.3.27 等待升級完成

2. 新增虛擬主機後目錄指向錯誤

無論新增何域名,皆指向預設目錄 /home/wwwroot/default。解決:在 /usr/local/nginx/conf/vhost/ 下手動建立 域名.conf,內容參考 default.conf 修改 server_name 與 root 路徑,再重啟 Nginx。

常用管理指令

# LNMP 整體
/root/lnmp {start|stop|reload|restart|kill|status}

# Nginx
/etc/init.d/nginx {start|stop|reload|restart}

# MySQL
/etc/init.d/mysql {start|stop|restart|reload|force-reload|status}

# PHP-FPM
/etc/init.d/php-fpm {start|stop|quit|restart|reload|logrotate}

# PureFTPd
/etc/init.d/pureftpd {start|stop|restart|kill|status}

# 範例:重啟 LNMP
/root/lnmp restart
# 單獨重啟 MySQL
/etc/init.d/mysql restart

後續遇到其他問題再補充記錄。

Copyright © Windows教程網 All Rights Reserved