centos6.5 环境变量 centos7安装软件选择

这篇文章给大家聊聊关于centos6.5 环境变量,以及centos7安装软件选择对应的知识点,希望对各位有所帮助,不要忘了收藏本站哦。

centos6.5安装wps提示缺libc.so.6(GLIBC_2.15)(64bit),怎办

1.试图运行程序,提示"libc.so.6: version `GLIBC_2.14' not found",原因是系统的glibc版本太低,软件编译时使用了较高版本的glibc引起的:

[ghui@StuOS bin]$ pwd

/var/VMdisks/cross/mingw32/bin

[ghui@StuOS bin]$ ls

lrelease QtCore4.dll QtNetwork4.dll QtSql4.dll QtXml4.dll

moc QtDeclarative4.dll QtOpenGL4.dll QtSvg4.dll rcc

phonon4.dll QtGui4.dll QtScript4.dll QtTest4.dll uic

qmake QtMultimedia4.dll QtScriptTools4.dll QtWebKit4.dll

[ghui@StuOS bin]$./qmake

./qmake:/lib64/libc.so.6: version `GLIBC_2.14' not found(required by./qmake)

2.查看系统glibc支持的版本:

[ghui@StuOS bin]$ strings/lib64/libc.so.6|grep GLIBC_

GLIBC_2.2.5

GLIBC_2.2.6

GLIBC_2.3

GLIBC_2.3.2

GLIBC_2.3.3

GLIBC_2.3.4

GLIBC_2.4

GLIBC_2.5

GLIBC_2.6

GLIBC_2.7

GLIBC_2.8

GLIBC_2.9

GLIBC_2.10

GLIBC_2.11

GLIBC_2.12

GLIBC_PRIVATE

[ghui@StuOS bin]$ rpm-qa|grep glibc

glibc-static-2.12-1.80.el6_3.6.x86_64

glibc-headers-2.12-1.80.el6_3.6.x86_64

glibc-common-2.12-1.80.el6_3.6.x86_64

glibc-devel-2.12-1.80.el6_3.6.x86_64

glibc-static-2.12-1.80.el6_3.6.i686

glibc-devel-2.12-1.80.el6_3.6.i686

glibc-2.12-1.80.el6_3.6.i686

glibc-2.12-1.80.el6_3.6.x86_64

3.可以看到最高只支持2.12版本,所以考虑编译解决这个问题:

a.到下载最新版本,我这里下载了glibc-2.14.tar.xz这个版本,解压到任意目录准备编译

b.这里解压到/var/VMdisks/glibc-2.14/

[ghui@StuOS bin]$ cd/var/VMdisks/glibc-2.14/

[ghui@StuOS glibc-2.14]$ pwd

/var/VMdisks/glibc-2.14

[ghui@StuOS glibc-2.14]$ ls

abilist config.h.in intl README.libm

abi-tags config.log io resolv

aclocal.m4 config.make.in libc-abis resource

aout configure libidn rt

argp configure.in libio Rules

assert conform LICENSES scripts

autom4te.cache CONFORMANCE locale setjmp

bits COPYING localedata shadow

BUGS COPYING.LIB login shlib-versions

build cppflags-iterator.mk mach signal

CANCEL-FCT-WAIVE crypt Makeconfig socket

CANCEL-FILE-WAIVE csu Makefile soft-fp

catgets ctype Makefile.in stdio-common

ChangeLog debug Makerules stdlib

ChangeLog.1 dirent malloc streams

ChangeLog.10 dlfcn manual string

ChangeLog.11 elf math sunrpc

ChangeLog.12 extra-lib.mk misc sysdeps

ChangeLog.13 extra-modules.mk NAMESPACE sysvipc

ChangeLog.14 FAQ NEWS termios

ChangeLog.15 FAQ.in nis test-skeleton.c

ChangeLog.16 gmon NOTES time

ChangeLog.17 gnulib nptl timezone

ChangeLog.2 grp nptl_db tls.make.c

ChangeLog.3 gshadow nscd version.h

ChangeLog.4 hesiod nss Versions.def

ChangeLog.5 hurd o-iterator.mk wcsmbs

ChangeLog.6 iconv po wctype

ChangeLog.7 iconvdata posix WUR-REPORT

ChangeLog.8 include PROJECTS

ChangeLog.9 inet pwd

conf INSTALL README

c.在glibc源码目录建立构建目录,并cd进入构建目录

[ghui@StuOS glibc-2.14]$ mkdir build

[ghui@StuOS glibc-2.14]$ cd build

d.运行configure配置,make&& sudo make install

[ghui@StuOS build]$../configure--prefix=/opt/glibc-2.14

[ghui@StuOS build]$ make-j4

[ghui@StuOS build]$ sudo make install

[sudo] password for ghui:

4.临时修改环境变量

[ghui@StuOS bin]$ export LD_LIBRARY_PATH=/opt/glibc-2.14/lib:$LD_LIBRARY_PATH

[ghui@StuOS glibc-2.14]$ cd/var/VMdisks/cross/mingw32/bin/

[ghui@StuOS bin]$./qmake

Usage:./qmake [mode] [options] [files]

QMake has two modes, one mode for generating project files based on

some heuristics, and the other for generating makefiles. Normally you

shouldn't need to specify a mode, as makefile generation is the default

mode for qmake, but you may use this to test qmake on an existing project

...

linux下phpstudy怎么安装php环境变量

linux下phpstudy环境的安装

phpStudy Linux版&Win版同步上线支持Apache/Nginx/Tengine/Lighttpd/IIS7/8/6

phpStudy for Linux支持Apache/Nginx/Tengine/Lighttpd,

支持php5.2/5.3/5.4/5.5切换

已经在centos-6.5,debian-7.4.,ubuntu-13.10测试成功。

下载版:http//lamp.phpstudy.net/phpstudy.bin

完整版:http//lamp.phpstudy.net/phpstudy-all.bin

安装:

wget-c http//lamp.phpstudy.net/phpstudy.bin

chmod+x phpstudy.bin#权限设置

./phpstudy.bin#运行安装

用时十到几十分钟不等,安装时间取决于电脑的下载速度和配置。

也可以事先下载好完整,安装时无需下载。

安装完成

如何切换php版:

假如你先安装的apache+php5.3

想切换成nginx+php5.4

你就再走一次./phpstudy.bin

但是你会发现有一行是否安装mysql提示选不安装

这样只需要编译nginx+php5.4

从而节省时间,这样只需要几分钟即可。

项目地址:

使用说明:

服务进程管理:phpstudy(start|stop|restart|uninstall)

站点主机管理:phpstudy(add|del|list)

ftpd用户管理:phpstudy ftp(add|del|list)

=phpstudy WIN版下载==================

『软件简介』

该程序包集成最新的Apache+Nginx+LightTPD+PHP+MySQL+phpMyAdmin+Zend Optimizer+Zend Loader,一次性安装,无须配置即可使用,是非常方便、好用的PHP调试环境。该程序绿色小巧简易迷你仅有35M,有专门的控制面板。总之学习PHP只需一个包。

对学习PHP的新手来说,WINDOWS下环境配置是一件很困难的事;对老手来说也是一件烦琐的事。因此无论你是新手还是老手,该程序包都是一个不错的选择。

1、全面适合 Win2000/XP/2003/win7/win8/win2008操作系统,支持Apache、IIS、Nginx和LightTPD。

2、该程序包集成以下软件,括号内为phpstudy下对应的目录。

php 5.6a3(php56n)

php 5.5.10(php55)

php 5.5.10-nts(php55n)

php 5.4.26(php54)

php 5.4.26-nts(php54n)

php 5.3.28(php53)

php 5.3.28-nts(php53n)

php 5.2.17(php52)

Apache 2.4.7(Apache)

Nginx 1.5.11(nginx)

LightTPD 1.4.32(Lighttpd)

MySQL 5.5.36(MySQL)

MySQL-Front 5.3(SQL-Front)

phpMyAdmin 3.5.8.2(phpMyAdmin)

pear 1.9.4(pear)

OpenSSL 1.0.1e&0.9.8y

ZendOptimizer 3.3.3(php5.2有)

Zend Loader 5.5.0(php5.3有)

Zend Loader 6.0.0(php5.4有)

wincache 1.3.5(fastcgi有)

php_opcache 7.0.3(ZendOpcache扩展)

xdebug 2.2.3.1

Zend Debugger 6.2(php5.3/4 fastcgi有)

xcache 3.1.0

eAccelerator 1.0&0.9.6

php_sqlsrv(MSSQL扩展)

php_pdo_sqlsrv(PDO-MSSQL扩展)

php_mongo 1.4.5(MongoDB扩展)

php_dbase 5.1.0(dbase扩展)

php_dbx 1.1.2(dbx扩展)

php_ibm_db2 1.9.5(ibm_db2扩展)

php_apc 3.1.13(php_apc扩展)

php_memcache 3.0.8

phpStudy Ftp server(FTPServ)

SendMail 3.2(sendmail)

VC++ 2008运行库

3、MySQL数据库默认用户名:root,密码root,安装后请重新设置密码。

4、本程序纯绿色,支持22种组合一键切换,支持系统服务和非服务两种启动方式,自由切换。改变安装路径或拷贝到别的电脑上也可正常运行;即便是运行完再更改路径也能运行,真正做到无须配置。重写控制面板更加有效直观地进行控制程序的启停。

5、自带FTP服务器,支持多用户,无需再安装FTP服务器。自带网站挂马监视器,随时记录文件的修改情况,让挂马文件无处可逃。

6、本程序完美支持II7,IIS8和IIS6。应网友的要求制作Nginx版和Lighttpd版。Nginx版为phpfind,Lighttpd版为phpLight。

推荐:学习JSP用JspStudy。

『软件简介』

JspStudy集成JDK+tomcat+Apache+mysql,JSP环境配置一键启动。无需修改任何配置即可迅速搭建支持JSP的服务器运行环境。

纯绿色解压即可,支持系统服务和非服务两种启动方式,自由切换。控制面板更加有效直观地进行控制程序的启停。

JspStudy将复杂的JSP环境配置简单化。

『特别注意』

1.为了减少出错安装路径不得有汉字,如有防火墙开启,会提示是否信任httpd、mysqld运行,请选择全部允许。

2.此为apache+php方案,需要Nginx+php方案的请到www.phpStudy.net下载phpfind,Lighttpd+PHP方案下载phpLight。

3.重装系统后或相关服务丢失时,只需要点一下『运行模式-应用』即可。

4.可通过菜单『卸载相关服务』进行卸载相关服务。

5.在『启动』、『停止』、『重启』三个启停按钮上右键可以有选择地进行启停,左键将控制全部的启停。

6.菜单『phpStudy设置』可以进行php,apche,mysql的相关设置。菜单『站点域名设置』可以进行站点及域名的添加。

7.本程序分为安装版和非安装版,无论是安装还是免安装,最后的效果完全一致。

8.端口问题无法启动时,请使用菜单『环境端口检测』进行端口检测,尝试启动。

26种组合一键切换apache+php

php扩展管理超级方便

nginx+php

IIS7/8/6+php

mysql备份还原导入导出

站点域名设置

端口检测

博客不再更新,请到官方网站下载:

下载地址解压版:

下载地址安装版:

其他版本:

软件简单说明各版本的区别大小下载

phpStudy26种组合,超全大合集Apache+Nginx+LightTPD+IIS

php5.2 php5.3 php5.4 php5.5 php5.6

MySQL phpMyAdmin MySQL-Front

26种组合自由切换,是下面5个版本的合集

同时支持apache/nginx/Lighttpd和IIS7/8/636M解压版

安装版

phpStudy

Lite

新手用,经典wamp组合Apache+php5.3+php5.4+MySQL(wamp集成包)

没有上面合集复杂的多版本设置,简单适合新手。16M解压版

phpStudy

for IIS

IIS服务器专用IIS+php5.2+php5.3+php 5.4+MySQL

php一键安装包 for IIS7/8/6(IIS服务器专用)21M解压版

phpStudy

for Linux

Linux服务器专用(lamp)Apache+Nginx+LightTPD+MySQL

php5.2+php5.3+php5.4+php5.5一键安装包

支持centos,ubuntu,debian等Linux系统,12种组合80M安装版

phpfindnginx+php组合(wnmp)Nginx+php5.3+php5.4+MySQL(wnmp集成包)

nginx+php组合,适合喜欢用nginx的朋友16M解压版

phpLightlighttpd+php组合(wlmp)Lighttpd+php5.3+php5.5+MySQL(wlmp集成包)17M解压版

phpStudy

(php5.2)

apache+php5.2珍藏版Apache2.2+php5.2.17+MySQL5.1

php5.2经典组合值得收藏,仅有11M,无需运行库11M解压版

JspStudyJSP环境一键安装包JDK+tomcat+Apache+mysql+php

纯绿色解压即可,不添加环境变量,不修改注册表52M解压版

下载地址:

php5.3+php5.4合集下载: http//www.phpstudy.net/phpstudy/phpStudy.zip

centos6.5安装到U盘出问题

usblinux把linux系统安装到u盘里

加电

BIOS找启动方式,找设备

MBR

grub

vmlinux initrd

产生init

/etc/inittab-->找到应该启动的级别

按照不同的级别启动不同类型的服务/etc/rcX.d/

/etc/rc.sysinit

/etc/rc.local

产生终端可以登录

ls/root/install.log

livecd不用安装,直接可以使用系统的CD,DVD

回顾开机启动的过程:

开机-->bios(配置主板的程序,basic input and output system,加电自检,找到启动设备的编号)-->找到mbr(master bootloader record,它是属于硬盘的0磁盘0扇区)-->grub-->通过grub找到vmlinuz和initrd(驱动硬件)-->内核启动,产生init进程-->/etc/inittab(确定系统的启动级别)-->/etc/rc.sysinit(获取主机的网络环境和主机类型,测试与载入设备,是否启动selinux,模块的加载,设置系统时间.................)-->/etc/rc.local

与USB有关的模块

[root@li~]# lsmod|grep ci

uhci_hcd 25421 0

ohci_hcd 24553 0

ehci_hcd 33869 0

--因为U盘分区在windows下不认,所以我这里两G的U盘,直接都用来做usblinux

1,首先删除U盘里原有分区

第一种:用fdisk/dev/sdb,然后用d命令去删除

第二种:dd if=/dev/zero of=/dev/sdb bs=1024 count=1--删除磁盘分区信息

重新按照规划的去分区:

Disk/dev/sdb: 2000 MB, 2000570368 bytes

62 heads, 62 sectors/track, 1016 cylinders

Units= cylinders of 3844* 512= 1968128 bytes

Device Boot Start End Blocks Id System

/dev/sdb1* 1 763 1466455 83 Linux

/dev/sdb2 764 1016 486266 82 Linux swap/ Solaris

Command(m for help): w

--或者分为1G做usblinux,500m做swap,500m留给fat32

Disk/dev/sdb: 2000 MB, 2000570368 bytes

62 heads, 62 sectors/track, 1016 cylinders

Units= cylinders of 3844* 512= 1968128 bytes

Device Boot Start End Blocks Id System

/dev/sdb1* 1 509 978267 83 Linux

/dev/sdb2 510 764 490110 82 Linux swap/ Solaris

/dev/sdb3 765 1016 484344 b W95 FAT32

Command(m for help): w

[root@li~]# partprobe

--有些U盘报kerenl相关的两到三段信息,就不要使用多分区,就分一个分区。

2,格式化分区,并挂载

[root@li www]# partprobe--fdisk分区后,都要用此命令刷新

--这一步,有很多U盘会报错,如果报错的话最好去windows虚拟机下全格一下,再重新在linux下来做

[root@li www]# mkfs-t ext3/dev/sdb1

[root@li www]# mkswap/dev/sdb2

[root@li www]# mkdir/usb

[root@li www]# mount/dev/sdb1/usb/--建立一个目录,挂载/dev/sdb1

3,安装基本的目录结构

准备光盘iso文件,挂载到一个目录去

[root@li www]# mount/share/iso/rhel-5.4-server-i386-dvd.iso/yum/-o loop

[root@li www]# cd/yum/Server/

[root@li Server]# rpm-qip filesystem-2.4.0-2.i386.rpm

Description:

filesystem软件包是安装在红帽 Linux系统上的一个基本

软件包。filesystem含有一个 Linux操作系统的基本目录布局,

包括各目录的正确许可权限。

要使用--nodeps脱离依赖性才可以安装

[root@li Server]# rpm-ivh--root=/usb/--nodeps filesystem-2.4.0-2.i386.rpm

或者先装setup包,再装filesystem包

[root@li~]# rpm-ivh--root=/usb/share/yum/Server/setup-2.5.58-7.el5.noarch.rpm

[root@li~]# rpm-ivh--root=/usb/share/yum/Server/filesystem-2.4.0-2.i386.rpm

[root@li~]# ls/usb--一个基本的目录布局就已经装好了

bin etc lost+found opt sbin sys var

boot home media proc selinux tmp

dev lib mnt root srv usr

4,安装相应的软件包,也就是定制功能

下面最主要的一步就是安装系统的软件包,首先要思考安装的这个USB系统需要什么功能,比如最基本的命令ls,cd等

这里可以选择使用busybox(是一个基本命令工具集),但如果对其不是特别熟悉,还是按基本命令一个一个的来选

首先要装bash包,包含50多个内部命令

[root@dns Server]# chroot/usb--不装bash无法 chroot进去

chroot: cannot run command `/bin/bash': No such file or directory

