实现LAMP源码安装:
Linux+Apache+Mysql+Perl/PHP/Python一组常用来搭建动态网站或者服务器的开源软件,本身都是各自独立的程序,但是因为常被放在一起使用,拥有了越来越高的兼容度,共同组成了一个强大的Web应用程序平台
以下所用到的软件包都可以从这个网站下载 :
http://mirrors.sohu.com/
=============================
httpd-2.2.19.tar.bz2
mysql-5.5.15-linux2.6-i686.tar.gz
php-5.3.6.tar.bz2
libmcrypt-2.5.8.tar.bz2
=============================
一、安装httpd
yum -y groupinstall "Development Libraies" "Development Tools" "Legacy Software" "X Software Development"
fdisk /dev/sda
12 pvcreate /dev/sda5
13 partprobe /dev/sda
15 vgcreate myvg /dev/sda5
16 lvcreate -L 2G -n mydata myvg
17 lvdisplay
18 mke2fs -j -L MYDATA /dev/myvg/mydata
19 mkidr -pv /mydata/data
21 mount /dev/myvg/mydata /mydata/
22 vim /etc/fstab
二、安装mysql
23 groupadd -g 3306 mysql
24 useradd -g mysql -s /sbin/nologin -u 3306 -M mysql
25 id mysql
26 chown -R mysql:mysql /mydata/
27 ll -d /mydata/
28 cd /usr/local/mysql
30 chown -R mysql:mysql .
31 pwd
32 ls
34 scripts/mysql_install_db --user=mysql --datadir=/mydata/data
35 ls /mydata/data/
37 chown -R root .
38 ll
39 ls support-files/
准备服务启动脚本
40 cp support-files/mysql.server /etc/init.d/mysqld
41 chkconfig --add mysqld
42 chkconfig --list mysqld
43 ls /etc/my.cnf
44 ls support-files/
45 cp support-files/my-large.cnf /etc/my.cnf
46 vim /etc/my.cnf
47 service mysqld start
48 netstat -tnl
49 echo $PATH
50 /usr/local/mysql/bin/mysql
51 export PATH=$PATH:/usr/local/mysql/bin
52 echo $PATH
53 mysql
54 vim /etc/profile
55 ls
56 vim /etc/ld.so.conf
57 vim /etc/ld.so.conf.d/mysql.conf
58 ldconfig -v | grep mysql
59 ls /usr/include/
60 ln -sv /usr/local/mysql/include /usr/include/mysql
62 ll
63 vim /etc/man
64 vim /etc/man.config
65 ls
66 cd
68 tar xf httpd-2.2.19.tar.bz2
70 cd httpd-2.2.19
72 less INSTALL
74 ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-ssl --enable-modules=most --enable-mods-shared=most --enable-so
75 make
=================================================
-----------------------------------------------------------------
#vi /etc/httpd/httpd.conf
添加如下两行
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
定位至: DirectoryIndex index.html
修改为: DirectoryIndex index.php index.html
service httpd restart