Liunx配置网络到nginx环境搭建步骤
版本:nginx:1.1 php:5.3.8
虛擬機(jī)選擇網(wǎng)絡(luò)橋接網(wǎng)卡(bridge network card)
設(shè)置后啟動(dòng)虛擬機(jī)
編輯配置
命令 vi /etc/sysconfig/network-scripts/ifcfg-eth0
重啟 service network restart
檢測(cè) ping -c3 baidu.com
網(wǎng)絡(luò)配置:
清除防火墻規(guī)則:iptables -F
保存規(guī)則 service iptables save
關(guān)閉shell配置:
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted安裝nginx
Ubuntu下安裝nginx,直接apt-get install nginx就行了,很方便。
但是今天裝了CentOS6.2,直接yum install nginx不行,要先處理下源,下面是安裝完整流程,也十分簡(jiǎn)單:
1、CentOS 6,先執(zhí)行:
2,查看yum的nginx信息
yum info nginx3,安裝并啟動(dòng)nignx
yum install nginx service nginx start4,然后進(jìn)入瀏覽器,輸入http://192.168.1.67測(cè)試,如果看到有頁(yè)面則已經(jīng)成功
安裝php5.3版本 yum -y install php php-mysql php-gd php-mbstring
總結(jié)
以上是生活随笔為你收集整理的Liunx配置网络到nginx环境搭建步骤的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: php @touch,touch - [
- 下一篇: ESP3 + ESP-IDF | 串口1