Chinaunix首页 | 论坛 | 博客
  • 博客访问: 627361
  • 博文数量: 166
  • 博客积分: 970
  • 博客等级: 准尉
  • 技术积分: 547
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-06 15:16
个人简介

Believe youself!

文章分类

全部博文(166)

文章存档

2017年(1)

2016年(5)

2015年(117)

2014年(14)

2013年(11)

2012年(5)

2010年(4)

2009年(1)

2008年(8)

我的朋友

分类: LINUX

2008-04-23 15:49:20

    从昨天晚上重新再虚拟机中装了redhat后就一直试着安装vmware-tools,可是在/mnt/cdrom 目录下,怎么也安装不上那个rpm文件和那个tar.gz,的文件,因为上次安装的时候,都非常好使,这次不知道为啥像上次一样安装了,却怎么也装不上。这成了我心中的一块乌云啊!
刚才查了一下它们两的权限均为只读,然后看如下网友所说,在/tmp目录下tar了那个tar包,有了进展!呵呵。。。然后执行新产生的vmware-tools-distrib目录下的:vmware-install.pl
非常好使! 根据提示的命令,逐一选择,过程繁杂,这些不重要的就不用多说了。
    以前装这玩意儿的时候,只是rpm了那个rpm包就好使了,这次这个包不好用,尚不知道是啥原因,只要把这东西安好了,那就方便了!现在将这两个包给删了,没有什么用,白占硬盘!
------------------------------------------
3、确认安装VMWARE TOOLS。
这时我们并没有真正的安装上了VMWARE TOOLS软件包,如果您点击菜单:DEVICES,您就会发现光驱的菜单文字变为:ide1:0-> C:Program FilesVMwareVMware WorkstationProgramslinux.iso,这表示VMWARE将LINUX的ISO映象文件作为了虚拟机的光盘
4、鼠标点击LINUX界面,进入LINUX。
5、运行如下命令,注意大小写。
mount -t iso9660 /dev/cdrom /mnt
加载CDROM设备,这时如果进入 /mnt 目录下,你将会发现多了一个文件:vmware-linux-tools.tar.gz。这就是WMWARE TOOLS的LINUX软件包,也就是我们刚才使用WINISO打开LINUX.ISO文件所看到的。
cp /mnt/vmware-linux-tools.tar.gz /tmp
将该软件包拷贝到LINUX的 TMP目录下。
umount /dev/cdrom
卸载CDROM。
cd /tmp
进入TMP目录
tar zxf vmware-linux-tools.tar.gz
解压缩该软件包,默认解压到vmware-linux-tools目录下(与文件名同名)。
cd vmware-linux-tools
进入解压后的目录
./install.pl
运行安装命令。
这时install提示你是否需要备份以前的配置文件,建议选择"y"。
等待INSTALL运行完成后,这时键入 START 命令,是不是可以看到漂亮的LINUX图形界面了
?***********************************************************************************
(15)
make command and makefile
PATH=$PATH:.  //used to find  the executing command in the current dir, but it
              //is better to use the form of  ./filename
