- yum -y remove cups\* sendmail iiimf\* FreeWnn\* gnome kde\* 升级前先 用此命令
- yum -y update
- 1、安装及分区
- CentOS 5.4 32位内核2.6.18-164.el5
- 只装开发工具
- [root@localhost ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/sda7 15G 508M 13G 4% /
- /dev/sda6 15G 989M 13G 8% /usr
- /dev/sda5 38G 255M 36G 1% /var
- /dev/sda3 103G 188M 97G 1% /data
- /dev/sda2 95G 188M 90G 1% /backup
- /dev/sda1 99M 17M 77M 18% /boot
- tmpfs 2.0G 0 2.0G 0% /dev/shm
- 装完升级到最新的,5.5版本内核2.6.18-194.26.1.el5
- 然后安装了wget与ntsysv
- 启用4个服务(iptables,network,sshd,syslog)
- 2、安装一些组件
- yum -y install freetype-\* libpng-\* libjpeg-\* libxml2-\* libxslt-\* bzip2\* pcre\*
- grub.conf如下:
- default=0
- timeout=5
- splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz
- hiddenmenu
- title CentOS (2.6.18-194.26.1.el5PAE)
- root (hd0,0)
- kernel /vmlinuz-2.6.18-194.26.1.el5PAE ro root=LABEL=/
- initrd /initrd-2.6.18-194.26.1.el5PAE.img
- title CentOS (2.6.18-164.el5PAE)
- root (hd0,0)
- kernel /vmlinuz-2.6.18-164.el5PAE ro root=LABEL=/
- initrd /initrd-2.6.18-164.el5PAE.img
- [root@localhost ~]# ls (各版本如下)
- anaconda-ks.cfg memcached-1.2.2.tar.gz
- gd-2.0.32.tar.gz mysql-5.1.30.tar.gz
- httpd-2.2.16.tar.gz php-5.2.14.tar.gz
- install.log vsftpd-2.0.6.tar.gz
- install.log.syslog ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
- 二、安装LAMP
- 1、apache安装
- [root@localhost httpd-2.2.16]# ./configure --prefix=/usr/local/apache --enable-so \
- > --enable-rewrite \
- > --enable-mods-shared=all
- [root@localhost httpd-2.2.16]# make clean
- [root@localhost httpd-2.2.16]# make
- [root@localhost httpd-2.2.16]# make install
- 安装好修改httpd.conf
- # Virtual hosts
- Include conf/extra/httpd-vhosts.conf (修改后最前面的#号没了)
- 再修改下面/usr/local/apache/conf/extra目录下的httpd-vhosts.conf
- NameVirtualHost 192.168.0.132:80
- <VirtualHost 192.168.0.132:80>
- ServerAdmin webmaster@test.com
- DocumentRoot "/data/wwwroot/test.com"
- ServerName test.com
- ServerAlias www.test.com
- ErrorLog "logs/dummy-host.example.com-error_log"
- CustomLog "logs/dummy-host.example.com-access_log" common
- </VirtualHost>
- 将apache安装为服务
- [root@localhost apache]# cp ./bin/apachectl /etc/rc.d/init.d/httpd
- 在/etc/rc.d/init.d/httpd里面的#!/bin/sh下面添加
- #chkconfig: 2345 10 90
- #description: Activates/Deactivates Apache Web Server
- 保存
- [root@localhost apache]# chkconfig --add httpd