首页 > 代码库 > LAMP搭建--未整理版
LAMP搭建--未整理版
[root@lamp ~]#yum search 关键字 //安装过程中提示少哪个程序就搜关键字找包名
[root@lamp httpd-2.2.25]# ./configure --prefix=/usr/local/httpd --enable-so --enable-rewrite --enable-cgi --enable-charrset-lite --enable-ssl
[root@lamp ~]#useradd -M -s /sbin/nologin mysql
[root@lamp mysql-5.1.62]# ./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charset=gbk,gb2312
[root@lamp mysql-5.1.62]#make && make install
[root@lamp mysql]# ./bin/mysql_install_db --user=mysql
[root@lamp mysql-5.1.62]#cp -p support-files/my-medium.cnf /etc/my.cnf
[root@lamp ~]#vim /etc/ld.so.conf
1 include ld.so.conf.d/*.conf 2 /usr/local/mysql/lib/mysql 3 /usr/local/mysql/include/mysql
[root@lamp ~]#ldconfig
[root@lamp ~]#chown -R mysql /usr/local/myslq
[root@lamp php-5.4.19]# ./configure --prefix=/usr/local/php --enable-mbstring --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql=/usr/local/mysql/ --enable-sockets --with-config-file-path=/usr/local/php
[root@lamp php-5.4.19]# make &&make install
[root@lamp php-5.4.19]#cp php.ini-production /usr/loccal/php/etc/php.ini
[root@lamp ~]#vim /usr/local/httpd/conf/httpd.conf
... 54 LoadModule php5_module modules/libphp5.so 168 DirectoryIndex index.html index.php 311 AddType application/x-httpd-php .php ...
[root@lamp ~]#/usr/local/httpd/bin/apachectl stop
[root@lamp ~]#/usr/local/httpd/bin/apachectl start
本文出自 “sleepcat” 博客,请务必保留此出处http://sw5720.blog.51cto.com/8812314/1530881