导航

随笔分类 -  操作系统 - CentOS

摘要:同事刚装的一台CentOS服务器,SSH登录乱码:猜测应该是安装时选择的是简体中文,因为发现/etc/sysconfig/i18n文件里面是zh_CN。LANG="zh_CN.UTF-8"修改/etc/sysconfig/i18n为en_US,重新登录,测试OK。LANG="en_US.UTF-8" 阅读全文

posted @ 2014-05-27 12:31 eastson 阅读(192) 评论(0) 推荐(0) 编辑

摘要:系统环境:centos6.3X64错误信息:[root@localhost~]#lspci-bash:lspci:commandnotfound问题原因:这是因为没有安装pciutils包造成的。解决办法:#yuninstallpciutilsPS:同样,如果lsusb时也提示找不到命令,那只要#yuminstallusbutils就可以了 阅读全文

posted @ 2013-10-29 11:10 eastson 阅读(4188) 评论(0) 推荐(0) 编辑

摘要:原文地址:http://www.cnblogs.com/gaojun/archive/2012/08/22/2650229.html一、LVM简介LVM是 Logical Volume Manager(逻辑卷管理)的简写,它由Heinz Mauelshagen在Linux 2.4内核上实现。LVM将一个或多个硬盘的分区在逻辑上集合,相当于一个大硬盘来使用,当硬盘的空间不够使用的时候,可以继续将其它的硬盘的分区加入其中,这样可以实现磁盘空间的动态管理,相对于普通的磁盘分区有很大的灵活性。与传统的磁盘与分区相比,LVM为计算机提供了更高层次的磁盘存储。它使系统管理员可以更方便的为应用与用户分配存储 阅读全文

posted @ 2013-10-22 11:07 eastson 阅读(285) 评论(0) 推荐(0) 编辑

摘要:原文地址:OpenERP 7.0安装与配置#!/bin/bash -e# Modified script from Carlos E. Fonseca Zorrilla # 1. Add the two additional installation sources:rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpmrpm -ivh http://yum.pgrpms.org/9.2/redhat/rhel-6-i386/pgdg-centos92-9.2-6.noarch.rpm# 阅读全文

posted @ 2013-07-04 15:52 eastson 阅读(759) 评论(0) 推荐(0) 编辑

摘要:root登录后以非root用户startx时报:PAM authentication failed, cannot start Xserver.Perhaps you do not have console ownership?解决方法:touch /var/run/console/<user>比如 touch /var/run/console/oracle操作系统:CentOS 6.4 阅读全文

posted @ 2013-05-29 15:10 eastson 阅读(1756) 评论(0) 推荐(0) 编辑

摘要:CentOS 6.4当前软件源中的postgresql-server版本为8.4.13。1. 安装PostgreSQL Server:$ yum groupinstall "PostgreSQL Database server"默认的安装目录是/var/lib/pgsql。安装过程中会创建postgres用户和群组。安装完成后可以将服务postgresql设置成自启动:$ chkconfig postgresql on2. 启动postgresql服务,在此之前需要先初始化:$ service postgresql initdbInitializing database: 阅读全文

posted @ 2013-05-25 11:53 eastson 阅读(543) 评论(0) 推荐(0) 编辑

摘要:yumgroupinstall"Desktop"yumgroupinstall"XWindowSystem"yumgroupinstall"ChineseSupport"[注意] 安装minial centos时,如果默认选择的是英文,需要修改/etc/sysconfig/i18n,将LANG修改为LANG="zh_CN.UTF-8"启动gnome:startx,然后按下Ctrl+Alt+F2。如果要自动启动gnome,则编辑/etc/inittab文件,将id:3:initdefault修改为id:5:initd 阅读全文

posted @ 2013-05-24 17:08 eastson 阅读(204) 评论(0) 推荐(0) 编辑

摘要:CentOS默认的iptables规则除了允许SSH(端口22)连进来以外,其它都被禁止。# cat /etc/sysconfig/iptables# Firewall configuration written by system-config-firewall# Manual customization of this file is not recommended.*filter:INPUT ACCEPT [0:0]:FORWARD ACCEPT [0:0]:OUTPUT ACCEPT [0:0]-A INPUT -m state --state ESTABLISHED,RELATED 阅读全文

posted @ 2012-09-17 11:25 eastson 阅读(1290) 评论(0) 推荐(0) 编辑

摘要:SELinux默认运作在"Enforcing"模式。$ sestatus -vSELinux status: enabledSELinuxfs mount: /selinuxCurrent mode: enforcingMode from config file: enforcingPolicy version: 24Policy from config file: targeted"Enforcing"模式下Zend Server ... 阅读全文

posted @ 2012-09-17 10:57 eastson 阅读(1192) 评论(0) 推荐(0) 编辑

摘要:因为需要做一些PHP的开发,这时候通常会选择Zend Server CE和Zend Eclipse PDT。设置Apache HTTPDhttpd默认是和CentOS一起安装的。其配置目录是/etc/httpd,网站目录/var/www。我们可以将它配置成开机启动。# chkconfig httpd on# service httpd restart安装Zend Server CE1. 配置Zend软件源。新建文件/etc/yum.repos.d/zend.repo,内容如下:[Zend]name=Zend Serverbaseurl=http://repos.zend.com/zend-se 阅读全文

posted @ 2012-09-15 08:42 eastson 阅读(751) 评论(0) 推荐(0) 编辑

