auto change ip and hostname
#!/bin/sh
ETHCONF=/etc/sysconfig/network-scripts/ifcfg-eth0
HOSTS=/etc/hosts
NETWORK=/etc/sysconfig/network
NETMASK=255.255.255.0
###
function Change_ip ()
{
grep "dhcp" $ETHCONF
if [ $? -eq 0 ];then
read -p "Please insert ip Address:" IPADDR
sed -i ‘s/dhcp/static/g‘ $ETHCONF
echo -e "IPADDR=$IPADDR\nNETMASK=$NETMASK\nGATEWAY=`echo $IPADDR|awk -F. ‘{print $1"."$2"."$3}‘`.2" >>$ETHCONF
echo "This IP address Change success !"
auto change ip and hostname
相關推薦
auto change ip and hostname
auto change ip and hostname#!/bin/shETHCONF=/etc/sysconfig/network-scripts/ifcfg-eth0HOSTS=/etc/hostsNETWORK=/etc/sysconfig/network NETMASK=255.255.255.0##
small case change m and n
case oid int ring 可能 變量 blog args string class Test{ public static void main(String[] args){ int m=12; int n=5; System
Atlassian JIRA Change IP
pre PE query cloud onf written rac start creat Oracle Linux 6.8 Atalssian JIRA 7 原來IP: 192.168.10.200 改新IP: 192.168.12.200 重新跑應用報錯,如下所示:
U盤安裝Ubuntu15.04 出現boot failed: please change disks and press a key to continue
啟動 ubunt 根據 重新 無法 版本 and ima change 1、根據國內的教程,用Ultraiso制作了一個Ubuntu15.04的U盤啟動盤,在裝系統的時候提示如下錯誤:boot failed: please change disks and press a
靜態IP和hostname的設定
2018年11月10日 17:51:10 qq_43401108 閱讀數:3 標籤: linux
Climate Change, Blockchain And The Paris Agreement: A New Hope
Climate Change, Blockchain And The Paris Agreement: A New HopeGetting 196 countries to cooperate is a challenge we cannot fail.There is no doubt that we ar
How does artificial intelligence change banking, and how can community banks prepare?
How does artificial intelligence change banking, and how can community banks prepare?Artificial intelligence (AI), or the development of computer systems t
IP and its Importance for AI Startups
Types of IPCompanies should coordinate their business plans with their IP strategy. For instance, the company’s brand name could and should be protected as
Oracle10g RAC Public IP and VIP修改
一客戶的核心Oracle10g RAC架構的資料庫要進行IP的修改,原因為目前public ip和virtual ip均是用的公網IP,因此基於安全的考慮,將這2類IP均修改為公司區域網內私網IP。 出於對客戶資訊的保密,因此不能將真實的IP寫出來,不過我會描述清楚,若有疑
CentOS6修改主機名(hostname)及 修改/etc/hosts 檔案,增加ip和hostname的對映關係(轉)
/etc/sysconfig/network用任一款你喜愛的編輯器開啟該檔案,裡面有一行 HOSTNAME=localhost.localdomain (如果是預設的話),修改 localhost.localdomain 為你的主機名。/etc/hosts開啟該檔案,會有一行 127.0.0.1 localh
vultr 上實現高可用冗餘浮動公網IP出口(使用BIRD+BGP協議)High Availability on Vultr with Floating IP and BGP
官方文件: https://www.vultr.com/docs/high-availability-on-vultr-with-floating-ip-and-bgp https://www.vultr.com/docs/configuring-bgp-on-vultr 1、由於我們沒有自己的IP段以
vultr 上實現高可用冗余浮動公網IP出口(使用BIRD+BGP協議)High Availability on Vultr with Floating IP and BGP
fir tool ace www. 步驟 自己 其他 ins 測試環境 官方文檔: https://www.vultr.com/docs/high-availability-on-vultr-with-floating-ip-and-bgp https://www.vult
U盤安裝Ubuntu15.04 出現boot failed: please change disks and press a key to continue 錯誤
1、用Ultraiso製作了一個Ubuntu15.04的U盤啟動盤,在裝系統的時候提示如下錯誤: boot failed: please change disks and press a key to continue Start booting from
java 獲取本機的IP和hostname
InetAddress ia = InetAddress.getLocalHost(); String host = ia.getHostName();//獲取計算機主機名 String IP= ia
Hibernate Auto-generate .hbm and .java
This is one of the best descriptions of how to use the Hibernate tools to reverse engineer a DB into ,hbm and .java files automatically
得到區域網下裝置機的ip和hostname
要得到同一區域網下的主機的ip和主機名,有兩種方式。 第一種一種是通過執行shell操作ping 出主機名 原理是,區域網中ip段就最後一位不同,如192.168.0.1與192.168.0.12屬於同一區域網內 需要遍歷區域網IP的,大體分為兩步:: 1.得到區域網網段,
修改/etc/hosts 檔案,增加ip和hostname的對映關係
修改/etc/hosts 檔案,增加三臺機器的ip和hostname的對映關係 192.168.0.1 cloud001 192.168.0.2 cloud002 192.168.0.3 cloud003
多個jdk 變更 引起 tomcat插件 啟動不了 The JRE could not be found.Edit the server and change the JRE location.
變更 runtime win jdk nts nvi bsp 選擇 ould The JRE could not be found.Edit the server and change the JRE location. 在Windows->Preference
[React] Create a Virtualized List with Auto Sizing Cells using react-virtualized and CellMeasurer
color react fault mail osi rem owin logs ati In this lesson we‘ll use CellMeasurer and CellMeasurerCache to automatically calculate and c
disable NetworkManager and boot on static ip configuration using /etc/network/interfaces
sta ifdown isa ip link emctl lin mas 8.0 down 1.stop and disable NetworkManager sudo systemctl stop NetworkManager sudo systemctl disable