猫言猫语

严以律己·宽以待人·自强不息·知行合一

CentOS 8 使用 iptables firewalld 后端实现

| CentOS 8 使用 iptables firewalld 后端实现已关闭评论

CentOS8 中 firewalld 默认使用的是 nftables,如果不想使用 nftables,还想使用老的 iptables 作为防火墙的后端实现,可以通过修改 /etc/firewalld/firewalld.conf 配置文件,将 FirewallBackend 配置项修改为 iptables 即可

# FirewallBackend
# Selects the firewall backend implementation.
# Choices are:
#	- nftables (default)
#	- iptables (iptables, ip6tables, ebtables and ipset)
FirewallBackend=iptables

macOS 管理 tftp 服务

| macOS 管理 tftp 服务已关闭评论

启动 tftp 服务的步骤

sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
sudo launchctl start com.apple.tftpd

tftp 服务的根目录在 /private/tftpboot 下

停止 tftp 服务的步骤

sudo launchctl unload -F /System/Library/LaunchDaemons/tftp.plist
sudo launchctl stop com.apple.tftpd

macOS 安装 DOSBox

| macOS 安装 DOSBox已关闭评论

brew install dosbox --cask
==> Installing Cask dosbox
==> Moving App 'dosbox.app' to '/Applications/dosbox.app'
🍺  dosbox was successfully installed!

macOS 更新全部 cask 应用

| macOS 更新全部 cask 应用已关闭评论

默认 upgrade 是更新非 cask 的应用,如果想全部更新,需要增加 2 个参数

brew update
brew upgrade --cask --greedy

pecl 安装特定版本的 PHP 扩展

| pecl 安装特定版本的 PHP 扩展已关闭评论

默认使用 pecl 安装的 PHP 扩展是最新版本的,例如以下将安装 oci8-3.3.0

pecl install oci8

假如我们想安装 oci8-2.2.0 则需要需要使用以下的命令进行安装

pecl install oci8-2.2.0

Rocky 8 安装 php 8.2

| Rocky 8 安装 php 8.2已关闭评论

dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf module install php:remi-8.2
dnf install php
[root@rocky8 yum.repos.d]# php -v
PHP 8.2.11 (cli) (built: Sep 26 2023 11:11:58) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.2.11, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.11, Copyright (c), by Zend Technologies

Rocky 8 安装 conda 环境

| Rocky 8 安装 conda 环境已关闭评论

yum install conda
source /etc/profile.d/conda.sh
conda create -n python311 python=3.11
conda activate python311

当前 python 就变成 3.11 的环境了

Ubuntu 20.04 Focal 安装图形化环境

| Ubuntu 20.04 Focal 安装图形化环境已关闭评论

sudo sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
sudo apt update
sudo apt install -y tasksel
sudo tasksel install ubuntu-desktop-minimal

然后正常重启就可以了