#!/usr/bin/env bash time=$(curl -G -s http://34.0.7.227:9338/traffic/syncDateTime) if [ ! -n "$time" ]; then echo"time is null...." else date -s "${time}" hwclock -w fi
[mysqld] # # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock //设置端口号 port= 3333
#!/bin/sh # chkconfig: 2345 90 10 # description: Redis is a persistent key-value database # Simple Redis init.d script conceived to work on Linux systems # as it does use of the /proc filesystem. # 如果redis设置了密码,则$CLIEXEC -a $PASSWORD -p $REDISPORT shutdown 需要加一个参数
case"$1"in start) if [ -f $PIDFILE ] then echo"$PIDFILE exists, process is already running or crashed" else echo"Starting Redis server..." $EXEC$CONF fi ;; stop) if [ ! -f $PIDFILE ] then echo"$PIDFILE does not exist, process is not running" else PID=$(cat$PIDFILE) echo"Stopping ..." $CLIEXEC -a $PASSWORD -p $REDISPORT shutdown while [ -x /proc/${PID} ] do echo"Waiting for Redis to shutdown ..." sleep 1 done echo"Redis stopped" fi ;; *) echo"Please use start or stop as first argument" ;; esac
ftpd_anon_write --> off ftpd_connect_all_unreserved --> off ftpd_connect_db --> off ftpd_full_access --> on ftpd_use_cifs --> off ftpd_use_fusefs --> off ftpd_use_nfs --> off ftpd_use_passive_mode --> off
setsebool -P ftpd_full_access 1 # 设置ftpd_full_access的权限为 on
setenforce 1 # 开启 selinux
这时 selinux 已经开放了 vsftpd 的权限
给 ftp 用户的 home 目录赋予写的权限 chmod a+w /var/ftp
vsftpd 在新版本时,如果检测到用户不能跳出当前的 home 目录,那么用户的 home 不能有写的权限,会报 500 OOPS: vsftpd: refusing to run with writable root inside chroot() 错误,这时就尴尬了
解决方式: 在配置文件中添加: allow_writeable_chroot=YES
重启 vsftpd
无法连接 FTP 服务器
使用 FTP 工具连接失败,报如下错误:
1 2 3 4 5 6 7 8
状态: 连接建立,等待欢迎消息... 状态: 不安全的服务器,不支持 FTP over TLS。 命令: USER ftp 响应: 331 Please specify the password. 命令: PASS ****** 响应: 530 Login incorrect. 错误: 严重错误: 无法连接到服务器 状态: 已从服务器断开
/* - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion. - If you are building a RECURSIVE (caching) DNS server, you need to enable recursion. - If your recursive DNS server has a public IP address, you MUST enable access control to limit queries to your legitimate users. Failing to do so will cause your server to become part of large scale DNS amplification attacks. Implementing BCP38 within your network would greatly reduce such attack surface */ recursion yes;
dnssec-enable yes; dnssec-validation yes;
/* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key";