日常 curl下载 https://curl.haxx.se/download.html 设置字体 通过 chcp命令改变代码页,UTF-8的代码页为65001 chcp 65001 属性- 设置字体- Lucida Console %JAVA_HOME%\jre\bin;%CURL_HOME%;%M2_HOME%\bin;C:\ProgramData\Orac
curl下载 https://curl.haxx.se/download.html 设置字体 通过 chcp命令改变代码页,UTF-8的代码页为65001 chcp 65001 属性-> 设置字体-> Lucida Console %JAVA_HOME%\jre\bin; %CURL_HOME%; %M2_HOME%\bin; C:\ProgramData\Oracle\Java\javapath; %SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem; %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; C:\Program Files\Java\jdk1.8.0_131\bin; C:\Program Files\MySQL\MySQL Utilities 1.6\; C:\Program Files\TortoiseSVN\bin linux 各种安装地址 https://www.server-world.info/en/ 命令补全 yum install bash-completion 安装nodejs npm rpm -ivh https://kojipkgs.fedoraproject.org//packages/http-parser/2.7.1/3.el7/x86_64/http-parser-2.7.1-3.el7.x86_64.rpm && yum -y install nodejs 安装jdk rpm -ivh jdk-8u144-linux-x64.rpm 安装redis 设置密码 vim /etc/redis.conf #requirepass foobared去掉注释,foobared改为自己的密码,我在这里改为 requirepass 123456 source /etc/redis.conf 重启配置 输入 auth 123456 软连接 mv libjpeg.so.8 ln -s libxerces-c.8.so libjpeg.so.8 安装wget sudo yum -y install wget 安装gcc yum -y install gcc 安装rz sz cd /tmp wget http://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz tar zxvf lrzsz-0.12.20.tar.gz && cd lrzsz-0.12.20 ./configure && make && make install 上面安装过程默认把lsz和lrz安装到了/usr/local/bin/目录下,现在我们并不能直接使用,下面创建软链接,并命名为rz/sz: cd /usr/bin ln -s /usr/local/bin/lrz rz ln -s /usr/local/bin/lsz sz 针对端口开放防火墙 firewall-cmd --zone=public --add-port=端口号/tcp --permanent firewall-cmd --reload 安装mysql 关闭防火墙 设置user表root localhost 为 % 配置文件路径: /full/path/mysql/bin/my.cnf (默认为/etc/my.cnf ) [client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] init_connect='SET collation_connection = utf8_unicode_ci' init_connect='SET NAMES utf8' character-set-server=utf8 collation-server=utf8_unicode_ci skip-character-set-client-handshake *注意: 在 mysqld 中使用 default-character-set 设置, mysql 启动会报错而无法启动。 mysql: 今天:TO_DAYS(login_time) = TO_DAYS(NOW()) 昨天:TO_DAYS(NOW()) - TO_DAYS(created_date) <= 1 7天:DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= DATE(created_date) 30天:DATE_SUB(CURDATE(), INTERVAL 30 DAY) < DATE(created_date) COUNT(IF(task_status =2,TRUE,NULL)) as waitNum, 时间差转换为分钟 TIMESTAMPDIFF(MINUTE,start_date,end_date) date_format('2008-08-08 22:23:01', '%Y%m%d%H%i%s') time_format(timediff(now(), task.start_date),'%H小时%i分钟') str_to_date('08/09/2008', '%m/%d/%Y'); cast( type as DECIMAL(10,0))