[root@dns Server]# rpm-qf/bin/ls

coreutils-5.97-23.el5

[root@dns Server]# rpm-qf `which vi`

vim-minimal-7.0.109-6.el5

[root@dns Server]# rpm-qf `which vim`

vim-enhanced-7.0.109-6.el5

[root@dns Server]# rpm-qf `which ping`

iputils-20020927-46.el5

[root@dns Server]# rpm-qf `which mount`

util-linux-2.13-0.52.el5

[root@dns Server]# rpm-qf `which tar`

tar-1.15.1-23.0.1.el5

[root@dns Server]# rpm-qf `which rpm`

rpm-4.4.2.3-18.el5

[root@dns Server]# rpm-qf `which man`

man-1.6d-1.1

[root@dns Server]# rpm-qf `which ssh`

openssh-clients-4.3p2-36.el5

[root@dns Server]# rpm-qf `which awk`

gawk-3.1.5-14.el5

[root@dns Server]# rpm-qf `which sed`

sed-4.1.5-5.fc6

[root@dns Server]# rpm-qf `which grep`

grep-2.5.1-55.el5

[root@dns Server]# rpm-qf `which find`

findutils-4.2.27-6.el5

[root@dns Server]# rpm-qf `which locate`

mlocate-0.15-1.el5.2

