linuxÔõôÆô¶¯nginx
ÔÚ linux ÖÐÆô¶¯ nginx µÄ°ì·¨£º¼ì²é nginx ÊÇ·ñÒÑ×°Öá£Ê¹Óà systemctl start nginx Æô¶¯ nginx ЧÀÍ¡£Ê¹Óà systemctl enable nginx ÆôÓÃÔÚϵͳÆô¶¯Ê±×Ô¶¯Æô¶¯ nginx¡£Ê¹Óà systemctl status nginx ÑéÖ¤Æô¶¯ÊÇ·ñÀֳɡ£ÔÚ web ä¯ÀÀÆ÷Öлá¼û http://localhost Éó²éĬÈϽӴýÒ³Ãæ¡£
ÔõÑùÔÚ Linux ÖÐÆô¶¯ Nginx
ÒªÔÚ Linux ÖÐÆô¶¯ Nginx£¬ÇëÖ´ÐÐÒÔÏ°취£º
1. ¼ì²é Nginx ÊÇ·ñÒÑ×°ÖÃ
¼ì²é Nginx ÊÇ·ñÒѾװÖÃÔÚϵͳÉÏ£º
$ systemctl status nginx
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
ÈôÊÇ Nginx ÒÑ×°Öã¬Ëü½«ÏÔʾ¡°active (running)¡±¡£
2. Æô¶¯ Nginx ЧÀÍ
ÈôÊÇ Nginx δÔËÐлòÒÑ×èÖ¹£¬Ê¹ÓÃÒÔÏÂÏÂÁîÆô¶¯Ëü£º
$ systemctl start nginx
µÇ¼ºó¸´ÖÆ
3. ÆôÓà Nginx ËæϵͳÆô¶¯
Ҫʹ Nginx ÔÚϵͳÆô¶¯Ê±×Ô¶¯Æô¶¯£¬ÇëʹÓÃÒÔÏÂÏÂÁîÆôÓÃËü£º
$ systemctl enable nginx
µÇ¼ºó¸´ÖÆ
4. ÑéÖ¤ Nginx ÊÇ·ñÒÑÆô¶¯
ʹÓÃÒÔÏÂÏÂÁîÑéÖ¤ Nginx ÊÇ·ñÒÑÀÖ³ÉÆô¶¯£º
$ systemctl status nginx
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
ËüÓ¦¸ÃÏÔʾ¡°active (running)¡±¡£
5. »á¼û Nginx ĬÈÏÒ³Ãæ
ÔÚ Web ä¯ÀÀÆ÷Öз¿ªÒÔÏ URL£¬ÒÔÑéÖ¤ Nginx ÊÇ·ñÕýÔÚÔËÐУº
http://localhost
µÇ¼ºó¸´ÖÆ
ÄúÓ¦¸Ã¿´µ½ Nginx ĬÈϽӴýÒ³Ãæ¡£
ÒÔÉϾÍÊÇlinuxÔõôÆô¶¯nginxµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