摘要:这个是由/etc/yum.conf控制的:# cat /etc/yum.conf[main]cachedir=/var/cache/yum/$basearch/$releaseverkeepcache=0debuglevel=2logfile=/var/log/yum.logexactarch=1obsoletes=1gpgcheck=1plugins=1installonly_limit=5... ...cachedir是软件包下载后保存的目录。但默认是不保存的,因为keepcache=0。若想要保存下载的软件包,必须将keepcache设置1才可以。 阅读全文

posted @ 2012-09-14 16:11 eastson 阅读(2313) 评论(0) 推荐(1) 编辑

摘要:OpenJDK 是 Sun 公司为著名的 Java 平台构建的 Java 开发环境的开源版本,完全自由,开放源码。Sun 公司在 2006 年的 JavaOne 大会上称将对 Java 开放源代码,于2009年4月15日正式发布 OpenJDK。查询软件源中提供的OpenJDK版本:# yum search openjdkLoaded plugins: fastestmirror, refresh-packagekit, securityLoading mirror speeds from cached hostfile * epel: mirrors.ustc.edu.cn * rpmfor 阅读全文

posted @ 2012-09-14 11:02 eastson 阅读(2578) 评论(0) 推荐(0) 编辑

摘要:我习惯使用Chrome浏览器,因此安装完Linux后一般都会再安装Chrome。1. 修改/etc/hosts。国内访问Google通常都会有一些莫名其妙的问题出现,这时候需要修改hosts。具体修改方法参考《Facebook、Twitter、Google+ hosts》。2. 添加Google软件源。新增文件/etc/yum.repos.d/google-chrome.repo,内容如下:[google-chrome]name=google-chrome - 64-bitbaseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64en 阅读全文

posted @ 2012-09-14 10:45 eastson 阅读(1460) 评论(0) 推荐(0) 编辑

摘要:我的CentOS是用VirtualBox做的虚拟机,安装好以后最好再将VBoxAdditions增强功能装上,主要目的是能够在虚拟机和宿主机之间能够共享文件。1. 更新内核。CentOS 6.2对应的kernel默认为2.6.32-220.el6:# uname -r2.6.32-220.el6.x86_64安装增强功能需要kernel-devel包,必须保证kernel-devel和kernel版本的一致。查看软件源中kernel-devel的版本:]# yum info kernel-develLoaded plugins: fastestmirror, refresh-packageki 阅读全文

posted @ 2012-09-14 10:08 eastson 阅读(2311) 评论(0) 推荐(0) 编辑

摘要:CentOS安装好以后,默认使用fastmirror插件动态地选择镜像源。这种方式的弊端是有可能每次都会选择到不同的镜像源,导致多次重复地下载软件列表。打开/etc/yum.repos.d/CentOS-Base.repo,可以看到类似下面的内容:[base]name=CentOS-$releasever - Basemirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os#baseurl=http://mirror.centos.org/centos/$release 阅读全文

posted @ 2012-09-14 09:23 eastson 阅读(765) 评论(0) 推荐(0) 编辑

摘要:RPMForge是CentOS系统下的软件仓库,拥有4000多种的软件包,被CentOS社区认为是最安全也是最稳定的一个软件仓库。RPMForge官方网站:RPMForgeRPMForge使用方法:Using RepoForge打开Using RepoForge网址,找到对应rpm安装包,然后执行。# rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm上面的代码以CentOS 6.2 64位操作系统为例。安装完毕后,在/etc/yum.repos.d目录下就 阅读全文

posted @ 2012-08-17 16:22 eastson 阅读(437) 评论(0) 推荐(0) 编辑

摘要:CentOS默认会在桌面放三个图标:Computer,Home和Trash。我想把隐藏这些图标。第一步:安装gconf-editor,安装后多多出一个启动项:Applications -> System Tools -> Configuration Editor。# rpm -qa | grep gconf-editor# yum install gconf-editor第二步:修改Gnome配置。打开Configuration Editor,找到/apps/nautilus/desktop,去掉相关图标显示参数前面的勾。 阅读全文

posted @ 2012-08-17 15:49 eastson 阅读(1408) 评论(0) 推荐(0) 编辑

摘要:CentOS启动后会出现一个蓝色的登陆屏幕,输入帐号和密码后才能看到桌面。在该台电脑只是一个人使用的情况下,可以设置成自动登入。我们只需要修改/etc/gdm/custom.conf,为[daemon]添加下面的设置:AutomaticLoginEnable=TrueAutomaticLogin=amonest 阅读全文

posted @ 2012-08-17 08:55 eastson 阅读(395) 评论(0) 推荐(0) 编辑

摘要:CentOS系统在用户闲置一段时间(默认为5分钟)后,会启动屏幕保护程序(默认的屏保为黑屏),并要求重新输入密码才能回到原来的桌面。设置屏幕保护:System -> Preferences -> Screensaver。如果需要取消屏幕保护的锁定功能,将Lock screen when screensaver is active前面的勾去掉就可以了。 阅读全文

posted @ 2012-08-16 16:44 eastson 阅读(3229) 评论(0) 推荐(0) 编辑

摘要:CentOS默认不能自定义左上角启动菜单,alacart软件包提供了这个功能。安装alacarte软件包:# yum install alacarte安装完成后会多出一项启动菜单: System -> Preferences -> Main Menu: 阅读全文

posted @ 2012-08-16 11:33 eastson 阅读(914) 评论(0) 推荐(0) 编辑