4.網(wǎng)站更新過(guò)程(程序代碼更新)
(1)在開(kāi)發(fā)人員自己電腦進(jìn)行測(cè)試
(2)公司內(nèi)部機(jī)房進(jìn)行測(cè)試
(3)在IDC機(jī)房(數(shù)據(jù)中心) 測(cè)試
(4)程序代碼放在用戶(hù)使用的環(huán)境(生產(chǎn)環(huán)境/線上環(huán)境)
- /etc/hosts
[root@huahua ~]# vi /etc/hosts //讓域名解析到ip智末,測(cè)試搭建環(huán)境
[root@huahua ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.10.70 huahua.com jd.com //地址一定是本機(jī)地址 采转,一定不能寫(xiě)baidu.com璧亮,因?yàn)閜ing百度就等于ping自己
[root@huahua ~]# ping jd.com //ping jd.com乖订,能ping通
PING huahua.com (192.168.10.70) 56(84) bytes of data.
64 bytes from huahua.com (192.168.10.70): icmp_seq=1 ttl=64 time=0.125 ms
64 bytes from huahua.com (192.168.10.70): icmp_seq=2 ttl=64 time=0.114 ms
64 bytes from huahua.com (192.168.10.70): icmp_seq=3 ttl=64 time=0.116 ms
^C
--- huahua.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.114/0.118/0.125/0.010 ms
[root@huahua ~]# ping huahua.com //ping huahua.com,能ping通
PING huahua.com (192.168.10.70) 56(84) bytes of data.
64 bytes from huahua.com (192.168.10.70): icmp_seq=1 ttl=64 time=0.081 ms
64 bytes from huahua.com (192.168.10.70): icmp_seq=2 ttl=64 time=0.170 ms
64 bytes from huahua.com (192.168.10.70): icmp_seq=3 ttl=64 time=0.118 ms
^C
--- huahua.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.081/0.123/0.170/0.036 ms