linux

A collection of 25 posts
linux

apt限制同时下载数量

Queue-Mode 设置选项 默认值为 host 对每个host发起一个连接。当设为access时,对每个URI类型发起一个连接。由于大部分为http,因此也大致满足要求 永久设置 echo 'Acquire::Queue-Mode "access";' >/etc/apt/apt.conf.d/75download 临时设置 apt -o Acquire::Queue-mode=access upgrade Para valorar camisetas de selecciones nacionales con criterios claros, es recomendable revisar el equipo, la temporada y el tipo de camiseta. Las
linux

树莓派Kiosk(展台模式)设置

安装Raspbian Buster lite 启用SSH boot分区下新建名称为ssh的空文本 添加WiFi信息 boot分区下新建wpa_supplicant.conf country=CN ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="NETWORK-NAME" psk="NETWORK-PASSWORD" } 设置自动启动 sudo raspi-config 菜单中选择 Boot Options Desktop CLI Console Autologin 更换自动登录用户 nano /etc/systemd/system/getty@tty1.service.d/autologin.conf 替换
1 min read
centos

centos 7 firewalld常用命令

将ip添加到zone sudo firewall-cmd --permanent --zone=work --add-source=192.168.0.0/24 将某个网口添加到zone sudo firewall-cmd --permanent --zone=work --add-interface=eth0 在某个zone打开端口 sudo firewall-cmd --permanent --zone=work --add-port=8080-8090/tcp 永久打开一个端口 firewall-cmd --permanent --add-port=8080/tcp 永久关闭一个端口 firewall-cmd --permanent --remove-port=8080/tcp 永久打开某项服务 firewall-cmd --permanent --add-service=http 永久关闭某项服务 firewall-cmd --permanent --remove-service=
1 min read
centos

systemd服务创建

在/etc/systemd/system中新建servicename.service文件。 按以下模板填入内容 [Unit] Description=servicedescription After=network.target [Service] Type=simple WorkingDirectory=/path/to/service User=http Group=http ExecStart=/usr/bin/service(startscript) ExecStop=/usr/bin/service(stopscript) Restart=always SyslogIdentifier=servicename [Install] WantedBy=multi-user.target 之后修改启动脚本/程序的selinux属性 semanage fcontext -a -t unconfined_exec_t
1 min read
centos

hyper-v centos安装后优化

安装常用软件 包括nano文字编辑器、wget、curl、lsof、bash-completion和ifconfig sudo yum install -y nano bash-completion net-tools wget curl lsof policycoreutils-python 移除不用的服务 sudo systemctl stop iprdump iprinit iprupdate NetworkManager sudo systemctl disable iprdump iprinit iprupdate NetworkManager sudo yum remove -y btrfs-progs* iprutils ivtv* iwl*firmware libertas* NetworkManager* aic94xx-firmware* alsa-* 可选移除不用的服务 systemctl stop postfix avahi-daemon.
2 min read