摘要: php连接mysql连接其他对于数据库本身的操作都通过mysql_query()来执行,先用mysql_select_db()选择要操作的数据库,再mysql_query()即可,执行成功则mysql_query的返回值为真。select查询数据库关闭和内存释放mysql_free_result();mysql_close("$conn"); 阅读全文
posted @ 2014-04-11 17:05 Verruckt 阅读(134) 评论(0) 推荐(0) 编辑
摘要: grep -v ^# /home/test > /home/test2 阅读全文
posted @ 2014-04-10 17:09 Verruckt 阅读(845) 评论(0) 推荐(0) 编辑
摘要: 连接memcachedconnect('localhost',11211) or die("connected failed !!!");?>写入数据set('key1','test value',0,20);?>读取数据get('key1');echo $key1; ... 阅读全文
posted @ 2014-04-10 10:29 Verruckt 阅读(148) 评论(0) 推荐(0) 编辑
摘要: memcached的复制功能下载对应的repcached版本:http://sourceforge.jp/projects/sfnet_repcached/,必须版本对应才行当前只支持到1.2.8版本的memcached下载解压后进行编译./configure --prefix=/usr/local/memcached/ --enable-replicationmake && make install启动master (172.16.1.12)memcached -v -p 11211 -u root //-v是为了显示memcached提示信息[root@localhost 阅读全文
posted @ 2014-04-10 09:39 Verruckt 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 一、安装apacheyum install httpd二、安装phpyum install php*三、apache配置vi /etc/httpd/conf/httpd.conf添加AddType application/x-httpd.php .php四、将下载好的memadmin压缩包拷贝至/var/www/html下解压 阅读全文
posted @ 2014-04-09 16:18 Verruckt 阅读(153) 评论(0) 推荐(0) 编辑
摘要: parted /dev/sdb //partedsdb磁盘mklabel gpt //设置该磁盘分区为gptmkpart primary 0% 100% //划分分区大小,这里将整个磁盘分为一个区mkfs.ext4 -T largefile /dev/sdb1//格式化为ext4,一定要用-Tlargefile,否则很慢 阅读全文
posted @ 2014-03-22 12:24 Verruckt 阅读(226) 评论(0) 推荐(0) 编辑
摘要: du -h --max-depth=1 work/testing 阅读全文
posted @ 2014-03-22 12:24 Verruckt 阅读(99) 评论(0) 推荐(0) 编辑
摘要: mount -t cifs -o useaname=***,password=***//172.16.82.32/test/mntusername,password分别为windows那边允许共享的账户密码开机自动挂载vi /etc/fstab添加//192.168.1.1/tools /tools cifs defaults,auto,username=administrator,password=123 0 0 阅读全文
posted @ 2014-03-22 12:23 Verruckt 阅读(137) 评论(0) 推荐(0) 编辑
摘要: snmp安装:yum install net-snmp*配置/etc/snmp/snmpd.conf:com2sec notConfigUser 192.168.79.129 publicaccess notConfigGroup "" any noauth exact all none noneview all include .1 80 去掉#号启动snmp服务:service snmpd start设置开机自启动:chkconfig snmpd on关闭防火墙snmp.conf#### # First, map the community name "pub 阅读全文
posted @ 2014-03-22 12:22 Verruckt 阅读(318) 评论(0) 推荐(0) 编辑
摘要: suse刚装完,开始用ssh的时候,总会遇到这样的问题:输入了用户名以后,等半天才出输入密码的框,很是急人。这是dns反查造成的。解决方法:编辑 /etc/ssh/sshd_conf , 将 #UseDNS yes 取消注释,设为no ,重启sshd( /etc/rc.d/sshd restart)UseDNS no //这儿不能写为:No,大写,会出错的然后:/etc/rc.d/sshd restar 阅读全文
posted @ 2014-03-22 12:16 Verruckt 阅读(150) 评论(0) 推荐(0) 编辑