![]() |
|
Spaces home 孤叶飘零's Little HomePhotosProfileFriendsMore ![]() | ![]() |
孤叶飘零's Little Home |
||||||||||
|
October 09 What kinds of testing should be considered?
September 10 实例解说Linux中fdisk分区使用方法一、fdisk 的介绍; fdisk - Partition table manipulator for Linux ,译成中文的意思是磁盘分区表操作工具;本人译的不太好,也没有看中文文档;其实就是分区工具; fdsik 能划分磁盘成为若干个区,同时也能为每个分区指定分区的文件系统,比如linux 、fat32、 linux 、linux swap 、fat16 以及其实类Unix类操作系统的文件系统等;当然我们用fdisk 对磁盘操作分区时,并不是一个终点,我们还要对分区进行格式化所需要的文件系统;这样一个分区才能使用;这和DOS中的fdisk 是类似的; 二、合理规划您的硬盘分区; 在操作分区之前,我们要明白硬盘分区一点理论,比如硬盘容量和分区大小的计算;对一个硬盘如何规划分区等,请参考如下文档,谢谢; 《合理规划您的硬盘分区》 三、fdisk -l 查看硬盘及分区信息; 通过《合理规划您的硬盘分区》 ,我们知道主分区(包括扩展分区)的总个数不能超过四个;也不能把扩展分区包围在主分区之间;根据这个原则,我们划分硬盘分区就比较容易的多;也能为以后减少不必要的麻烦; 1、通过fdisk -l 查看机器所挂硬盘个数及分区情况; [root@localhost beinan]# fdisk -l 通过上面的信息,我们知道此机器中挂载两个硬盘(或移动硬盘),其中一个是hda 另一个是sda ;如果我们想查看单个硬盘情况,可以通过 fdisk -l /dev/hda1 或者fdisk -l /dev/sda1 来操作;以fdisk -l 输出的硬盘标识为准; 其中 hda有三个主分区(包括扩展分区),分别是主分区 hda1 hda2 和hda3(扩展分区) ;逻辑分区是 hda5到hda10; 其中 sda 有两个主分区(包括扩展分区),分别是 hda1 和hda2 (扩展分区);逻辑分区是 sda5 hda6 ; 硬盘总容量=主分区(包括扩展分区)总容量 扩展分区容量=逻辑分区总容量 通过上面的例子,我们可以得知 hda=hda1+hda2+hda3,其中hda3=hda5+hda6+hda7+hda8+hda9+hda10 …… …… 2、关于fdisk -l 一些数值的说明; Disk /dev/hda: 80.0 GB, 80026361856 bytes 这个硬盘是80G的,有255个磁面;63个扇区;9729个磁柱;每个 cylinder(磁柱)的容量是 8225280 bytes=8225.280 K(约为)=8.225280M(约为); 分区序列 引导 开始 终止 容量 分区类型ID 分区类型 说明: 硬盘分区的表示:在Linux 是通过hd*x 或 sd*x 表示的,其中 * 表示的是a、b、c …… …… x表示的数字 1、2、3 …… …… hd大多是IDE硬盘;sd大多是SCSI或移动存储; 引导(Boot):表示引导分区,在上面的例子中 hda1 是引导分区; Start (开始):表示的一个分区从X cylinder(磁柱)开始; End (结束):表示一个分区到 Y cylinder(磁柱)结束; id和System 表示的是一个意思,id看起来不太直观,我们要在fdisk 一个分区时,通过指定id来确认分区类型;比如 7表示的就NTFS 分区;这个在fdisk 中要通过t功能来指定。下面的部份会提到; Blocks(容量):这是我翻译的,其实不准确,表示的意思的确是容量的意思,其单位是K;一个分区容量的值是由下面的公式而来的; Blocks = (相应分区End数值 - 相应分区Start数值)x 单位cylinder(磁柱)的容量 所以我们算一下 hda1的 Blocks 的大小 : hda1 Blocks=(765-1)x8225.280=6284113.92 K = 6284.113.92M 注:换算单位以硬盘厂家提供的10进位算起,如果以操作系统二进制来算,这个分区容量应该更少一些,得出的这个值和我们通过 fdisk -l 看到的 /dev/hda1的值是大体相当的,因为换算方法不一样,所以也不可能尽可能的精确;再加上分区时的一点损失之类,有时或大或小是存在的; 我们查看分区大小或者文件的时候,还是用十进制来计算比较直观;推算办法是 byte 向前推小数点三位就是K ,K单位的值向前推小数点三位就是M,M向前推小数点三位就是G…… …… 一般也差不了多少;这么算就行; 3、估算一个存储设备是否被完全划分; 我们估算一个硬盘是否完全被划分,我们只要看 fdisk -l 输出的内容中的 cylinders(柱体) 上一个分区的End 和下一个分区的Start是不是一个连续的数字,另外要看一下每个硬盘设备的fdisk -l 的开头部份,看一下他的 cylinders(柱体)的值; 比如hda设备,我们看到的是 9729 cylinders ;我们通过 hda的分区表可以看到上一个分区的End的值+1 就是下一个分区的Start 的值;比如 hda2的Start的值是 hda1 的End 的值+1,这证明 hda1 和hda2 中间没有空白分区,是连续的,以此类推;在 hda10,我们看到 End 的值是9729 ,而在fdisk -l头部信息中也有9729 cylinders,证明这个硬盘已经完全划分; Disk /dev/sda: 1035 MB, 1035730944 bytes 我们再看看 sda 移动储是不是被完全划分了;sda有 125个cylinders (柱体),有一个主分区和一个扩展分区构成;在扩展分区中,我们看到End的值为125,而这个移动硬盘的cylinder也是125,这能说明这个硬盘不可能再添加任何主分区了;根据我们上面所说的 sda1 sda2 sda5 sda6 之间未有任何未划分空间,但sda6 的cylinders (柱体)的End值却是 76 ,而 sda总的cylinders (柱体)有125个,由此看来sda 在 sda6后面有未划分区域; 至于sda 有多少未划分空间,我们算一下就知道了;扩展分区总容量是 806400 K ,大约是 806.400M左右,而逻辑分区 sda5 和sda6 的大小加起来是 400M左右,所以还仍有400M左右未划分空间,并且只能划分为链逻辑分区; 四、fdisk 对硬盘及分区的操作,进入fdisk 对硬盘操作阶段; 我们可以对硬盘进行分区操作,前提是您把fdisk -l 弄明白了;通过fdisk -l ,我们能找出机器中所有硬盘个数及设备名称;比如上面的例子,我们会看到两个设备一个是/dev/hda ,另一个是/dev/sda ; fdisk 操作硬盘的命令格式如下: [root@localhost beinan]# fdisk 设备 比如我们通过 fdisk -l 得知 /dev/hda 或者 /dev/sda设备;我们如果想再添加或者删除一些分区,可以用 [root@localhost beinan]# fdisk /dev/hda 或 [root@localhost beinan]# fdisk /dev/sda 注 在以后的例子中,我们要以 /dev/sda设备为例,来讲解如何用fdisk 来操作添加、删除分区等动作; 1、fdisk 的说明; 当我们通过 fdisk 设备,进入相应设备的操作时,会发现有如下的提示;以 fdisk /dev/sda 设备为例,以下同; [root@localhost beinan]# fdisk /dev/sda 其实我们常用的只有注有中文的,其它的功能我们不常用(呵,主要是我不会用,否则早会卖弄一下了);x扩展功能,也不是常用的;一般的情况下只要懂得 d l m p q t w 就行了; 下面以实例操作来详述,没有例子没有办法就,新手也看不懂; 2、列出当前操作硬盘的分区情况,用p; Command (m for help): p 3、通过fdisk的d指令来删除一个分区; Command (m for help): p 注:列出分区情况; 警告:删除分区时要小心,请看好分区的序号,如果您删除了扩展分区,扩展分区之下的逻辑分区都会删除;所以操作时一定要小心;如果知道自己操作错了,请不要惊慌,用q不保存退出;切记切记!!!!在分区操作错了之时,千万不要输入w保存退出!!! 4、通过fdisk的n指令增加一个分区; Command (m for help): p 注:我试图增加一个主分区,看来是失败了,为什么失败?因为我们看到主分区+扩展分区把整个磁盘都用光了,看扩展分区的End的值,再看一下 p输出信息中有125 cylinders;最好还是看前面部份;那里有提到; 所以我们只能增加逻辑分区了; Command (m for help): n 5、通过fdisk的t指令指定分区类型; Command (m for help): t 注:通过t来指定分区类型; 6、fdisk 的退出,用q或者 w; 其中 q是 不保存退出,w是保存退出; Command (m for help): w 7、一个添加分区的例子; 本例中我们会添加两个200M的主分区,其它为扩展分区,在扩展分区中我们添加两个200M大小的逻辑分区; Command (m for help): p 注:列出分区表; 然后我们根据前面所说通过t指令来改变分区类型; 最后不要忘记w保存退出; 五、对分区进行格式化,以及加载; 先提示一下;用 mkfs.bfs mkfs.ext2 mkfs.jfs mkfs.msdos mkfs.vfatmkfs.cramfs mkfs.ext3 mkfs.minix mkfs.reiserfs mkfs.xfs 等命令来格式化分区,比如我想格式化 sda6为ext3文件系统,则输入; [root@localhost beinan]# mkfs.ext3 /dev/sda6 如果我想加载 sda6到目前系统来存取文件,应该有mount 命令,但首先您得建一个挂载目录;比如 /mnt/sda6 ; [root@localhost beinan]# mkdir /mnt/sda6 这样我们就能进入 /mnt/sda6目录,然后存取文件了 September 08 linux学习笔记(四)################################################################# ################################################################# /var分区无法建立文件或目录,系统提示"No space left on device"。通过命令df -k检查空间,发现空间并没满。而且通过日志文件记录的不断增加也能确定空间还有剩余。这样问题也许出现在Inodes节点的使用上,通过命令df -i发现/var分区的Inodes节点果然全部使完。显然某个目录下有大量文件。仔细检查确定/var/spool/clientmqueue下有 115092个系统退信文件。删除后重起服务,一切正常。 logwatch总是填满/tmp的解决办法: ################################################################# 用netconfig 修改主机名 手动添加默认网关 查看路由 route add default gw 192.168.1.8 想更改网关 查看与本机相连的每个ip的进程数量: 设置多播 查看端口和进程的对应关系 阻止ping ################################################################# LILO GRUB /sbin/grub-install /dev/sda ################################################################# 1、程序产生的文件umask不生效 2、rsync属性问题 1、登录后检查后台运行的进程 ################################################################# ################################################################# ################################################################# 杀死正在使用的某个文件或者目录的所有进程 kill pid cp -av soure_dir target_dir #将整个目录复制,两目录完全一样 du -sm /root #计算/root目录的容量并以M为单位 (-S表示对整个目录,包括子目录) find -name /path file # 查找/path目录下是否有文件file 清除一个安装目录中清除所有的临时文件、中间件和配置文件 最后将在编译过程中的垃圾文件进行清理,命令如下: ################################################################# 2. 用RPM反安装软件包:rpm -e 软件名 3. 用RPM升级软件包:rpm -Uvh 软件升级版文件名 ################################################################# # gzip -dc modules.cgz > modules.cpio ################################################################# 把lilo启动改成grub启动 ################################################################# 以链接的形式来设置时区 ################################################################# 让系统使用默认的彩色文件显示 在unix系统中root账户是具有最高特权的。如果系统管理员在离开系统之前忘记注销root 查看系统信息 删除目录下所有文件包括子目录 切换X桌面(lnx3000) 显示 xwindows的语言 把弹出的光盘收回来 快速观看开机的硬件检测 查看目录的大小 字符模式下设置/删除环境变量 vim中显示颜色或不显示颜色 在redhat9中,对系统的服务器的设置: 用什么工具做入侵检测 Linux下检测程序内存泄漏的工具 ################################################################# 1,Tcpdump能够截获当前所有通过本机网卡的数据包。它拥有灵活的过滤机制,可以确保得到想要的数据。由于Tcpdump只能收集通过本机的数据,因此它的应用受到了一些限制,大多应用在网关或服务器自我检测上。 2,Nmap设计的初衷是系统管理员可以方便地了解自己的网络运行情况,例如有多少台主机在运行、分别提供什么样的服务。因此,它扫描的速度非常快,尤其适合大型网络。在对网络进行扫描时,Nmap主要利用ICMP echo探测主机是否开启。凡是了解TCP/IP协议的都知道,对于一个TCP端口,无论是否使用防火墙进行过滤,该主机都会对该端口发出的请求做出一定响应。所以即使配置了严格的防火墙规则,nmap照样可以找到这些主机例如,在一台IP地址为192.168.0.1的Linux主 3,Netstat主要用于Linux/Unix主机察看自身的网络状况,如开启的端口、在为哪些用户服务以及服务的状态等等。此外,它还显示系统路由表、网络接口状态等。可以说,它是一个综合性的网络状态察看工具,不过中规中举。 4,lsof 可以显示目前打开该端口号的程序 ################################################################# 操作系统上时钟会错误。 小结:时钟设置的问题本身比较简单,但是它涉及到几个基本的配置文件: 让linux自动同步时间(shunz) ################################################################# 取消^M字符 查看xinetd所打开的服务系统的服务 sysctl -w vm.pagecache="1 15 20" 32位的机器就是地址空间为32的二进制数字 ################################################################# 将ext2转为ext3 去掉多余的回车符 如何得到网卡的MAC地址 如何得到网卡的IP地址(mb) ################################################################# 中的gcc并安装它 ################################################################# last命令默认是找/var/log/wtmp文件可以通过-f参数指定文件 ################################################################# ################################################################# 可以用m命令来看fdisk命令的内部命令;n命令创建一个新分区;d命令删除一个存在的分区;p命令显示分区列表; t命令修改分区的类型ID号;l命令显示分区ID号的列表;a命令指定启动分区;w命令是将对分区表的修改存盘让它 发生作用。 Command action Partion number(1-4):1 //第一个扩展分区,按你需求可以最多分4个主分区 磁盘块数,这里我们输入+1024MB表示分区大小为1G。 才新挂载的分区 linux学习笔记(三)磁盘限额: 1、对分区做磁盘限额,是某个分区的属性 2、硬限制: 完全的限制 软限制: 警告 3、 对磁盘空间做限制,也可以做生成的文件数做限制 需要修改/etc/fstab文件: 启动自动加载的信息 4、 对象可以某个用户或某个组 分区 加载点 文件系统类型 选项 fsck dump mount -a : 设置磁盘限额: 1、分区、格式化 2、修改/etc/fstab option: defaults,usrquota 3、在需要做磁盘限额的目录生成文件:touch aquota.user 4、quotacheck -avu :提示信息为扫描的文件数量可以 5、 新建测试用户 abc1 6、针对用户设置限额:edquota -u abc1 7、修改blocks soft hard : 单位是k 8、启用分区的限额:qoutaon /sdb1 9、设置目录适当的权限 10、切换用户测试 dd if mount -o remount /boot chmod o+w edquota -p abc1 abc2 abc3 abc2 abc3用户的限额与abc1一致的 显示目录大小: du /etc/fstab option: defaluts,usrquota,grpquota 在限额目录下生成文件:touch aquota.group quotacheck -auvg 组中每个用户生成的文件都生效 限制生成文件数:inode 对某个用户如果同时设置了空间的限额和文件数的限额,其中 在执行edquota -p user1 user2 user3后 再修改user1的限额,不影响user2, user3,需要重新执行 对目录做限额: 目录所在分区不做磁盘限额 1、生成iso文件,文件的大小是目录限额最大大小 dd if=/dev/zero of=1.iso bs=1M count=10 2、把iso文件与环路设备建立关联 losetup /dev/loop0 1.iso 3、生成文件系统: mkfs -t ext3 /dev/loop0 4、 加载环路设备: mount -o loop /dev/loop0 abc (abc是需要做限额的目录) losetup -d /dev/loop0 特殊文件权限: suid sgid t : suid : 4 sgid: 2 t: 1 setuid:属性在显示有可能是S或s S:表示没有x属性 chmod 4644 f1 t:t属性是设置给其它用户(粘滞属性),设置给目录 chmod o+t filename (T t) chmod 7777 f1 粘滞属性作用: 共享目录防删除 :所有用户都有写的权限 ,每个用户都只能删除属于自己的文件 T: 没有x属性 t: 有x属性 查找含有suid的文件: 查找文件:find find . -name ntp.conf : 在当前目录查找,再在当前目录 find . -maxdepth 1 -name ntp.conf : 1:当前目录 find -user username find / -perm +4000 find . -type f | xargs rm -rf b: block 磁盘 : c: 字符设备: 显示设备 :连接读写 l: link (软链接文件) ls : ls -l | grep ^d grep -v : 不包含指定关键字的 locate wall : 发送消息 write username tty 回车 输入消息 fuser 查看相关进程 fuser -km /abc fuser -mv /abc lsof /abc linux学习笔记(二)用户管理: 创建用户:useradd username adduser username : 链接文件 用户信息:/etc/passwd 查看所有用户cat /etc/passwd wc :统计文本文件 wc -l /etc/passwd grep: 查找文本文件,查找含有指定关键字的所有行 grep username /etc/passwd :查找是否含有指定用户 /etc/passwd : 文件格式 1、用户名:x 2、x: 密码不保存在/etc/passwd,保存在/etc/shadow 3、uid: 用户标识 通过uid可以区分用户的状态: 1、管理员用户:uid 0 root 2、1-499: 内置账号 3、>=500: 普通用户 : UID是连接+1 4、gid: 组ID : 集中赋权限 gid默认是与uid相同 5、用户的说明信息 : 添加说明信息 建立用户时可以加入说明信息:useradd -c "String" 6、用户的主目录: 用户登录系统时最先进入目录是主目录 自动生成用户的主目录,主目录位置/home有一个与用户同名 的目录 7、登录时的shell: 命令解释器 bash 指定特定的信息: 指定UID:useradd -u 2000 user5 useradd -u 2000 -o user6 : 允许用户的uid重复 指定GID: 要求GID要存在 useradd -g gid username : 要求gid是存在的 useradd -c "" username :说明信息 修改用户的主目录:useradd -d /users/user12 user12 修改shell : 要求shell在/etc/shells文件中存在 useradd -s /bin/ksh username useradd -u 4001 -g 0 -c "user18" -d /users/user18 -s /bin/csh user18 修改用户信息: 修改建立用户的默认信息:/etc/default/useradd 直接修改用户的信息:usermod useradd -s /bin/bash user20 -l: 用户改名 usermod -l newname oldname 用户主目录: 切换用户:su - username: 切换用户同时应用新用户的环境量 主目录下的信息: 保存有用户的环境变量信息 ls -a 环境变量的配置: 全局修改、针对特定用户 全局修改:/etc/profile /etc/bashrc 区别: 用户登录时应用:/etc/profile /etc/bashrc: 新打开新终端时生效 查看当前的路径信息: PATH=$PATH:/jdk1.5/bin 分隔符是冒号(分号) export PATH linux下的当前目录是不做为命令查找目录,需要手工加入 export PATH= ./command : 当前 source /etc/bashrc source /etc/profile : . filename : 文件本身不需要执行权限,立即执行 /etc/profile : source /etc/profile :在当前窗口生效 只修改某个用户:修改用户主目录下环境变量文件() 新建的用户默认拷贝的是/etc/skel目录下的所有文件 组: 显示组的信息:/etc/group文件 在redhat中新建用户时默认生成同名的组 用户默认是属于同名组: 用户属于多个组 用户的组: 主组 辅助组 默认用户只能有一个主组,但可属于多个辅助组 useradd -g 主组名称 -G 辅助组名称列表用逗号隔开 username useradd -g hh5 -G 4004,4005,4006 hh5 显示用户的ID : id 命令可以列出用户的uid及所有的gid id username: groups username: 查看用户所属组(主组在前) 显示当前用户:whoami 显示所有的在线用户:who w 如果是远程连接: 相当于登录时以伪终端登录 允许root用户做telnet连接: 修改允许的伪终端的值 vi /etc/securetty 只要是还有可用的伪终端时root就可以做远程telnet 连接 vi /etc/xinetd.d/telnet disable = no service xinetd restart 禁用root做远程的ssh: vi /etc/ssh/sshd_config PermitRootLogin no service sshd restart 删除用户: 删除组时: 不是用户的主组 修改用户的主组: usermod -g newgroup username userdel username : 不删除用户的主目录 userdel -r username: 同时删除用户的主目录 ls -l dirname: 显示目录的内容 ls -ld dinname: 显示目录本身的信息 ls -l : 连续十个字符 第一个字符代表文件的类型: 1、普通文件 - 3、字符设备 c 4、块设备 b 5、链接文件 l 文件的所有者,文件的所属组 所有者是创建文件的用户,所属组所有者所在的主组 数字:表示 节点数量 inod值 touch f1 --- f1inod --- f2 f3 硬链接表示时是- (file) ln 源文件 链接文件 ln -s 源文件 链接文件 权限: 常用的权限有三种: 读 写 执行 用字表示: r w x 三种权限赋给三类用户:所有者 所属组 其它用户 默认的文件的权限:rw-r--r-- 默认的目录的权限: rwx-r-xr-x r: 对于文件: 可以显示文件的内容 w: 对于文件: 可以修改文件 x: 对于文件: 可以执行文件 r: 对于目录: 可以列出目录的内容 w: 对于目录: 可以在目录中生成文件或目录 x: 对于目录: 用户可以进入目录 修改权限 :chmod o-x dirname 默认权限是由umask决定:umask的默认值是0022 0666 0777 r: 4 w: 2 x : 1 文件的默认权限是644,目录的默认权限是755 修改umask值 :umask 0044 suid sgid: suid: 执行文件时以文件的所有者身份运行,默认是当前用户 passwd : 普通用户是能够修改自己的密码 密码保存在/etc/shadow chmod u-s /usr/bin/passwd : 普通用户不能修改自己的密码 sgid: linux学习笔记(一)共分4个部分: 系统管理、网络服务、应用、系统管理: linux常用命令: 1、ls : 列列出文件 : 所有文件 隐藏文件:ls -a 隐藏文件:名称是.开头的文件 .:当前目录 ..: 上一级目录 ls -l: 显示文件或目录详细信息 ls -lh: 以可读的形式显示文件大小 2、显示目录:pwd 3、生成目录:mkdir (make directory) : 相对目录或是绝对目录 mkdir /lx mkdir /abc mkdir -p /1/2/3/4/5 :自动生成上一级目录 4、切换目录:cd (change directory) cd /1 (cd..) cd .. : 进入上一级目录有空格 5、生成文件: 生成空文件:touch f1 6、拷贝:cp cp /etc/*.conf . cp -rf :支持拷贝文件和目录 (cp -f:提示) cp : 不能拷贝文件 7、删除: rm : 直接删除是有提示 分区管理: 分区管理 : 分区类型: 1、主分区 2、扩展分区 主分区+扩展分区<=4 3+1: 多于4个分区在扩展分区上分逻辑分区: 分区标识: 硬件标识: IDE: IDE : 主:hda hdb IDE2: hdc hdd hda:IDE1 主 主分区和扩展分区:hda1 hda2 hda3 hda4 扩展分区:不能直接使用 逻辑分区:hda5 查看当前已加载的分区的情况:df -h 显示文件系统类型: df -hT 文件系统: ext3 (ext2) ext3: 带有日志支持(快速恢复) : 分区命令:mkfs (make file system) mkfs -t ext3 /dev/hda5 (格式化) 加载分区: mount /dev/hda5 /dirname (加载点) iso: mount -o loop isofile.iso /dirname 生成iso文件: dd 生成指定大小的文件 dd if=/dev/zero of=1.iso bs=1M count=10 显示分区信息:fdisk -l 网络客户端工具: 1、显示ip地址信息: ifconfig 2、修改IP地址: netconfig 直接配置文件:vi /etc/sysconfig/network-scripts/ifcfg-eth0 不是立即生效:ifdown eth0 ifup eth0 3、在一个物理网卡一绑定多个IP地址 生成设备文件: cd /etc/sysconfig/network-scripts/ cp ifcfg-eth0 ifcfg-eth0:1 多个拷贝 编辑配置文件 ifup 设备文件名 通过图形界面修改IP地址: redhat-config-network: 简化命令neat 重启网络服务:service network restart 远程管理: 一、telnet : 不安全,默认是不启动的 启动telnet服务器:通过xinetd服务控制 验证telnet服务是否打开 : 23端口 显示本机端口的状态: netstat -an | grep 23 直接telnet hostip port 1、cd /etc/xinetd.d 2、vi telnet disable = yes (no) 3、重启xinetd服务 二、SSH ssh监听的端口:22 关掉ssh服务:service sshd stop 三、通过图形界面:vnc 配置VNC: 启动服务: service vncserver start (stop restart) vncserver :启动多个图形界面 172.16.200.33:1 四、通过 FTP服务实现: 配置ftp server: port: 21:管理端口 20: 数据端口 连接连接方式:主动式 被动式 1、启动FTP服务: FTP SERVER: FTP服务器端工具: vsftp: very secure service vsftpd start (stop restart) 2、FTP用户:默认ftp 密码:任意或不输入 3、文件在服务器放置的位置:/var/ftp 4、FTP命令:下载文件 get filename 修改默认的下载的位置:lcd 显示服务端的位置:pwd 显示本地文件:! ls ! mkdir /ftp 下载多个文件 :mget *.conf : 下载之前有提示信息 不需要提示信息:prompt off (on) linux下的ftp工具:ftp lftp: 默认是以匿名账号连接(ftp) :支持自动补齐(tab) 可以显示下载速度:dd if=/dev/zero of=11.iso bs=10M count=100 支持下载目录:mirror dirname :下载目录 mirror -R dirname : 上传目录 lftp -u f1 hostip 图形界面的FTP工具:gftp wget : 参数 () : 分区: 1、添加硬盘: n: 启始柱面 5、新建立的分区是不能使用的,重启系统 6、格式化 mkfs -t ext3 /dev/sdb1 mkfs.ext3 /dev/sdb5 7、加载文件系统: mkdir h1 mount /dev/sdb5 /h1 8、fdisk -l 把分区信息保存下来 () 可以直接还原 9、大小: 数据库服务器 (调优) ***查询手册 10、加载分区: 中文: mount -iocharset cp936 (gb2312) 11、加载优盘mount /dev/sda1 /dirname 手工检测:kudzu fdisk -l mount /dev/cdrom /dirname 查看光盘对应的设备文件:ls -l /dev/cdrom 查看硬盘大小 :fdisk -l 查看内存大小: free -m 包括交换分区 分区大小:df -h 查看CPU信息:cat /proc/cpuinfo 查看操作系统版本 :cat /etc/redhat-release 显示内核版本 :uname -r 增加交换分区大小: 1、直接生成交换分区 fdisk 2、通过ISO文件 生成iso文件 mkswap filename.iso 编辑/etc/fstab 永久生效 加入信息 /: 1、磁盘限额 2、RAID配置(软件) 3、启动配置 临时修改交换分区 swapon filename.iso swapoff iso How to Manage the Perfect ProjectWant to complete projects successfully? On-time,within budget, and involving the appropriate people to ensure integration? These project management steps will ensure you practice effective project management. 1. Select the project. Assemble the team that must own the project to create a positive implementation and integration. 2. Define the internal or external customer's requirements from the outcome or output of the project. 3. Define the scope of the project and the outcome desired. As part of this definition, determine where the project begins and ends. What's the first step? What's the last? 4. Define measurable goals that will enable you to know that the project is accomplished. Define your budget for the project. Determine the people and hours that are required to complete the project. 5. Determine how you will communicate progress and accomplishments, and gather input from organization members who are not on the team. 6. Flow chart the current process.Or, for a specific project, list the steps necessary to accomplish the project. 7. Measure how the current project is performing right now, if this is an ongoing project. Study the data to adjust your goals and expectations. 8. Determine whether additional information, resources or people are needed to complete the project.Bring the people and resources identified into the group. 9. Create an action plan to complete the project's steps. Assign the appropriate people to complete each step. Create a due date for when each step will be accomplished.Make sure people have the time needed allocated to the project. 10. Determine an ongoing method to track whether the steps are accomplished as planned. Hold weekly meetings, set up a centrally-located planning calendar, widely distribute meeting minutes, or list the steps on a public white board. 11. Implement the action plan. Document the methods used to accomplish each step. You will want to be able to share the steps and goals and duplicate the successful ones, if this is an ongoing or periodically repeated project. 12. Determine how the team will measure, record, and track the effectiveness of the project implementation and planning process for the future. 13. Using the data collected, evaluate results. How did the project meet expectations and satisfy planners and participants? If not, why not? Document for future projects. 14. Celebrate the accomplishments of the team. 15. Determine how the lessons learned and steps experienced during this project can be applied to projects in the future.Find a method for integrating "best practice" steps for project management. Tips: 1.Involve the appropriate people who own the process and can make or break the success of your implementation and integration. 2. Document your steps so that the team that follows or implements your project next year has the appropriate information they need to duplicate your successful steps and planning process. 3. Keep any forms,flyers, advertisements, communication documents, team minutes, and all other data related to the project in a file that can be accessed for the next project planning. How to Manage a ProjectCongratulations! You've just been appointed to manage a project. How do you get started? What steps do you do next? How do you maximize your chances for success? The project management steps below guide you through the process of managing any project,step by step. 1. Define the ScopeThe first, and most important,step in any project is defining the scope of the project.What is it you are supposed to accomplish by managing this project? What's the project objective?Equally important is defining what is not included in the scope of your project.If you don't get enough definition from your boss, clarify the scope your self and send it back upstairs for confirmation. 2. Determine Available ResourcesWhat people,equipment, and money will you have available to you to achieve the project objective? As a project manager, you usually will not have direct control of these resources,but will have to manage them through matrix management. Find out how easy or difficult that will be to do. 3. Check the TimelineWhen does the project have to be completed? As you develop your project plan you may have some flexibility in how you use time during the project, but deadlines usually are fixed. If you decide to use overtime hours to meet the schedule, you must weigh that against the limitations of your budget. 4. Assemble Your Project TeamGet the people on your team together and start a dialog. They are the technical experts. That's why their functional supervisor assigned them to the project. Your job is to manage the team. 5.List the Big Steps What are the major pieces of the projects? If you don't know, start by asking your team. It is a good idea to list the steps in chronological order but don't obsess about it; you can always change the order later. 6. List the Smaller Steps List the smaller steps in each of the larger steps.Again, it usually helps you remember all the steps if you list them in chronological order. How many levels deep you go of more and more detailed steps depends on the size and complexity of your project. 7.Develop a Preliminary Plan Assemble all your steps into a plan.What happens first?What is the next step? Which steps can go on at the same time with different resources? Who is going to do each step?How long will it take? There are many excellent software packages available that can automate a lot of this detail for you.Ask others in similar positions what they use. 8.Create Your Baseline Plan Get feedback on your preliminary plan from your team and from any other stakeholders.Adjust your timelines and work schedules to fit the project into the available time.Make any necessary adjustments to the preliminary plan to produce a baseline plan. 9.Request Project AdjustmentsThere is almost never enough time,money or talent assignment to a project. Your job is to do more with the limited resources than people expect.However, there are often limits placed on a project that are simply unrealistic.You need to make your case and present it to your boss and request these unrealistic limits be changed. Ask for the changes at the begining of the project. Don't wait until it's in trouble to ask for the changes you need. 10.Work Your Plan, But Don't Die for It | |||||||||