千家信息网

FreeBSD常用操作有哪些

发表于:2025-11-07 作者:千家信息网编辑
千家信息网最后更新 2025年11月07日,这篇"FreeBSD常用操作有哪些"文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇"Fr
千家信息网最后更新 2025年11月07日FreeBSD常用操作有哪些

这篇"FreeBSD常用操作有哪些"文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇"FreeBSD常用操作有哪些"文章吧。

1. 网络

重启网络的命令:

/etc/rc.d/netif restart , /etc/netstart restart

网络配置文件:

root@mhxy-compile02:~ # cat /etc/rc.confifconfig_em0="DHCP"sshd_enable="NO"ntpd_enable="YES"# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disabledumpdev="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. BasicPort 32200Protocol 2# 2. AuthenticationHostKey /etc/ssh/ssh_host_rsa_keyHostKey /etc/ssh/ssh_host_dsa_keyKeyRegenerationInterval 3600ServerKeyBits 768UsePrivilegeSeparation yesLoginGraceTime 120PermitRootLogin noStrictModes yesRSAAuthentication yesPubkeyAuthentication yesPermitEmptyPasswords noChallengeResponseAuthentication noPasswordAuthentication noIgnoreRhosts yesRhostsRSAAuthentication noHostbasedAuthentication no# 3. FeaturesUseDNS noX11Forwarding yesX11DisplayOffset 10PrintMotd noPrintLastLog yesTCPKeepAlive yesAcceptEnv LANG LC_*# 4. LoggingSyslogFacility AUTHLogLevel INFO# 5. x509Subsystem sftp /usr/libexec/sftp-server#CACertificateFile /etc/ssh/ca/ca.cer

3. 防火墙

1)停止ipfw防火墙:ipfw disable firewall  /etc/rc.d/ipfw stop2)开启ipfw防火墙:ipfw enable firewall  /etc/rc.d/ipfw start3)清防火墙ipf -Fa

4.赋予用户root权限

1)pw groupmod wheel -m2)pw user mod  -g wheel

5.查看CPU和内存

1)sysctl kern.smp.cpus或dmesg |grep cpu  #查看CPU个数2)dmesg|more或top   #查看内存

以上就是关于"FreeBSD常用操作有哪些"这篇文章的内容,相信大家都有了一定的了解,希望小编分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注行业资讯频道。

0