[root@dns Server]# rpm-qf `which useradd`

shadow-utils-4.0.17-14.el5

[root@dns Server]# rpm-qf `which passwd`

passwd-0.73-1

[root@dns Server]# rpm-qf `which init`

SysVinit-2.86-15.el5

[root@dns Server]# rpm-qf `which clear`

ncurses-5.5-24.20060715

[root@dns Server]# rpm-qf `which ps`

procps-3.2.7-11.1.el5

[root@dns Server]# rpm-qf/usr/bin/which

which-2.16-7

[root@dns Server]# rpm-qf `which ifconfig`

net-tools-1.60-78.el5

[root@dns Server]# rpm-qf `which fdisk`

util-linux-2.13-0.52.el5

[root@dns Server]# rpm-qf `which partprobe`

parted-1.8.1-23.el5

[root@li~]# rpm-qf `which showmount`

nfs-utils-1.0.9-42.el5

[root@li~]# rpm-qf `which service`

initscripts-8.45.30-2.el5

[root@li Server]# rpm-qf `which bzip2`

bzip2-1.0.3-4.el5_2

[root@li Server]# rpm-qf `which gzip`

gzip-1.3.5-10.el5

--经过上面对基本命令的包查找,最终安装下列这些基本包

[root@dns Server]# yum install--installroot=/usb bash coreutils vim-minimal vim-enhanced iputils util-linux tar rpm man openssh-clients gawk sed grep findutils mlocate shadow-utils passwd SysVinit ncurses procps which net-tools util-linux parted nfs-utils initscripts bzip2 gzip

