centos6安装包过程中出现的问题

/ 0评 / 0

今天安装centos6后,准备测试下mysql的主从配置。因为centos6采用的是最小安装方式,所以好到安装包都没有。刚才也不知道是什么原因。

好久没有用了,linux命令又都快忘光了。首先还是网卡设置

更新yum源

其中默认是官方的源,不过我用的一般是163网易的源。

[code]

# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#packages used/produced in the build but not released
#[addons]
#name=CentOS-$releasever - Addons
#baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
#gpgcheck=1
#gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

[/code]

 

 

因为centos是最小化安装所以很多命令库都没有,要一一安装比如

-bash: wget: command not found 安装 wget
-bash: make: command not found 安装 make

还有编译工具如gcc等。这下就可以直接yum  install ... 了。

不过总是有这个错误

/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""】想不到原因,搜索得到一篇文章。centos yum 源 问题解析

其中的解释说了很清楚了“

此时聪明的我马上想到了是不是服务器解析不了域名了,导致repomd.xml下载不下来呢?

然后我就ping了一下mirrors.ustc.edu.cn , 果然出现错误:ping: unknown host mirrors.ustc.edu.cn。显然是DNS配置问题了,DNS域名服务器IP地址配的不对。”

解决办法:1、在其他机器上ping源镜像地址,把/etc/hosts里面 加了一行 mirrors.ustc.edu.cn  202.38.95.110,不过这是权宜之计 。2、推荐使用,需要配置正确的DNS。方法是:打开/etc/resolv.conf 文件,加入一行 nameserver ip。此处把ip换成IDC运营商给的DNS的地址就可以了。我的加上了google的dns地址 nameserver 8.8.8.8

这样yum 就可以正常下载,自动安装了。

然后就继续安装vsftpd,这里就是遇上了,执行make时,遇上command not found的问题;经查make包没有安装,yum直接安装上便好。

 

其中vsftd安装成功后,遇上553 Could not create file问题。经搜索得知。

可能一、是文件目录中的写入权限不够或者是目录所有者及用户组不对。可能二、/etc/vsftpd.conf 中write_enable属性是否为write_enable = yes

以新添加的username为例。

useradd -d /opt/ftp -g ftp-s /sbin/nologin username

1、其中 /opt/ftp的写入权限没有;chmod 755 /opt/ftp 即可

2、owner应该是username,group应该是ftp组;chown -v username:ftp /opt/ftp

 

在编译mysql中欧make时,遇到了

【/depcomp: line 571: exec: g++: not found】 这样的问题,查找gcc的已安装包

再查看一下本机上与gcc相关的安装包有哪些,缺少gcc-c++包
[code]

yum install gcc-c++ -y

[/code]

安装之后

再次进入mysql目录,make clean 再重新编译。

不过又碰到问题了。

【../include/my_global.h:1099: 错误:对 C++ 内建类型 ‘bool’ 的重声明】搜索得来的解决方案

“再次make && make install 后出现错误
../include/my_global.h:1099: 错误:对 C++ 内建类型 ‘bool’ 的重声明

这个错误 是不是你 先./congfigure 又 装的GCC 又make 的?

是的话 重新./configure  在make clean  make make install  就解决了”  网上好东西就是多,确实如此,真是要多分享啊。

 

还是mysql编译中,遇见了【xmalloc.h:29:31: 错误:readline/rlstdc.h】这样的问题,不过没有搜索到对应的解决方法。个人觉得刚才多次make && make install 后可能出现安装了,但部分内容没有卸载清除干净的问题,于是执行

[code]

[root@localhost mysql-5.0.81]# make uninstall

[root@localhost mysql-5.0.81]# make clean

[root@localhost mysql-5.0.81]# make && make install

[/code]

这次执行便成功了,没有问题了。

发表评论

您的电子邮箱地址不会被公开。

*