1.查看yum的nginx信息
# yum info nginx
Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * epel: mirrors.yun-idc.comExcluding Packages in global exclude listFinishedInstalled PackagesName : nginxArch : x86_64Version : 0.8.55Release : 6.el5Size : 984 kRepo : installedSummary : Robust, small and high performance HTTP and reverse proxy serverURL : http://nginx.net/License : BSDDescription: Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse pr本文来*源gaodai^.ma#com搞#代!码网搞gaodaima代码oxy and IMAP/POP3 : proxy server written by Igor Sysoev.
2.如果需要更换版本,先卸载# yum remove nginx3.安装并启动nginx
# yum install nginx# service nginx start4.浏览器访问
http://192.168.0.168/
返回结果如下表示成功
Welcome to nginx on EPEL!This page is used to test the proper operation of the nginx HTTP server after it has been installed. If you can read this page, it means that the web server installed at this site is working properly.Website AdministratorThis is the default index.html page that is distributed with nginx on EPEL. It is located in /usr/share/nginx/html.You should now put your content in a location of your choice and edit the root configuration directive in the nginx configuration file /etc/nginx/nginx.conf.[ Powered by nginx ] [ Powered by Fedora EPEL ]以上就介绍了yum安装nginx详解,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。