--如果上面步骤安装完后,有忘记安装的包,再使用yum装不上去

[root@li~]# yum install--installroot=/usb iptables

Loaded plugins: downloadonly, rhnplugin, security

This system is not registered with RHN.

RHN support will be disabled.

Setting up Install Process

No package iptables available.

Nothing to do

--所以再安装的话使用rpm去安装

[root@li~]# rpm-ivh--root=/usb/share/yum/Server/iptables-1.3.5-5.3.el5.i386.rpm

5,安装启动引导文件和模块

[root@li Server]# chroot/usb--使用此命令,就是以/usb目录为根目录了

bash-3.2# ls/boot/--可以看到现在usblinux里的/boot目录没有任何文件

bash-3.2# exit--用exit退出chroot模式

exit

[root@li~]# cp/etc/skel/.bash*/usb/root/-rf

--拷环境变量模版过去

定制支持usb存储启动的ramdisk(initrd文件)

[root@li Server]# mkinitrd--with usb_storage/usb/boot/initrd.img `uname-r`

从真机上拷贝vmlinuz到usblinux对应目录

[root@li Server]# cp/boot/vmlinuz-2.6.18-164.el5/usb/boot/vmlinuz

从真机上拷贝内核模块到usblinux对应目录

[root@li Server]# cp/lib/modules/2.6.18-164.el5//usb/lib/modules/-rf

