[iyunv@lamphttpd-2.2.27]# mkdir /home/oldboy/tools -p [iyunv@lamphttpd-2.2.27]# cd /home/oldboy/tools/ [iyunv@lamphttpd-2.2.27]# tar xf httpd-2.2.27.tar.gz [iyunv@lamphttpd-2.2.27]# cd httpd-2.2.27 [iyunv@lamphttpd-2.2.27]# ./configure --prefix=/application/apache2.2.27 --enable-deflate--enable-expires --enable-headers --enable-modules=most --enable-so--with-mpm=worker --enable-rewrite
错误1:
checking for zlib location... not found
checking whether to enable mod_deflate...configure: error: mod_deflate has been requested but can not be built due toprerequisite failures
[iyunv@lamphttpd-2.2.27]# ./configure --prefix=/application/apache2.2.27 --enable-deflate--enable-expires --enable-headers --enable-modules=most --enable-so--with-mpm=worker --enable-rewrite [iyunv@lamphttpd-2.2.27]# make [iyunv@lamphttpd-2.2.27]# make install
[iyunv@lamp httpd-2.2.27]# [iyunv@lamphttpd-2.2.27]# ln -s /application/apache2.2.27/ /application/apache [iyunv@lamphttpd-2.2.27]# ll /application/apache/
total 60
drwxr-xr-x. 2 root root 4096 Jun 17 06:40 bin
drwxr-xr-x. 2 root root 4096 Jun 17 06:40build
drwxr-xr-x. 2 root root 4096 Jun 17 06:40cgi-bin
drwxr-xr-x. 4 root root 4096 Jun 17 06:40conf
drwxr-xr-x. 3 root root 4096 Jun 17 06:40error
drwxr-xr-x. 2 root root 4096 Mar 14 2014 htdocs
drwxr-xr-x. 3 root root 4096 Jun 17 06:40icons
drwxr-xr-x. 2 root root 4096 Jun 17 06:40include
drwxr-xr-x. 3 root root 4096 Jun 17 06:40 lib
drwxr-xr-x. 2 root root 4096 Jun 17 06:40logs
drwxr-xr-x. 4 root root 4096 Jun 17 06:40 man
drwxr-xr-x. 14 root root 12288 Mar 14 2014 manual
drwxr-xr-x. 2 root root 4096 Jun 17 06:40modules
[iyunv@lamp httpd-2.2.27]# [iyunv@lamphttpd-2.2.27]# /application/apache/bin/apachectl -l|egrep"_so|_rewrite|header|expire|deflate"
mod_deflate.c
mod_expires.c
mod_headers.c
mod_rewrite.c
mod_so.c
[iyunv@lamp httpd-2.2.27]# [iyunv@lampconf]# /application/apache/bin/apachectl [iyunv@lampconf]# /application/apache/bin/apachectl -l
[iyunv@lamp httpd-2.2.27]#/application/apache/bin/apachectl start
httpd: apr_sockaddr_info_get() failed for lamp
问题2:
httpd: Could not reliably determine theserver's fully qualified domain name, using 127.0.0.1 for ServerName
解决方法: [iyunv@lampconf]# cd /application/apache/conf/ [iyunv@lampconf]# vi httpd.conf
#ServerNamewww.example.com:80
ServerName127.0.0.1
[iyunv@lampconf]# grep -i DocumentRoot /application/apache/conf/httpd.conf
# DocumentRoot: The directory out of which you willserve your
DocumentRoot"/application/apache2.2.27/htdocs"
# This should be changed to whatever you setDocumentRoot to.
# accesscontent that does not live under the DocumentRoot.
[iyunv@lamp conf]#
错误1:
150617 7:48:55 [Warning] '--skip-locking'is deprecated and will be removed in a future release. Please use'--skip-external-locking' instead.
OK
Filling help tables...
150617 7:48:55 [Warning] '--skip-locking' is deprecated and will be removed ina future release. Please use '--skip-external-locking' instead.
OK
解决方法:
[iyunv@lamp mysql-5.1.72]# vi /etc/my.cnf
# The MySQL server
[mysqld]
port = 3306
socket = /application/mysql5.1.72/tmp/mysql.sock
#skip-locking #把这行注释掉即可
key_buffer_size = 16K
max_allowed_packet = 1M
table_open_cache = 4
"/etc/my.cnf" 82L, 2500C written
[iyunv@lamp ~]# ps -ef|grep mysql
root 2501 2468 0 10:21 pts/0 00:00:00 grep mysql
5) 修改密码
mysql> use mysql;
mysql> UPDATE user SET password=PASSWORD('888888')WHERE user='root';
mysql> FLUSH PRIVILEGES;
6) 开机自动启动
[iyunv@lamp ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[iyunv@lamp ~]# echoPATH=$PATH:/application/mysql/bin/ >> /etc/profile
[iyunv@lamp ~]# source/etc/profile
[iyunv@lamp ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/application/mysql/bin/
[iyunv@lamp ~]#
[iyunv@lamp ~]#
[iyunv@lamp ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.72 Source distribution
Copyright (c) 2000, 2013, Oracle and/or itsaffiliates. All rights reserved.
Oracle is a registered trademark of OracleCorporation and/or its
affiliates. Other names may be trademarks of theirrespective
owners.
Type 'help;' or '\h' for help. Type '\c' to clearthe current input statement.
[iyunv@lamp tools]#tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make
make install
cd ../
3.2)libmcrypt-2.5.8
[iyunv@lamptools]# tar zxf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure
make
make install
sleep 2
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
cd ../../
3.3)mhash-0.9.9.9
[iyunv@lamptools]# tar zxf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure
make
make install
sleep 2
cd ../
[iyunv@lamptools]#tar zxf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure LD_LIBRARY_PATH=/usr/local/lib
make
make install
cd ../
sleep 2