“Freebsd服务器初始化”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
 
第28行: 第28行:
  
 
</pre>
 
</pre>
 +
 +
==网络重启==
 +
<pre>
 +
网卡重启命令如下
 +
/etc/rc.d/netif restart
 +
 +
 +
重启无线网上
 +
sudo ifconfig wlan0 down
 +
 +
sudo ifconfig wlan0 up</pre>
  
 
=jial=
 
=jial=

2021年5月6日 (四) 11:19的最新版本

ins nginx

Install nginx using pkg command: pkg install nginx
Turn on Nginx service on FreeBSD: sysrc nginx_enable=YES
Configure Nginx server by editing /usr/local/etc/nginx/nginx.conf file



include  /usr/local/etc/nginx/conf.d/*.conf;

还是 ports 爽 有自定义什么的呢 

FreeBSD设置IP地址、网关、DNS的方法

 cat /etc/rc.conf
hostname="newNAT2021"
#ifconfig_vmx0="DHCP" #从原来的dhcp可得到网卡名
ifconfig_vmx0="inet 192.168.10.239  netmask 255.255.254.0" 
defaultrouter="192.168.10.1"  

sshd_enable="YES"
ntpdate_enable="YES"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
nginx_enable="YES"

网络重启

网卡重启命令如下
/etc/rc.d/netif restart 


重启无线网上
sudo ifconfig wlan0 down
	
sudo ifconfig wlan0 up

jial

qjail

see also

FreeBSD Install Nginx Webserver Tutorial

How to Install Nginx, MariaDB and PHP (FEMP) Stack on FreeBSD

How To Enable SSH On FreeBSD

https://www.freebsd.org/doc/handbook/configtuning-rcd.html