拷内核源码,可选步骤

[root@li Server]# mkdir/usb/usr/src/kernels/

[root@dns Server]# cp/usr/src/kernels/2.6.18-164.el5-i686//usb/usr/src/kernels/-rf

6,安装并手动写grub

--如果是用真实机分区来代替U盘做usblinux的话,这一步不用做,只需要把这个分区的引导信息加入到真实机的配置文件里就可以了

安装grub包,用--nodeps脱离依赖性

[root@li Server]# rpm-ivh--nodeps--root=/usb grub-0.97-13.5.i386.rpm

--脱离依赖安装,会没有splash.xpm.gz图片,可以从真机拷一个

也可以按下面安装

[root@li~]# rpm-ivh--root=/usb/share/yum/Server/*logos*

warning:/share/yum/Server/redhat-logos-4.9.16-1.noarch.rpm

[root@li~]# rpm-ivh--root=/usb/share/yum/Server/grub-0.97-13.5.i386.rpm

--但这样安装完后,grub目录下只有一个背景图片

[root@dns Server]# ls/usb/boot/grub/

splash.xpm.gz

grub-install安装到/dev/sdb

[root@li Server]# grub-install--root-directory=/usb--recheck/dev/sdb

--如果是用真实机分区来做的话,这里/dev/sdb改成/dev/sda

