王殊勋的个人博客

只要开始,虽远不迟!

新建文本文件填入规则, 然后选择文件然后选择另存为, 文件名填.htaccess, 保存类型选择所有文件, 最后单击保存. .htaccess文件就建立好了.
阅读全文 »

第一种: 1 vi /etc/sysconfig/network-scripts/ifcfg-eth0 ifcfg-eth0的配置文件里保存了以前的MAC地址,就把这一行删除掉在重启网卡. 第二种: 1 rm -rf /etc/udev/rules.d/70-persistent-net.rules 删除后重启机器,因为这个文件绑定了网卡和mac地址,所以换了网卡以后MAC地址变了,所以不能正常启动,也可以直接编辑这个配置文件把里面的网卡和mac地址修改乘对应的,不过这样多麻烦,直接删除重启,它会重新自动生成.
阅读全文 »

1 2 3 4 5 6 7 8 netstat -anp | grep mysql #查看数据库端口 ps -eaf|grep monit #查看monit服务是否运行 lsof -i:8080 #查看端口被什么程序占用了 service atd status #查看服务是否运行 kill -9 $(ps -ef | grep httpd | awk '{print $2}') #进程僵死的处理方法 df -l #磁盘情况 fdisk -l #磁盘挂载情况 rpm -ql mplayer | cat -n #查看软件安装位置
阅读全文 »

出现以下错误: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 In file included from /usr/local/src/APC-3.1.5/apc.c:38: /usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory In file included from /usr/local/src/APC-3.1.5/apc.c:38: … … /usr/local/src/APC-3.1.5/apc.c: In function 'apc_r
阅读全文 »

登陆信息显示数据 : /etc/issue 和 /etc/motd 还记得我们登陆终端机的时候,会有几行提示的字符串. 这些设置是在 /etc/issue里面. 这些都是我们可以自己设置. 我们可以使用Vi来打开. 1 vi /etc/issue 一般的设置都是只有:Kernel r on an m 这些r m是代表什么呢? 1 2 3 4 5 6 7 8 9 d 本地端时间的日期 l 显示第几个终端机的接口; m 显示硬件的等级(i386/i486/i586/i686....) n 显示主机的网络名称 o 显示 domain name r
阅读全文 »

首先修改配置文件: 1 vi /etc/ssh/sshd_config 1、修改SSH端口 找到#Port 22一段,这里是标识默认使用22端口,修改为如下: 1 2 Port 22 Port 50000 然后保存退出,重启sshd. 1 /etc/init.d/sshd restart 这样SSH端口将同时工作与22和50000上. 现在编辑防火墙配置: 1 vi /etc/sysconfig/iptables 启用50000端口,重启防火墙: 1 /etc/init.d/iptables restart 现在请使用ssh工具连接5000
阅读全文 »

安装ruby ./configure时出现错误: 1 C preprocessor "/lib/cpp" fails sanity check 原因: 缺少包安装linux-kernel-headers. 解决: 有桌面系统进入yast2搜索linux-kernel-headers安装. 没有桌面系统去http://rpm.pbone.net/搜索下载rpm安装. 下载地址: 1 2 wget ftp://ftp.pbone.net/mirror/ftp.opensuse.org/distribution/11.2/repo/oss/suse/noarch/linux-ke
阅读全文 »

首先,我们必须要知道自己的VPS是否支持PPTP. 1 2 3 4 cat /dev/ppp cat: /dev/ppp: No such device or address cat /dev/net/tun cat: /dev/net/tun: File descriptor in bad state 我记得有一篇如果你的结果和我上面的两个结果不一样的话,那么你是肯定无法正常使用PPTP的哦. 不一样的话也好办,直接去tk VPS客服基本都会给开通的,我的VPN假架设在VPSYOU的openvz上,我联系客服10分钟后开通,赞一个先. 如果你的结果和我一样的话,那么就继续往下看吧.
阅读全文 »

DHCP服务的配置,下载最新版DHCPD: 1 wget http://ftp.isc.org/isc/dhcp/dhcp-4.1.1b1.tar.gz 解压、安装、配置: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [root@localhost src]# tar -zxvf dhcp-4.1.1b1.tar.gz [root@localhost src]# cd dhcp-4.1.1b1 [root@localhost dhcp-4.1.1b1]# configure [root@localhost d
阅读全文 »
0%