标签归档:Linux

Update LinuxRHEL yum source to 163 mirror–更新yum源为163的镜像

open source mirror of 163: http://mirrors.163.com/

as a root user

cd /ect/yum.repos.d
wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
yum clean all
yum makecache

But an error occurs:

Timeout on http://mirrors.163.com/centos/6Server/os/x86_64/repodata/repomd.xml
PYCURL ERROR 22- The requested URL returned errer: 404

I can’t find this directory in 163’s webserver (but I do find http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml), so I guess some thing wrong in .repo file.

As for me, I changed all
baseurl=http://mirrors.163.com/centos/$releasever
to
baseurl=http://mirrors.163.com/centos/6

To here, your problem might be solved. For my question about repomd.xml directory is solved, but error of “Timeout on ***” and “cannot retrieve repository metadata” still occur.

I looked up /etc/yum.conf file, and found “proxy” field is available (this may lead me unable to connect 163’s webserver). So I comment them out and yum command works out.

为OSX和Linux的TERMINAL增加时间分割线

Add a Handy Separator Between Commands in Your Terminal on Mac OS X and Linux
为终端的命令行之间添加时间线,增加可读性,效果如下。

Last login: Tue Mar 17 13:18:30 on ttys000
----------------------------------------------------------------------- 13:32:37
zzx@zzxdesk:~$ pwd
/Users/zzx
----------------------------------------------------------------------- 13:38:31
zzx@zzxdesk:~$ cd Desktop/
----------------------------------------------------------------------- 13:38:40
zzx@zzxdesk:~/Desktop$ pwd
/Users/zzx/Desktop
----------------------------------------------------------------------- 13:38:42
zzx@zzxdesk:~/Desktop$

继续阅读

Linux read only file system

正用着的服务器在打开Netbean的时候报磁盘空间不足。

因为这台机器一直是自己在用,于是登陆root用户,du -sh /home/* 想看看最近有没有人其他人在这台机器上用导致磁盘空间不足。发现确实有人在用,于是想清理一下文件释放点空间。

但是这个时候报错 read only file system !! 我觉得,可能是由于硬盘满了,系统不再允许往里写的问题,还有一种可能是文件系统确实坏了,需要fsck。

在网上查了查解决办法,比如

mount -o remount,rw /

比如

cat /ect/fatab

比如

fsck

等等,但是要么不行,要么没有问题,在万念俱灰的时候,重启了下机器,竟然可以删除了,谢天谢地。

但是在删到一半的时候报错 kernel: journal commit I/O error (顿时心都碎了,前面还没弄好呢,又蹦出这个问题) 。fsck修复两个,但是依然报错 read only file system。再重启,在启动过程中,系统提示输入root密码fsck repaire修复。之后

fsck -y /

问题是解决了,但还是没搞定什么原因造成的。另外如果想先备份出文件,建议先scp。