如何個(gè)網(wǎng)站做優(yōu)化長(zhǎng)沙網(wǎng)站seo技術(shù)廠家
1. 進(jìn)入虛擬機(jī)
點(diǎn)擊右鍵---進(jìn)入終端--輸入 ip adrr 或 ifconfig 查看ip地址
下面輸入命令?ifconfig(注意:不是 ipconfig )? 或? ip addr 來(lái)查看當(dāng)前系統(tǒng) IP
查看到IP 后,比如:上面是 192.168.184.137
1.1 IP 常用命令和配置
ifconfig 和 ip addr
ifconfig lo down : 卸載網(wǎng)卡 。 lo 是網(wǎng)卡名稱(chēng), down 是命令
想查看所有網(wǎng)卡,使用命令
ifconfig -a
[root@localhost ~]# ifconfig -a
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ## UP 和 RUNNING 表示啟用狀態(tài)inet 192.168.184.138 netmask 255.255.255.0 broadcast 192.168.184.255inet6 fe80::66a4:cbb9:7e27:e836 prefixlen 64 scopeid 0x20<link>ether 00:0c:29:62:64:5d txqueuelen 1000 (Ethernet)RX packets 578379 bytes 825280501 (787.0 MiB)RX errors 0 dropped 0 overruns 0 frame 0TX packets 245312 bytes 14903334 (14.2 MiB)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=8<LOOPBACK> mtu 65536 ## 禁用 卸載的狀態(tài)。inet 127.0.0.1 netmask 255.0.0.0loop txqueuelen 1000 (Local Loopback)RX packets 0 bytes 0 (0.0 B)RX errors 0 dropped 0 overruns 0 frame 0TX packets 0 bytes 0 (0.0 B)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255ether 52:54:00:3d:97:05 txqueuelen 1000 (Ethernet)RX packets 0 bytes 0 (0.0 B)RX errors 0 dropped 0 overruns 0 frame 0TX packets 0 bytes 0 (0.0 B)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500ether 52:54:00:3d:97:05 txqueuelen 1000 (Ethernet)RX packets 0 bytes 0 (0.0 B)RX errors 0 dropped 0 overruns 0 frame 0TX packets 0 bytes 0 (0.0 B)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
再次啟用網(wǎng)卡:
ifconfig lo up 啟用 lo 網(wǎng)卡
[root@localhost ~]# ifconfig lo up
[root@localhost ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500inet 192.168.184.138 netmask 255.255.255.0 broadcast 192.168.184.255inet6 fe80::66a4:cbb9:7e27:e836 prefixlen 64 scopeid 0x20<link>ether 00:0c:29:62:64:5d txqueuelen 1000 (Ethernet)RX packets 579055 bytes 825335264 (787.1 MiB)RX errors 0 dropped 0 overruns 0 frame 0TX packets 245362 bytes 14910528 (14.2 MiB)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 ### 啟用狀態(tài)了inet 127.0.0.1 netmask 255.0.0.0inet6 ::1 prefixlen 128 scopeid 0x10<host>loop txqueuelen 1000 (Local Loopback)RX packets 0 bytes 0 (0.0 B)RX errors 0 dropped 0 overruns 0 frame 0TX packets 0 bytes 0 (0.0 B)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
4.cat /etc/sysconfig/network-scripts/ifcfg-eth0
5.traceroute 第一行就是自己的網(wǎng)關(guān)
6.ip route show
7.route -n
修改網(wǎng)絡(luò)配置的文件:/etc/sysconfig/network-scripts/
靜態(tài)IP
修改文件目錄:/etc/sysconfig/network-scripts/
修改為靜態(tài):
- BOOTPROTO=static
指定IP、網(wǎng)關(guān)、子網(wǎng)掩碼、域名解析器
IPADDR=192.168.75.100 GATEWAY=192.168.75.2 # 需要先查下網(wǎng)關(guān),一般為最后一段為2 NETMASK=255.255.255.0 DNS1=114.114.114.114 DNS2=8.8.8.8
2. 進(jìn)入真機(jī)CMD
win+R -- 打開(kāi) 運(yùn)行---輸入 cmd----輸入ipconfig
輸入 ipconfig (windows 查看ip的命令) 來(lái)查看真機(jī)的當(dāng)前 IP。注意:不是 ifconfig 是 ipconfig
3. 先測(cè)試 真機(jī)是否能訪問(wèn) 虛擬機(jī)
在真機(jī)的CMD 命令窗口中,輸入 ping 192.168.184.137 回車(chē)
如果能出現(xiàn)下面的數(shù)據(jù)包響應(yīng),說(shuō)明連通的
4. 測(cè)試虛擬機(jī)是否可以向外訪問(wèn)
進(jìn)入虛擬機(jī),在命令終端 輸入 ping 192.168.0.102 (我的真機(jī)的IP)
注意:發(fā)測(cè)試數(shù)據(jù)包時(shí),linux 中會(huì)一直發(fā)送,需要中斷的話,可以使用 Ctrl+C 結(jié)束。
還可以測(cè)試外網(wǎng)是否連通
ping?www.baidu.com
注意:?window 查詢(xún)IP :ipconfig
? linux 查詢(xún)IP : ifconfig 或 ip addr
5. 使用 xshell
如果上面的步驟通過(guò),確定可以由外向內(nèi)訪問(wèn)的話,我們就可以使用客戶(hù)端 xshell 來(lái)操作linux 了
1)打開(kāi) Xshell 界面
上面菜單圖標(biāo)中,有三個(gè)常用的連接管理。
2)新建連接
點(diǎn)擊第一個(gè)圖標(biāo) 加號(hào)的圖標(biāo)
3)編輯登錄信息
上面輸入IP后,下面配置登錄信息
4)保存連接信息
完成后,點(diǎn)擊確定即可。
下面開(kāi)始連接: 點(diǎn)擊左邊菜單列表中的連接名.
再選擇接受和保存