“Freebsd服务器初始化”的版本间的差异
跳到导航
跳到搜索
(未显示同一用户的2个中间版本) | |||
第16行: | 第16行: | ||
cat /etc/rc.conf | cat /etc/rc.conf | ||
hostname="newNAT2021" | hostname="newNAT2021" | ||
− | #ifconfig_vmx0="DHCP" | + | #ifconfig_vmx0="DHCP" #从原来的dhcp可得到网卡名 |
ifconfig_vmx0="inet 192.168.10.239 netmask 255.255.254.0" | ifconfig_vmx0="inet 192.168.10.239 netmask 255.255.254.0" | ||
defaultrouter="192.168.10.1" | defaultrouter="192.168.10.1" | ||
第29行: | 第29行: | ||
</pre> | </pre> | ||
− | ==see also | + | ==网络重启== |
+ | <pre> | ||
+ | 网卡重启命令如下 | ||
+ | /etc/rc.d/netif restart | ||
+ | |||
+ | |||
+ | 重启无线网上 | ||
+ | sudo ifconfig wlan0 down | ||
+ | |||
+ | sudo ifconfig wlan0 up</pre> | ||
+ | |||
+ | =jial= | ||
+ | qjail | ||
+ | =see also= | ||
[https://www.cyberciti.biz/faq/freebsd-install-nginx-webserver/ FreeBSD Install Nginx Webserver Tutorial] | [https://www.cyberciti.biz/faq/freebsd-install-nginx-webserver/ FreeBSD Install Nginx Webserver Tutorial] | ||
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