(14)14:50 2008-4-6 
service network restart           //just restart the network
route add default gw 192.168.1.1 //configuring the host`s gateway addr
In the Redhat Linux, you can use the netconfig command to set the net info.
netconfig
比如我们用ifconfig 来调试 eth0网卡的地址
[font=NSimsun][root@localhost ~]# ifconfig eth0 down
[root@localhost ~]# ifconfig eth0 192.168.1.99 broadcast 192.168.1.255 netmask 255.255.255.0
[root@localhost ~]# ifconfig eth0 up
[root@localhost ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:11:00:00:11:11
          inet addr:192.168.1.99 Bcast:192.168.1.255 Mask:255.255.255.0
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
          Interrupt:11 Base address:0x3400
[b]注解:[/b] 上面的例子我们解说一下;
第一行:ifconfig eth0 down 表示如果eth0是激活的,就把它DOWN掉。此命令等同于 ifdown eth0;
第二行:用ifconfig 来配置 eth0的IP地址、广播地址和网络掩码;
第三行:用ifconfig eth0 up 来激活eth0 ; 此命令等同于 ifup eth0
第四行:用 ifconfig eth0 来查看 eth0的状态;
[b]当然您也可以用直接在指令IP地址、网络掩码、广播地址的同时,激活网卡;要加up参数
[font=NSimsun][root@localhost ~]# ifconfig eth0 192.168.1.99 broadcast 192.168.1.255 netmask 255.255.255.0 up
(13)
running the minicom:
minicom -s         // configure the minicom
ps >> lsoutput.txt    // writing the ps`s result into the rear of the
lsoutput.txt
ls -l > lsoutput.txt  // > redirection operator, if using the same destination
file as the output of the result, then the newer result will override the
previous result.
ln
top    // display specific info about  the current processes and other status
dynamically
rpm -qf file
rpm -qdf file   // display which packages the file(the program) belongs to.
                // Or even to see the specific info about a program.
whereis command //display the command`s dir
netstat -nr // display the kernel route table
route     // display and modify the local IP routing table
finger    //display the current users info logging in the system.
ps ax     // list the current processes
ps aux|grep cupsd  //looking up the process of cupsd
free -m  // listing the memory status in the MB unit
df -h   // listing the disk status
du -hs //  just as the above
lspci -v //look up the hardware info in detail
dmesg    // also display the hardware info   
(12)uname -a  //used to look up the system`s version
   lspci -v  // used to look up the hardware`s chips
  
(11)11:42 2008-3-15
findchip -v
findchip -v
能看到红外芯片类型,我们用的是nsc pc87338
(10)20:07 2007-11-22
command replacement:
echo "The date is `date`"
expr command:  //arithmetic calculation
expr 4 + 5
$((...))
$((4+5))
echo "Hello girl."  #This is a comment line.
Variables:
Grammar
=
Citing variables:
variable = ${variable2}
delivering a value when executing the route
$ read variableName  //read from the standard input
$ read fname
export  //the command points out the variable is global.
PATH variable:
: is used to islolate the path name;
PS1 variable:
PS2
echo "${LOGNAME}"  == who
SHELL
env  //see all the enviromental variables table  and themselves` value.
Example:  It didn`t work.
echo "Please enter the total number of queres reported today."
read totalQueries
echo "Please enter the number of queryies answered ."
read answered
pending = $((totalQueries-answered))
echo "Number of calls pending = $pending"
chmod +x callpending
(09)14:06 2007-11-9
    Shell Script
.sh
 
echo    //display the info in the screen
cd /etc   ls lilo.conf    vi /etc/grub.conf
cd /etc
cd /local   //install local software here
cd /usr
   /usr/bin
   /usr/include  //head files
   /usr/lib  
cd /lib  //it has the system storeroom library
passwd userName
adduser/useradd userName 
bash   //it is our shell,just our terminal
ls -l cdrom //
cd /bin   //system tools
pwd
[root@xt root]    // the first root means userName. xt means host name.
$ means general user / # means the super user
(08)19:44 2007-11-5
tar -xzvf lxt008.tar.gz
tar -czvf lxt008.tar.gz  /home/lxt008
tar -tvf lxt008.tar
tar -xvf lxt008.tar  //decompress a package
tar -cvf lxt008.tar  /home/lxt008 //package a dir
rpm -ivh a.rpm  //install a.rpm package
rpm -qi mysql*.rpm
rpm -qi z.rpm   //query if the package is installed.
netstat > netstat.txt
netstat
ping 127.0.0.1  //ctrl +c/d
ifconfig
ln directoryName   destDir //create a hard link
ln -s dirName destName   //create a soft link
ls -i fileName // display the index id of the pointed file
ls -i  //display the index numbers in the current dir
chmod 777 a.out 
chmod a+w a.out  // a means all the users
chmod a-w a.out  //remove the -w right from all the users
chmod o+w a.out  // o means another user
chmod g+w a.out  // g means group user
chmod u+x a.out  // u means primary user
chmod u-x a.out  //remove the -x right from user
ls -l /dev/cdrom
(07)16:23 2007-10-31
//redirection
cat  //ctrl+c / d
cat [<] 1.c // input redirection
rmdir kkk 2 > rmdir.txt
ls -l > ls.txt
ls -1 2 > ls.txt // let the error info output into the file ls.txt
//find the difference between two files
cmp  1.c 2.c // if no difference then it would be without notice
diff 1.c 2.c //compare 1.c with 2.c
:wq
:q!
cp file destDir  // copy the file to the pointed dir
mv 1.c /root  // move the file 1.c to the dir of /root
// display the content of the file
cat  /etc/inittab
less /etc/inittab
more /etc/inittab
rm  -r -f   name //remove the file or dir without notice
rmdir  name // delete the empty dir
mkdir  name // create a dir
pwd
cd ..  // go to the parent dir
cd .   // curent dir
ls -l /etc/inittab
find /etc -name lilo.conf
fsck  // repair the file system when shutting down the machine unnormorly
uname -a //display the version of the system
cd /home  / du -sh    //display the directory info
df -h    //display the disk info
fdisk -l //display the partion info
info order
man order //q to exit
(06)
cat /etc/passwd 
cat /etc/shadow
:q! // :wq
pwd // absolute dir
cd/  cd..
ctrl + c / ctrl + d
adduser/useradd userName
passwd userName
vi /etc/lilo.conf
vi /etc/profile
vi /etc/grub.conf
vi /etc/inittab
(05)14:08 2007-10-25
0 standard input file
1 standard output file
2 standard error output file
ifconfig
ping
route -n
netstat
//          

rpm -ivh rpmPackage   // install rpm package
rpm -Uvh rpmPackage   // update rpm package
rpm -e   rpmPackage   // delete rpm package
 
rpm -ql packageName   //list infomation
rpm -qf 'which order' //display which package the order is.
rpm -ql packageName   //display the file list in the package
tar cvf home.tar /home
tar czvf home.tar.gz /home
bzip2 filename -> filename.bz2
bunzip filename.bz2
gzip
gunzip
zip  unzip 
rar
(04) 15:50 2007-10-15
fsck [-f -N -r -p]      //repair the disk, note: after uninstalling the filesystem
fsck -p -t ext2 /dev/hda2
locate
ln -i
cmp
chown   //change the owner of the file or directory
chgrp   //change the owning group of the file or directory
diff [args]   //find the difference between two text file
-w -i
(03)  21:50 2007-10-9
      File operation command
more/less file    //getting the content of the file
cat    //display the appointed content
mv (move)
  *mv [args]
  *-I
  *-f
cp (copy)
  cp [args]
  *-f  //overlay the filedirectly
  *-I  //give a prompt of whether the dst file  overlays the src
  *-R  //recursively
    File Type
ls -l   //It would show the type of the file
/etc/DIR-COLORS   //File type`s corresponding color configuring file
-
(02)21:53 2007-10-4
loading the cdrom method:
mount -t iso9660 /dev/cdrom  /mnt/cdrom
mount -t fileType   deviceFile  loadingDirectory
unloading the device:
umount  /mnt/cdrom
man command  //look up command`s handbook page
info command //look up the help of the command.
command -help
Know about the info of harddisk
mount 所挂载的分区
fdisk -l[/dev/had]   //the status of the partition of the hard disk.
df -h                //the status of the usage of partition of the hard disk
du -sh               //the room occupied by the directory
uname -a             //the version number of the using linux
Important file operation command:
mkdir  //create a directory
rm -r -f        //remove the directory recursively without any prompt
rmdir           //remove the null directory
pwd   //look up the current using directory
cd
(01)8:10 2007-10-4
/etc/inittab   ----//this file is used to initiate the system.
useradd username   //create a new user
passwd  username   //add the password, moreover, it shouldn`t be too simple!
/home/username     //directory
/etc/passwd
/etc/shadow
(00)
mkdir ---creating a director.
gcc --version
vi fileName
i
esc then :w
./fileName.c
gcc -o destinationFile sourceFile
rm fileName  //remove the specified file
rmdir directoryName  //remove the specified directory
shutdown -h now  //close the linux system      recommended
shutdown -r now  //restart the linux system    recommended
reboot     //restart quickly skipping the procedure of sync   not recommended
init 0     //close the system
init 6     //restart the system
halt       //stop the system ?      not recommended
(16)
redhat-config-systemlevel    //modify the firewall configuration
env    //show the environment variables
 
阅读(4672) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~