Archive

Archive for the ‘Linux教程’ Category

centos 6.5 64bit升级内核kernel-2.6.32-504报错

November 13th, 2017 1 comment

centos 6 64bit修改内核安装锐速加速教程可以参考:

centos6.8无法安装锐速的解决方法|附锐速安装过程

降级内核

wget http://ftp.scientificlinux.org/linux/scientific/6.5/x86_64/updates/security/kernel-2.6.32-504.el6.x86_64.rpm

rpm -ivh kernel-2.6.32-504.el6.x86_64.rpm –force

reboot重启

安装锐速 wget -N –no-check-certificate https://raw.githubusercontent.com/91yun/serverspeeder/master/serverspeeder-all.sh && bash serverspeeder-all.sh

今天又遇到了新的报错:默认centos 6.5 64bit安装锐速加速不支持,需要修改内核,今天升级的过程中报错,缺少一个依赖kernel-firmware >= 2.6.32-504.el6 is needed by kernel-2.6.32-504.el6.x86_64。 [root@localhost ~]# rpm -ivh kernel-2.6.32-504.el6.x86_64.rpm –force warning: kernel-2.6.32-504.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY error: Failed dependencies: kernel-firmware >= 2.6.32-504.el6 is needed by kernel-2.6.32-504.el6.x86_64

Read more…

Categories: linux基础 Tags: ,

putty登录linux简单教程

November 9th, 2017 No comments

很多不会linux朋友,想快速的上手linux,想登录进去linux看看里面到底有啥宝贝。

首先,你得去下载一个putty类似的ssh登录工具。

linux用户putty软件下载页面:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

对应上图的地方,输入IP,端口,然后点open,进去ssh.

Read more…

Categories: linux基础 Tags: ,

收个whmcs官方正版终身授权,要可以push到我账户的这种。

October 25th, 2016 No comments

收个whmcs官方正版终身授权,要可以push到我账户的这种。
有的话,联系QQ:465793847

history命令查询过去执行了哪些命令

May 4th, 2016 No comments

敲history,会显示,下面显示我截止到目前,共有204个历史记录。

189 ulimit -a
190 ulimit -f 10240
191 ulimit -a
192 dd if=/dev/zero of=123 bs=1M count=20
193 echo $username
194 username=${username-root}
195 ech
196 echo $username
197 usermae=”yqf”
198 username=${username-root}
199 echo $username
200 username=”yqf”
201 echo $username
202 alias
203 ls
204 history

history n,可以显示最近的几条命令。
[root@v157-7-xx-109 ~]# history 3
203 ls
204 history
205 history 3

通常系统默认是显示最近的1000条命令
[root@v157-7-xx-109 ~]# echo $HISTSIZE
1000

Categories: linux基础 Tags: , ,

alias命令别名设置

May 4th, 2016 No comments

[root@v157-7-xxx-109 ~]# alias
alias cp=’cp -i’
alias l.=’ls -d .* –color=auto’
alias ll=’ls -l –color=auto’
alias ls=’ls –color=auto’
alias mv=’mv -i’
alias rm=’rm -i’
alias which=’alias | /usr/bin/which –tty-only –read-alias –show-dot –show-tilde’

可以查看系统默认的一些命令别名设置,比如alias rm=’rm -i’,实际上我们敲rm这个命令,等同于执行rm -i这个命令,带了个i参数,可以避免误删文件。

Categories: linux基础 Tags: ,

通过ulimit命令限制用户使用某些系统资源

May 4th, 2016 No comments

[root@v157-7-xx-xx ~]# ulimit -a
core file size (blocks, -c) 0   【0代表没限制】
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited【可创建单一文件大小,也是没限制】
pending signals (-i) 7825
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024【可以同时打开的文件数量】
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 7825
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

敲个命令,设置下将可以创建的单一文件大小设置成10MB

[root@v157-7-xxx-109 ~]# ulimit -f 10240
[root@v157-7-xxx-109 ~]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) 10240
pending signals (-i) 7825
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 7825
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

下面咱们再创建下大小为20M的文件,显示失败。

[root@v157-7-xxx-109 ~]# dd if=/dev/zero of=123 bs=1M count=20
File size limit exceeded (core dumped)

Categories: linux基础 Tags: ,

linux分区要分几个区合适呢?

April 15th, 2015 No comments

如果是linux小白,刚接触linux没几天,那就还是默认的linux分区比较好,最最简单的是分一个/根目录和swap交换内存就ok了。

如果接触linux有一段时间了,可以根据自己的需求进行分区。

比如按照下面的目录分区,最好是一个目录一个独立分区最好,如果某个磁盘的分区坏掉了,别的分区数据不受影响。

/boot    【开机启动,只要给100M即可】

/            【根目录】

/usr      【放软件的地方,大概2-5G】

/home  【比如安装Directadmin面板,很多网站数据,默认就这个目录,要分大点儿】

/var       【比如有邮件服务器,这个分区要大点】

/tmp      【放临时文件的地方,看着设置】

Swap    【交换内存,看着设置,大概是内存的1.5-2倍就ok】

Categories: linux基础 Tags: ,