DEV Community

Cover image for CentOS 7 裝 NGINX
Leon
Leon

Posted on • Originally published at editor.leonh.space

CentOS 7 裝 NGINX

CentOS 是選用 CentOS 7.4 Minimal with Webmin (HVM),它已經幫我們設定好一些常用的 CentOS EPEL。 <3

抄一下這篇〈於CentOS7安裝 Nginx + php7 + php-fpm + Laravel5.6〉。

裝下去:

> sudo yum install nginx
Enter fullscreen mode Exit fullscreen mode

設定開機執行 NGINX:

> sudo systemctl enable nginx
Enter fullscreen mode Exit fullscreen mode

啟動 NGINX:

> sudo systemctl start nginx
Enter fullscreen mode Exit fullscreen mode

systemctl 指令的解說可以讀一下 Arch Linux 的主題文章

以上做完,試開一下應該就可以看到 Welcome to nginx 的頁面了。注意到這個頁面檔案放在 /usr/share/nginx/html/。

Top comments (0)