当前系统为CentOS Linux release 6.0 (Final),内核版本为2.6.32-71.el6.i686.由于最近内核出现最新的漏洞(linux kernel 又爆内存提权漏洞,>=2.6.39 内核无一幸免 http://blog.zx2c4.com/749 和http://www.haohtml.com/news/netsafe/47456.html),所以将内核升级至3.2.2最新版本. 1.查看当前系统内核 [root@bogon linux-3.2.2]# uname -r 2.6.32-71.el6.i686 2.下载linux-3.2.2内核包 cd ~ wget -c http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.2.tar.bz2 tar jxvf linux-3.2.2.tar.bz2 cd linux-3.2.2 3.配置内核并安装 make mrproper #清除环境变量,即清除配置文件 make menuconfig #在菜单模式下选择需要编译的内核模块
Browsing the archives for the centos tag
引言: 必须明白: vncserver在调用的时候,会根据你的配置来启用server端的监听端口, 端口默认是从5900开始,再加上你的桌面号。 比如你的桌面号为1,则vnc的连接端口号为5900+1=5901 比如你的桌面号为10000,则vnc的连接端口号为5900+10000=15900 ====================================================================== 下面配置VNC服务器,使用户(root)能够通过vnc客户端远程连接到linux系统的图形界面(前提是你的服务器要安装桌面) 1、检查linux系统是否安装VNC 在终端窗口输入命令: rpm -q vnc-server 返回信息如下 package vnc-server is not installed 说明vnc服务器没有安装
刚刚发布了Centos6.1新版本.就下载了64位的版本进行测试. 按照原来的lnmp安装教程.在安装php的过程中.执行到./configure 这一步的时候.竟然提示"configure: error: libjpeg.(a|so) not found"这项错误.明明已经安装过了libjpeg 和libjpeg-devel了.可这里仍然提示找不到库文件.很明显是路径的问题.默认会在/usr/lib/目录里查找相应的文件.但用whereis libjpeg发现.libjpeg被安装在了/usr/lib64/目录里. [root@bogon php-5.2.17]# whereis libjpeg libjpeg: /usr/lib/libjpeg.so /usr/lib64/libjpeg.so 1.如果提示"configure: error: libjpeg.(a|so) not found"错误 所以这里我们需要复制一份libjpeg.so到/usr/lib/目录里才可以.再次执行./configure命令即可. cp -frp /usr/lib64/libjpeg.* /usr/lib/ 2.注意过程中还会提示" Configure: error: libpng.(also) not found."错误,解决办法和上面的一样. cp -frp /usr/lib64/libpng* /usr/lib/ 3.如果提示"configure: error: Cannot find ldap libraries in /usr/lib."的话. cp -frp /usr/lib64/libldap* /usr/lib/ 说明: 通过上面的搜索其实就知道一些原因了,configure一般的搜索编译路径为/usr/lib/下,因为php默认就在/usr/lib/下找相关库文件,而x64机器上是在:/usr/lib64.这时你就可以直接把需要的库文件从/usr/lib64中拷贝到/usr/lib/中去就可以了. 常见错误参考:http://apps.hi.baidu.com/share/detail/11746738
参考前面的教程:http://blog.haohtml.com/archives/6051安装了lnmp环境,这里要安装memcached.但在编译的时候提示需要指定libevent库,可是在安装lnmp的候默认是已经安装过的.解决办法如下: memcached需要libevent支持,所以首先安装libevent 查看系统是否已经安装libevent # rpm -qa|grep libevent 如果有,不要高兴,先升级 #yum -y install libevent 测试libevent是不是已经安装成功 #ls -al /usr/lib | grep libevent 可以看到多个已经安装的类包安装memcached(http://memcached.org/) 可以先查看编译参数 # wget http://memcached.googlecode.com/files/memcached-1.4.8.tar.gz # tar zxvf memcached-1.4.8.tar.gz # cd memcached-1.4.8 # ./configure --help # ./configure --prefix=/usr/local/memcached # make # make install 在这个时候,不一定会编译通过,依旧会出现: checking for libevent directory... configure: error: libevent is required. You can get it [...]
sendmail服务在系统启用的时候特别的慢,平时用的也不多的,所以为了安全直接将此服务关闭.并加速机器启用速度. 1,关闭sendmail服务 /etc/rc.d/init.d/sendmail stop Shutting down sendmail: [ OK ] Shutting down sm-client: [ OK ] 2,关闭sendmail自启动 [root@lsp ~]# chkconfig sendmail off 3,确认sendmail自启动已被关闭(都为off就OK) [root@lsp ~]# chkconfig --list sendmail sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off -------------- chkconfig --list 可以用来查看所有的服务 如果提示chkconfig命令找不到,可使用/sbin/chkconfig的形式
切记升级系统前,请务必备份重要文件! 首先,清除所有软件包 yum clean all yum list updates 升级centos yum update reboot 这样就升级完了,可以检查一下系统目前的版本: lsb_release -a 这样就升级完了,可以检查一下系统目前的版本: #rpm -q centos-release
RHEL升级到版本6以后,发现root用户密码破解和centos.5的不一样了;在单用户模式下输入passwd命令不再有效。 这是由于在安装RHEL6(centos6)的过程中或者以前使用过程上,SELinux的默认级别为非0的缘故; 因此在进入单用户模式以后需要输入 setenforce 0 命令来将SELinux级别临时变为0以后,才可以使用passwd命令! 当然如果你在安装过程中,更改了SELinux的级别,那么就不会遇到上述问题了! 据称,这是RHEL6的一个bug……
今天在服务器上修改时间的进修,发现用date -s 21:45:12不起作用,提示" Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. "错误,后来google了一下,有人说在64位平台的原因,说是一个bug的. 在执行clock -w 和hwclock命令的时候,总提示错误信息.这里介绍一种方法: #tzselect 然后选择"5) Asia",回车,选择国家" 9) China"回车,在选择的地区里选择"1) east China - Beijing, Guangdong, Shanghai, etc.",最后选择"1) Yes"对上面的设置进行确认即可.会提示以下信息,这时时间已经正常了.为了长久有效,可以添加到.profile文件里,我是添加到/etc/profile文件里了,不知道对否的.反正时间是过来了. You can make this change permanent for yourself by appending the line [...]
在向大家详细介绍CentOS lighttpd安装之前,首先让大家了解下CentOS系统作用,然后全面介绍CentOS lighttpd安装,CentOS社区不断与其他的同类社区合并,使CentOS Linux逐渐成为使用最广泛的RHEL兼容版本。CentOS Linux的稳定性不比RHEL差,唯一不足的就是缺乏技术支持,因为它是由社区发布的免费版。希望对大家有用。 CentOS lighttpd安装 wget http://www.lighttpd.net/download/lighttpd-1.4.19.tar.gz tar zxvf lighttpd* cd lightt* ./configure --prefix=/usr/local/lighttpd --with-pcre CentOS lighttpd安装这时候说缺少pcre-devel yum install pcre-devel ./configure --with-pcre make make install 在ubuntu下用apt-get install lighttpd来安装,方便了很多,CentOS lighttpd安装就要自己配置了.
Starting php_fpm eAccelerator: Could not allocate 67108864 bytes, the maximum size the kernel allow的解决办法
11 Jul, 2011 in 服务器类今天在刚装的Centos6.0的系统,在参考以前写的教程http://blog.haohtml.com/archives/6051,安装eaccelerator后,在执行命令"/usr/local/php/sbin/php-fpm start"后,提示以下错误: [root@bogon soft]# /usr/local/php/sbin/php-fpm start Starting php_fpm eAccelerator: Could not allocate 67108864 bytes, the maximum size the kernel allows is 33554432 bytes. Lower the amount of memory request or increase the limit in /proc/sys/kernel/shmmax. PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0 PHP Fatal error: Unable to start [...]