« 上一篇 | 下一篇»

centos4.4 note-網路設定

22 二月, 2007 08:10 •  (0) 迴響  •  引用(0)  •  3358 hit.  • 分類: note   

參考資料:學生用伺服器建置流程(CentOS 4.4 版)

vi(vim)指令:
顯示行數::set nu
不顯示行數::set nonu
刪除一整行:dd
到第一行:gg
到最後一行:G
到某一行:xxG

IP:
查看:ifconfig
修改:netconfig、system-config-network-tui(或修改此檔:/etc/sysconfig/network-scripts/ifcfg-eth0)

FQDN 設定:
hostname
vi /etc/hosts
vi /etc/sysconfig/network

DNS 設定:
vi /etc/resolv.conf

重新啟動網卡:
/etc/rc.d/init.d/network restart

runlevel
vi /etc/inittab

netstat
netstat -tl
netstat -pan|more

更新套件(使用 yum)
cd /etc/yum.repos.d/
cp CentOS-Base.repo CentOS-Base.repo.bak
vi CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-centos4

#released updates
[update]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-centos4 

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-centos4

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-centos4

yum指令
yum -y update
yum -y install XXX

php.ini :
vi /etc/php.ini

244行 max_execution_time = 300
245行 max_input_time = 600
246行 memory_limit = 80M
388行 post_max_size = 80M
501行 upload_max_filesize = 20M

校時: 

cp /etc/crontab /etc/crontab.bak
vi /etc/crontab

0 0-23 * * * root /usr/sbin/ntpdate watch.stdtime.gov.tw > /dev/null 2>&1

 

創用 CC 授權條款
 
 
Related Posts Plugin for WordPress, Blogger...

0 Comments on "centos4.4 note-網路設定"

 

發表迴響
 authimage

Google+ 迴響

*********