CentOS Aapache+Mysql+PHP安装

 

CENTOS 5的虚拟机,怎么从图形界面切换到命令行界面

 

1.临时切换:
ctrl+alt+1 …… ctrl+alt+6一共六个控制台。
2.永久关闭图形化:
在root下输入 vi /etc/inittab 将init:5修改为init:3 

 


Mysql rpm包安装,不能重定位(relocatable)

 

rpm包安装异常,--prefix 参数不能重定位,安装到另一个目录的原因,error: package is not relocatable
 
[mysql@test922 ~]$ rpm --install --prefix linuxqq-v1.0.2-beta1.i386.rpm
error: linuxqq is not relocatable


经查找,可以使用下面的命令查看rpm包是否可以重定位,也就是安装到另一个目录。

# rpm -qpi linuxqq-v1.0.2-beta1.i386.rpm |head
Name        : linuxqq                      Relocations: (not relocatable)
Version     : v1.0.2                            Vendor: Tencent Inc.
Release     : beta1                         Build Date: 2009年01月05日 星期一 17时31分44秒
Install Date: (not installed)               Build Host: localhost.localdomain
Group       : Internet                      Source RPM: linuxqq-v1.0.2-beta1.src.rpm
Size        : 6346491                          License: Commercial
Signature   : (none)
Packager    : @Home
Summary     : QQ for Linux v1.0.2 Beta1
Description :



从结果看到
Relocations: (not relocatable)

是无法修改安装目录的,也就是不能重定位,只有去掉 --prefix参数。


在虚拟机上用Yum安装提示错误
用yum安装cpp时,出现错误:
[root@localhost ~]# yum install cpp
Loaded plugins: fastestmirror
Determining fastest mirrors
 * addons: centos.ustc.edu.cn
 * base: centos.ustc.edu.cn
 * extras: centos.ustc.edu.cn
 * updates: centos.ustc.edu.cn
addons                                                                                                       |  951 B     00:00    
addons/primary                                                                                               |  201 B     00:00    
base                                                                                                         | 2.1 kB     00:00    
base/primary_db                                                                                              | 1.6 MB     00:06    
extras                                                                                                       | 2.1 kB     00:00    
extras/primary_db                                                                                            | 180 kB     00:00    
updates                                                                                                      | 1.9 kB     00:00    
updates/primary_db                                                                                           | 571 kB     00:01    
http://centos.ustc.edu.cn/centos/5.4/updates/i386/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                                           | 567 kB     00:01    
http://centos.candishosting.com.cn/5.4/updates/i386/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/primary_db                                                                                           | 567 kB     00:01    
http://ftp.twaren.net/Linux/CentOS/5.4/updates/i386/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
http://ftp.isu.edu.tw/Linux/CentOS/5.4/updates/i386/repodata/primary.sqlite.bz2: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
 
先安装别的包,有时就能安装上。是个别包的传输速度问题。

CentOS修改默认语言
centos/redhat 修改系统默认语言

/etc/sysconfig/i18n
将LANG="zh_CN.UTF-8" 换成 LANG="en_US.UTF-8"


 


 

账户不能用问题


提示:this account is currently not available

 

我是创建了一个新用户。网上查到的处理办法是修改/etc/passwd中shell的值,默认是/sbin/nologin,改成/bin/bash即可。

 


bz2 解压

 

bzip2 -d  filename.tar.bz2

tar -xvf *.tar

 

posted @ 2010-04-30 21:02  BaseCN  阅读(231)  评论(0编辑  收藏  举报