大鸟的学习乐园
路漫漫其修远兮,吾将上下而求索
posts - 26,comments - 27,trackbacks - 0

①安装VBox

    \\192.168.12.xxxx\install\VBox\VirtualBox-4.0.6-71416-Win.exe

 

 ②通过VBox安装Linux虚拟机

    Linux系统映像保存于下面的路径下

    \\192.168.12.xxxx\debian4_iso

 

 ③通过VBox进入Linux操作系统

    通过下面的命令查看当前IP状态,并修改为静态IP

    vim /etc/network/interfaces

    若修改,键入字母「i」即进入可编辑状态,修正后Esc退出编辑状态,键入「:wq」保存并退出

     静态IP例:

       allow-hotplug eth1

       #iface eth1 inet dhcp

       iface eth1 inet static

       address 192.168.12.xxxx
       netmask 255.255.255.0

       gateway 192.168.12.1

     重启网卡:

       /etc/init.d/networking stop

       /etc/init.d/networking start

 

 ④输入ifconfig查看修正后的ip状态

    查看该虚拟机是否能够ping通自己的机器

 

 ⑤配置Linux虚拟光驱路径

    通过命令:「vim /etc/init.d/donkey_service」新建文件donkey_service

    编辑文件:

            # mount window share folder to /mnt/debian4_iso

            mount -t cifs //192.168.12.xxx/debian4_iso -o username="remote",password="abcd@1234" /mnt/debian4_iso

            mount -t cifs //192.168.12.xxx/install -o username="remote",password="abcd@1234" /mnt/nas_share

 

            # mount debian4 iso

            mount -t iso9660 -o loop /mnt/debian4_iso/debian-4.0.0-i386-DVD-1.iso /mnt/debian4/dvd01

            mount -t iso9660 -o loop /mnt/debian4_iso/debian-4.0.0-i386-DVD-2.iso /mnt/debian4/dvd02

            mount -t iso9660 -o loop /mnt/debian4_iso/debian-4.0.0-i386-DVD-3.iso /mnt/debian4/dvd03

            mount -t iso9660 -o loop /mnt/debian4_iso/debian-4.0.0-i386-DVD-4.iso /mnt/debian4/dvd04

    执行文件:sh donkey_service

 

    注:新建虚拟机的网卡没有访问200的权限,可以把debian4拷贝到本机一文件夹下,共享该文件夹

 

   ⑥安装ssh-server

     安装后就可以使用putty链接,操作。

     aptitude install ssh-server

 

   ⑦安装Linux必要软件

     aptitude install make -- 编译用

 

   ⑧apache,php,mysql安装前准备

     Linux下用软件安装包保存位置:

          \\192.168.12.xxx\software\install\linux\httpd-2.2.9.tar.gz

          \\192.168.12.xxx\software\install\linux\mysql-5.1.53.tar.gz

          \\192.168.12.xxx\software\install\linux\php-5.2.5.tar.gz

     可通过FileZilla软件,把上面的软件包copy到Linux虚拟机上

           \\192.168.12.xxx\software\progrem\FileZilla-3.0.9.

     创建软件包的保存位置和安装路径文件夹

      例: mkdir /opt/soft -- 上面各个软件包copy到此

          mkdir /opt/build -- 安装软件时的安装路径

 

posted on 2012-01-18 21:51 大鸟 阅读(425) 评论(0)  编辑  收藏 所属分类: linux