一、安装Apache
# tar xzvf httpd-2.2.15.tar.gz
# cd httpd-2.2.15
# ./configure --prefix=/home/user/webserver/apache2 --enable-so --enable-rewrite=share --enable-proxy=share --enable-proxy-ajp=share --enable-dav=share --enable-dav-fs
# make
#make install
安装MySQL
# tar xzvf mysql-5.0.22.tar.gz
# cd MysqL-5.0.22
# mkdir /home/user/webserver/MysqL
# ./configure --prefix=/home/user/webserver/MysqL --with-named-curses-libs=/usr/lib64/libncurses.so.5
#make
#make install
目录权限
编译安装完成后执行后续操作:
# useradd MysqL //添加 MysqL 用户
# cd /home/user/webserver/MysqL
# bin/MysqL_install_db --user=MysqL
# chown -R root:MysqL . //设置权限,注意后面有一个 "."
# chown -R MysqL /var/lib/MysqL //设置 MysqL 目录权限
# chgrp -R MysqL . //注意后面有一个 "."
# cp share/MysqL/my-huge.cnf /etc/my.cnf
# cp share/MysqL/MysqL.server /etc/rc.d/init.d/MysqLd //开机自动启动 MysqL。
# chmod 755 /etc/rc.d/init.d/MysqLd
# chkconfig --add MysqLd
# /etc/rc.d/init.d/MysqLd start //启动 MysqL
# bin/MysqLadmin -u root password "password_for_root"
# service MysqLd stop //关闭 MysqL
安装说明
安装PHP
# tar zxvf php-5.2.13.tar.gz
# cd PHP-5.2.13
# CFLAGS="-O3 -fPIC" ./configure --prefix=/home/user/webserver/PHP --with-apxs2=/home/user/webserver/apache2/bin/apxs --with-zlib-dir=/usr/local/lib --with-config-file-path=/home/user/webserver/PHP/lib --with-MysqL=/home/user/webserver/MysqL
#编辑 httpd.conf
line 55 LoadModule PHP5_module /home/user/webserver/apache2/modules/libPHP5.so
line 170 <IfModule dir_module> DirectoryIndex index.PHP index.html index.htm </IfModule>
line 316 AddType application/x-httpd-PHP .PHP AddType application/x-httpd-PHP-source .PHPs
line 424 PHPIniDir "/etc/"
增加 PHP.ini
安装 Memcached
# tar zxvf memcached-1.2.6.tar.gz
# cd memcached-1.2.6
# ./configure --prefix=/home/user/webserver/memcached
# make
# make install
Memcache扩展安装:
# tar zxvf memcache-2.2.4.tgz
# cd memcache-2.2.4
# /home/user/webserver/PHP/bin/PHPize
# ./configure --enable-memcache --with-PHP-config=/home/user/webserver/PHP/bin/PHP-config --with-zlib-dir
# make
# make install
配置
####### /home/user/webserver/PHP/lib/PHP/extensions/no-debug-non-zts-20060613/memcache.so #######
# ls -l /usr/local/PHP/lib/PHP/extensions/no-debug-non-zts-20060613/memcache.so
# vim /usr/local/PHP/lib/PHP.ini
新增配置内容: extension_dir = "/usr/local/PHP/lib/PHP/extensions/no-debug-non-zts-20060613/" extension = memcache.so 检查安装结果 # /usr/local/PHP/bin/PHP -m
# /usr/local/apache2/bin/apachectl restart
二、安装附件
{安装Linux cent os5.3时出现configure Failed for srclib/apr
linux 2009-10-22 15:21:15 阅读99 评论0 字号:大中小 订阅
在linux cent OS5.3安装apache 运用命令httpd-2.2.11]# ./configure --sysconfdir=/etc --enable-ssl --enable-modules 时出现了
........................
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/root/httpd-2.2.11/srclib/apr':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
configure Failed for srclib/apr
查看了一下原来是错误开始于srclib/apr文件,检查gcc编译器时提示没发现并且在系统环境变量$PATH中没有合适的c编译器,以是使用yum -y install gcc来安装gcc编译器,就可继续安装了.}
CentOS安装TortoiseSVN
yum install -y subversion
安装gcc的也要yum install gcc
yum install ncurses
{MysqL Segmentation fault
已有 76 次阅读 2011-02-28 11:17 标签: color style
刚安装好的MysqL去了解居然出现Segmentation fault然后直接退出
# MysqL -u root -p
Enter password:
Welcome to the MysqL monitor. Commands end with ; or \g.
Your MysqL connection id is 3
Server version: 5.1.47-log Source distribution
Copyright (c) 2000,2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Segmentation fault
是少了ncurses-devel的RPM包,yum install ncurses-devel
然后重新编译MysqL}
解决 安装 MysqL exec: g++: not found 报错
解决办法:
yum install -y gcc-c++
{bin/MysqL_install_db --user=MysqL
Installing all prepared tables
Fill help tables
To start MysqLd at boot time you have to copy support-files/MysqL.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MysqL root USER !
To do so,start the server,then issue the following commands:
/home/user/webserver/MysqL/bin/MysqLadmin -u root password 'new-password'
/home/user/webserver/MysqL/bin/MysqLadmin -u root -h CentOS5.LT password 'new-password'
See the manual for more instructions.
You can start the MysqL daemon with:
cd /home/user/webserver/MysqL ; /home/user/webserver/MysqL/bin/MysqLd_safe &
You can test the MysqL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /home/user/webserver/MysqL/bin/MysqLbug script!
The latest information about MysqL is available on the web at
http://www.mysql.com
Support MysqL by buying support/licenses at http://shop.mysql.com
}
libxml2
yum install autoconf
# cd /usr/src
# wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
# tar -zvxf m4-1.4.9.tar.gz # cd m4-1.4.9/
# ./configure && make && make install
# cd ../
# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
# tar -zvxf autoconf-2.62.tar.gz
# cd autoconf-2.62/
# ./configure && make && make install
{MysqL安装:/bin/rm: cannot remove `libtoolt': No such file or directory2011年04月28日 星期四 14:41编译MysqL的过程中提示:
/bin/rm: cannot remove `libtoolt': No such file or directory
解决:
1、确认libtool是否已经安装,如果没有安装的话,则先安装libtool
# yum -y install libtool
2、分别执行以下三条命令:
# autoreconf --force --install
# libtoolize --automake --force
# automake --force --add-missing
再重新编译安装,问题解决!}
zlib
CFLAGS="-O3 -fPIC" ./configure
{安装 libevent
# tar zxvf libevent-1.4.9-stable.tar.gz
# cd libevent-1.4.9-stable
# ./configure --prefix=/usr
# make
# make install}
三、安装问题
./MysqL_install_db
Installing all prepared tables
Fill help tables
To start MysqLd at boot time you have to copy support-files/MysqL.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MysqL root USER !
To do so,then issue the following commands:
/home/user/webserver/MysqL/bin/MysqLadmin -u root password 'new-password'
/home/user/webserver/MysqL/bin/MysqLadmin -u root -h CentOS5.LT password 'new-password'
See the manual for more instructions.
NOTE: If you are upgrading from a MysqL <= 3.22.10 you should run
the /home/user/webserver/MysqL/bin/MysqL_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MysqL daemon with:
cd /home/user/webserver/MysqL ; /home/user/webserver/MysqL/bin/MysqLd_safe &
You can test the MysqL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /home/user/webserver/MysqL/bin/MysqLbug script!
The latest information about MysqL is available on the web at
http://www.mysql.com
Support MysqL by buying support/licenses at http://shop.mysql.com
./MysqL_install_db --user=MysqL --basedir=/home/user/webserver/MysqL --datadir=/home/user/webserver/MysqL/var
Installing all prepared tables
Fill help tables
To start MysqLd at boot time you have to copy support-files/MysqL.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MysqL root USER !
To do so,then issue the following commands:
/home/user/webserver/MysqL/bin/MysqLadmin -u root password 'new-password'
/home/user/webserver/MysqL/bin/MysqLadmin -u root -h CentOS5.LT password 'new-password'
See the manual for more instructions.
NOTE: If you are upgrading from a MysqL <= 3.22.10 you should run
the /home/user/webserver/MysqL/bin/MysqL_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MysqL daemon with:
cd /home/user/webserver/MysqL ; /home/user/webserver/MysqL/bin/MysqLd_safe &
You can test the MysqL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /home/user/webserver/MysqL/bin/MysqLbug script!
The latest information about MysqL is available on the web at
http://www.mysql.com
Support MysqL by buying support/licenses at http://shop.mysql.com
{bin/MysqL_install_db --user=MysqL
Installing all prepared tables
Fill help tables
To start MysqLd at boot time you have to copy support-files/MysqL.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MysqL root USER !
To do so,then issue the following commands:
/home/user/webserver/MysqL/bin/MysqLadmin -u root password 'new-password'
/home/user/webserver/MysqL/bin/MysqLadmin -u root -h CentOS5.LT password 'new-password'
See the manual for more instructions.
You can start the MysqL daemon with:
cd /home/user/webserver/MysqL ; /home/user/webserver/MysqL/bin/MysqLd_safe &
You can test the MysqL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /home/user/webserver/MysqL/bin/MysqLbug script!
The latest information about MysqL is available on the web at
http://www.mysql.com
Support MysqL by buying support/licenses at http://shop.mysql.com
}
{ bin/MysqL -uroot -p
Enter password:
Welcome to the MysqL monitor. Commands end with ; or \g.
Your MysqL connection id is 6 to server version: 5.0.22-log
Segmentation fault }