--grub-install之后,grub目录的基本文件就有了(除了配置文件grub.conf)

[root@dns Server]# ls/usb/boot/grub/

device.map iso9660_stage1_5 splash.xpm.gz vstafs_stage1_5

e2fs_stage1_5 jfs_stage1_5 stage1 xfs_stage1_5

fat_stage1_5 minix_stage1_5 stage2

ffs_stage1_5 reiserfs_stage1_5 ufs2_stage1_5

修改device.map

[root@li Server]# vim/usb/boot/grub/device.map

(hd0)/dev/sdb

--如果是用真实机分区来做的话,这里/dev/sdb改成/dev/sda

手动写grub.conf文件

--下面是以u盘来做的写法

[root@li Server]# vim/usb/boot/grub/grub.conf

default=0

timeout=-1

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title usblinux

root(hd0,0)

kernel/boot/vmlinuz ro root=/dev/sdb1

initrd/boot/initrd.img

=============================================

--因为我这次是使用真实机的/dev/sda14来做根./dev/sda15做swap

上面的第6步不用做,只做这一小段就好了

所以把下面这段加到真实机的/boot/grub/grub.conf里

title usblinux

root(hd0,13)--因为我模拟的这个usblinux的根为sda14,所以这里写13

kernel/boot/vmlinuz ro root=/dev/sda14

