### Install and Configure Chrony for Time Synchronization Source: https://www.idcsmart.com/helps_content/237.html Install the chrony package and configure it to synchronize with an NTP server. This is crucial for ensuring certificates are validated correctly. ```bash yum install -y chrony ``` ```bash firewall-cmd --zone=public --add-port=123/udp --permanent && firewall-cmd --reload ``` ```bash cat > /etc/chrony.conf << EOF server cn.pool.ntp.org iburst stratumweight 0 driftfile /var/lib/chrony/drift rtcsync makestep 10 3 allow 0.0.0.0/0 bindcmdaddress 127.0.0.1 bindcmdaddress ::1 keyfile /etc/chrony.keys commandkey 1 generatecommandkey noclientlog logchange 0.5 logdir /var/log/chrony EOF ``` ```bash systemctl restart chronyd ``` ```bash systemctl enable chronyd ``` ```bash chronyc sources -v ``` -------------------------------- ### View Network Configuration with ip a Source: https://www.idcsmart.com/helps_content/239.html Use the `ip a` command to view current network configurations, especially if `ifconfig` is not installed. ```bash ip a ``` -------------------------------- ### List Network Interface Files Source: https://www.idcsmart.com/helps_content/239.html List all network interface configuration files in the current directory. ```bash ls ``` -------------------------------- ### Navigate to Network Configuration Directory Source: https://www.idcsmart.com/helps_content/239.html Change directory to the network configuration path to access interface files. ```bash cd /etc/sysconfig/network-scripts/ ``` -------------------------------- ### 关闭Windows防火墙 Source: https://www.idcsmart.com/helps_content/135.html 使用`netsh`命令禁用所有网络配置文件的防火墙状态。请谨慎使用,确保了解安全风险。 ```bash netsh Advfirewall set allprofiles state off ``` -------------------------------- ### 修改远程连接端口 Source: https://www.idcsmart.com/helps_content/135.html 通过修改注册表来更改Windows系统的远程桌面连接端口。请将`{端口}`替换为所需的端口号。 ```bash reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp" /v "PortNumber" /t REG_DWORD /d "{端口}" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v "PortNumber" /t REG_DWORD /d "{端口}" /f ``` -------------------------------- ### View Network Configuration with ifconfig Source: https://www.idcsmart.com/helps_content/239.html Use the `ifconfig` command to view current network configurations. If `ifconfig` is not available, use `ip a`. ```bash ifconfig ``` -------------------------------- ### Windows 7/08/12 防火墙开关脚本 Source: https://www.idcsmart.com/helps_content/135.html 提供Windows 7/08/12系统上用于开启和关闭防火墙的`netsh`命令。 ```bash netsh advfirewall set allprofiles state off //关闭 netsh advfirewall set allprofiles state on //开启 ``` -------------------------------- ### 开启远程桌面连接 Source: https://www.idcsmart.com/helps_content/135.html 通过修改注册表来开启Windows系统的远程桌面连接功能。参数`0`表示开启,`1`表示关闭。 ```bash reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f ``` -------------------------------- ### Windows 10/16/19 防火墙关闭脚本 Source: https://www.idcsmart.com/helps_content/135.html 为Windows 10/16/19系统提供关闭防火墙的脚本命令。这两条命令需要一起执行。 ```bash netsh firewall set opmode mode=disable profile=ALL netsh firewall set opmode mode=disable ``` -------------------------------- ### Add Virtual Memory (Linux) Source: https://www.idcsmart.com/helps_content/244.html This snippet demonstrates how to add virtual memory to a Linux system, which can help resolve issues with low memory configurations, such as database failures or control panel downtime. Execute these commands on the main control server. ```bash fallocate -l 4G /home/swap && chmod 0600 /home/swap ``` ```bash mkswap /home/swap ``` ```bash swapon /home/swap ``` ```bash echo "/home/swap swap swap defaults 0 0" >> /etc/fstab ``` -------------------------------- ### 添加防火墙规则以允许TCP端口 Source: https://www.idcsmart.com/helps_content/135.html 使用`netsh`命令添加防火墙规则,允许指定的TCP端口通过。适用于需要开放特定端口的服务。 ```bash netsh advfirewall firewall add rule name={项目名称} protocol=TCP localport={端口} dir=in action=allow ``` -------------------------------- ### Register Account Form Source: https://www.idcsmart.com/helps_content/233.html Form for creating a new account, including fields for username, password, and verification code. Requires accepting terms and conditions. ```html
``` -------------------------------- ### Edit Network Interface Configuration Source: https://www.idcsmart.com/helps_content/239.html Use `vim` or `vi` to edit a specific network interface configuration file. Enter insert mode with 'i', delete the extra IP and subnet mask, then exit insert mode with 'esc' and save changes with ':wq'. Be cautious not to delete all IPs on a live server. ```bash vim ifcfg-phy-ext ``` -------------------------------- ### Database Import in Baota Panel Source: https://www.idcsmart.com/helps_content/233.html Instructions for importing a database file within the Baota Panel. This is part of a database migration process. ```html点击后出现该界面,先上传第一步下载的数据库文件成功后再导入即搬迁成功