关机 (系统的关机、重启以及登出 )shutdown -h now 关闭系统(1)init 0 关闭系统(2)telinit 0 关闭系统(3)shutdown -h hours:minutes & 按预定时间关闭系统shutdown -c 取消按预定时间关闭系统shutdown -r now 重启...
分类:
系统相关 时间:
2014-07-23 12:30:06
阅读次数:
242
1 配对原则alloc – releasenew – releaseretain - releasecopy – release2 new和alloc-init的区别(1)区别只在于alloc分配内存的时候使用了zone. 这个zone是个什么呢? 它是给对象分配内存的时候,把关联的对象分配到一个相...
分类:
其他好文 时间:
2014-07-23 11:48:56
阅读次数:
305
修改/etc/init/tty.conf文件将exec /sbin/mingetty $TTY改为exec /sbin/mingetty --autologin root $TTY或者修改/etc/inittab文件将3改为1参考网址:http://zhumeng8337797.blog.163.c...
分类:
系统相关 时间:
2014-07-23 11:34:36
阅读次数:
366
1. 修改文件: /etc/ssh/sshd_config
#PermitRootLogin yes
修改为:
PermitRootLogin no
2. 重启ssh进程
/etc/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
TIPS: 用root账号登陆时,如果只看到井号,输入bash,就可以正常显示,登陆账号,主机...
分类:
其他好文 时间:
2014-07-22 23:52:28
阅读次数:
229
python内置的描述符python有些内置的描述符对象,property、staticmethod、classmethod,python实现如下:class Property(object): def __init__(self,getf,setf,delf,doc): sel...
分类:
编程语言 时间:
2014-07-22 23:21:47
阅读次数:
335
linux有自己一套完整的启动体系,抓住了linux启动的脉络,linux的启动过程将不再神秘。本文中假设inittab中设置的init tree为:/etc/rc.d/rc0.d /etc/rc.d/rc1.d /etc/rc.d/rc2.d /etc/rc.d/rc3.d /etc/rc.d/r...
分类:
其他好文 时间:
2014-07-22 23:13:53
阅读次数:
223
出错的原因是adb的port被其它程序的进程占据了,所以要做的就是找到并kill该进程。步骤:、1、在cmd中运行adb nodaemon server,查看adb的port号是多少,普通情况下是5037(why?我也不太懂,或许软件使用的port号是固定的)2、再运行netstat -ano | ...
分类:
数据库 时间:
2014-07-22 22:48:32
阅读次数:
248
Python的基础知识:if-elif-elsewhile-elsebreakcontinuefrom..importimport..dir(),当提供一个模块明的时候,返回模块定义的名称列表列表[],元祖(),字典{}面向对象编程:self,__init__方法try-excepttry-fina...
分类:
编程语言 时间:
2014-07-22 22:32:16
阅读次数:
249
httpd:安装方法:yum-yinstallhttpdrpm-qlhttpd#查看有哪些配置文件的; /etc/httpd/conf/magic#定义本地主机如何识别mime格式的,通过mime编码而来的其他的非纯文本文档。/etc/rc.d/init.d/httpd#服务脚本的启动文件/etc/sysconfig/httpd#服务脚本的配置文件我们将/etc/s..
分类:
其他好文 时间:
2014-07-22 18:26:52
阅读次数:
284
mysql-uroot-e"showprocesslist"|grep-i"Locked">>locklist.txt;
forlineinawk‘{print$1}‘locklist.txt
do
echo"kill$line;">>lock_kill.sql
done查看mysql数据库表大小#!/bin/bash
database=cms
user=root
password=‘123456‘
mysql-u${user}-p${password}-e"use$d..
分类:
数据库 时间:
2014-07-22 18:15:42
阅读次数:
334