新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
分享一下FreeBSD常用操作
最近遇到一些FreeBSD的故障,在這種操作系統(tǒng)上我們平時(shí)用的一些命令無法執(zhí)行,F(xiàn)reeBSD的一些配置文件也和其他很多Linux系統(tǒng)不一樣。為了方便以后查閱,我特別整理了這篇文檔。

1. 網(wǎng)絡(luò)
重啟網(wǎng)絡(luò)的命令:
/etc/rc.d/netif restart , /etc/netstart restart
網(wǎng)絡(luò)配置文件:
root@mhxy-compile02:~ # cat /etc/rc.conf
ifconfig_em0="DHCP"
sshd_enable="NO"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
puppet_enable="YES"
ipv6_enable="NO"
hostname="mhxy-compile02.i.nease.net"
nfs_client_enable="YES"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
2. SSH
命令:
/etc/rc.d/sshd start , /etc/rc.d/sshd restart
SSH配置文件:
root@mhxy-compile02:~ # cat /etc/ssh/sshd_config
# THIS FILE IS AUTOMATICALLY GENERATED BY PUPPET.
# DO NOT EDIT THIS FILE.
# 1. Basic
Port 32200
Protocol 2
# 2. Authentication
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
KeyRegenerationInterval 3600
ServerKeyBits 768
UsePrivilegeSeparation yes
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication no
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
# 3. Features
UseDNS no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
# 4. Logging
SyslogFacility AUTH
LogLevel INFO
# 5. x509
Subsystem sftp /usr/libexec/sftp-server
#CACertificateFile /etc/ssh/ca/ca.cer
3. 防火墻
1)停止ipfw防火墻:
ipfw disable firewall
/etc/rc.d/ipfw stop
2)開啟ipfw防火墻:
ipfw enable firewall
/etc/rc.d/ipfw start
3)清防火墻
ipf -Fa
4.賦予用戶root權(quán)限
1)pw groupmod wheel -m
2)pw user mod -g wheel
5.查看CPU和內(nèi)存
1)sysctl kern.smp.cpus或dmesg |grep cpu #查看CPU個(gè)數(shù)
2)dmesg|more或top #查看內(nèi)存
分享題目:分享一下FreeBSD常用操作
網(wǎng)頁URL:http://fisionsoft.com.cn/article/cdiecpd.html


咨詢
建站咨詢