initrd/boot/initrd.img

# grub-install/dev/sda--加完后,就grub-install安装一下

--------------------------------------------------

7,拷贝密码文件,拷贝环境变量

--这一步可以不拷,因为现在usblinux上默认有passwd和group文件,没有shadow和gshadow

--里面默认有root用户和系统用户

[root@li Server]# cp/etc/passwd/usb/etc/passwd

[root@li Server]# chroot/usb/--再次chroot到/usb目录,提示符就变了

[root@li/]# pwconv--同步/etc/passwd和/etc/shadow

[root@li/]# grpconv--同步/etc/group和/etc/gshadow

[root@li/]# passwd root--修改root的密码,到时候登录需要

8,手动编写fstab文件

[root@li/]# vim/etc/fstab--注意这里是usblinux系统里的fstab,因为已经chroot进来了

/dev/sdb1/ ext3 defaults 0 0

/dev/sdb2 swap swap defaults 0 0

devpts/dev/pts devpts gid=5,mode=620 0 0

sysfs/sys sysfs defaults 0 0

proc/proc proc defaults 0 0

tmpfs/dev/shm tmpfs defaults 0 0

--用真实机的/dev/sda14来做根./dev/sda15做swap的话,就把上面的sdb1换成sda14,sdb2换成sda15,其它的不变

9,让usblinux支持网络

从真机拷贝eth0的配置文件到usblinux对应目录中:

[root@li Server]# cp/etc/sysconfig/network-scripts/ifcfg-eth0/usb/etc/sysconfig/network-scripts/

修改网络配置文件,可以改成静态IP

[root@li Server]# vim/usb/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=dhcp

ONBOOT=yes

从真机拷贝全局网络配置文件到usblinux对应目录中

[root@li Server]# cp/etc/sysconfig/network/usb/etc/sysconfig/

从真机拷贝modprobe.conf到usblinux对应目录中

[root@li Server]# cp/etc/modprobe.conf/usb/etc/

alias eth0 8139too--注意这一句在不同的系统里可能要修改,现在这里的网卡模块是8139too,所以这里是8139too就可以;这个在虚拟机里为pcnet32

然后重启系统,在bios选择使用usb引导进入系统,去验证功能

--如果是真实机分区做的,就不用改bios,直接在grub选择菜单选择usblinux引导进入就可以了

-------------------------------------------------------------

上面的步骤里还没有去加的功能有动态获取IP(需要安装dhclient包)

没有yum命令,没有图形界面(有需要的话,自己使用rpm安装yum命令后,使用yum安装图形包的两个组)

启动时有大量无用信息,可以在grub.conf里加rhgb quiet来解决

但重启后还会有一个错误信息:

(会有一个usb_storage的报错信息,但此信息没有影响,是mkinitrd--with usb_storage时造成的)

如果一定要除掉这句报错,可以手工修改initrd文件

# cd/tmp

# cp/usb/boot/initrd.img/tmp/initrd.img.gz

# gunzip initrd.img.gz

# cpio-i--make-directories< initrd.img

# rm initrd.img

# vim init--打开,删除以下的几行

echo"loading usb-storage.ko module"

insmod/lib/usb-storage.ko

echo waiting for dirver initialization

stabilized/proc/bus/usb/devices

echo waiting for driver initializtin

# find.| cpio-c-o>../initrd.img

# gzip-9../initrd.img

# cp../initrd.mg.gz/usb/boot/initrd.img

=============================================================

阅读剩余
THE END