Warning: Undefined array key "cperpage" in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 230

Warning: Undefined variable $output in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 300

Warning: Undefined variable $fixed_tags in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 301

Warning: Undefined variable $isshowdots in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 302

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 305

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 308

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 311

Warning: Undefined variable $post in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 320

Warning: Attempt to read property "ID" on null in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 320

Warning: Undefined variable $post in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 320

Warning: Attempt to read property "ID" on null in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 320

Warning: Undefined variable $more_text_link in /www/wwwroot/www.now163.com/wp-content/themes/typology/functions.php on line 320
Linux – 理想社会

CategoryLinux

centos7安装cmake3版本

c

1、首先安装编译需要的工具包:
yum install -y gcc gcc-c++ make automake wget
2、去下载需要的cmake版本
3、解压cmake3.xx.x,进入源码文件夹
tar zxvf cmake3.xx.x && cd cmake3.xx.x
4、运行booststrap
./bootstrap
5、编译
gmake
6、安装
gmake install
安装完成后可以通过cmake –version查看当前的版本。

批量设置用户quota磁盘配额

1、先给一个已存在的用户建好配额: a:修改/etc/fstab文件(如:LABEL=/     /  ext3  defaults,usrquota,grquota    1   1) b:重新启动系统使设置生效:reboot c:创建配额文件:quotacheck -cmug / (查看已建立的配额文件:ls /aquota.*) d:设置配额:edquota -u 用户名 使用quota -u 用户名查询配额 repquota -u /  显示配额 quotaoff |on -auvg关闭或开启配额 2、#users=`awk ‘BEGIN {FS=”:”} {if ($3>500) print $1}’ /etc/passwd`(第一个和最后一个符号是 `反撇号即esc下面的键) 3、显示上面的赋值:echo $users...

ubuntu20.04 bind 服务添加日志信息

u

网络中心发来了实验室内挖矿的记录,要求排查。看记录的日志是通过dns查询来判断是否有挖矿行为的。 我们有自建DNS服务器。开启日志记录,就可以查到是哪一台内网机器在挖矿了。 在named.conf添加如下信息开启日志记录。 logging { channel query_log { #这段是对日志文件的定义 file “query.log” versions 5 size 20m; #定义文件名,文件大小 severity info; #日志级别 print-time yes; #是否输出日期 print-category yes; #是否输出日志类型 }; category queries { query_log; }; }; 修改后保存,重启一下bind服务。 systemctl restart bind9...

Linux logout all other users

L

Linux logout all other users If you would like to logout other users, you must login as root user. Next you need to use the pkill command. pkill command syntax The syntax is: pkill -KILL -u {username} Warning: Do not kill root user or other system level user process. The following example, will kill all process on your server. Do not run the pkill for root user: pkill -KILL -u root To see list of...

Linux下批量创建删除账号

L

1、批量创建用户 cat adduser.sh #!/bin/bash # for username in $(more users.list) do if [ -n $username ] then useradd $username -g student -d /pub/home/$username echo echo $username"xyz" | passwd --stdin $username chage -d 0 $username echo $username "has been created!" else echo "The username is null!" fi done 2、批量删除用户 cat deluser.sh #!/bin/bash # for username in $(more users.list) do if [ -n $username ]...

ipmitool启动报错,提示No such file or directory

i

当提示: [root@localhost ~]# ipmitool sdr Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory Get Device ID command failed Unable to open SDR for reading 需要添加如下: [root@localhost ~]# modprobe ipmi_watchdog [root@localhost ~]# modprobe ipmi_poweroff [root@localhost ~]# modprobe ipmi_devintf [root@localhost ~]# modprobe ipmi_si [root@localhost ~]# modprobe...

Exchange2013中断POP3和IMAP4的解决办法

E

Exchange服务器意外重启。之后用户发现无法通过POP3和IMAP4收邮件,连接后会提示ssl error5。 但是Exchange模式可以用。 去服务器上检查,相应的pop3和imap服务均已启动。 端口是正常的,配置文件也没有变化。 在服务器上用foxmail测试。地址填写127.0.0.1时却正常。 【解决办法】 检查服务器组件: 发现有2个组件处于inactive。 使用以下命令激活组件  Set-ServerComponentState -Identity xxmail1 -Component PopProxy  -Requester HealthAPI -State Active  Set-ServerComponentState -Identity xxmail1 -Component ImapProxy -Requester HealthAPI ...

ubuntu14.04关闭ipv6

u

编辑/etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1

然后更新一下。
sudo sysctl -p

接着就可以用 ifconfig 或 ip a 命令看看是否已经没有 IPv6 地址了。

Openwrt路由器安装KMS服务激活Windows Office

O

源地址在这里。
Emulated KMS Servers on non-Windows platforms

它同时提供了一个python版本。不受系统限制。可以安装在任意支持python(2.6 higher)的系统上。
把它放到Openwrt路由器里,实现自动对局域网内机器进行Windows,Office进行激活。注意,此脚本需要用掉大概12m内存。我用的360路由,显示占用10%内存。

Ubuntu14.04 安装pptp服务

U

apt-get install pptpd
vim /etc/pptpd.conf
localip 11.22.33.44  #这个就是你当前主机的IP地址
remoteip 10.0.0.2-100  #这个就是给客户端分配置的IP地址池
vim /etc/ppp/options
ms-dns 8.8.8.8
ms-dns 8.8.4.4

Your sidebar area is currently empty. Hurry up and add some widgets.