tar xvf ./apr-1.4.6.tar
tar xvf ./apr-util-1.5.1.tar
tar xvf ./php-5.4.8.tar
tar xvf ./httpd-2.4.3.tar
cd ./apr-1.4.6
./configure --prefix /opt/apr
make && make install
yum install gcc
cd ../apr-util-1.5.1
./configure --prefix=/opt/apr --with-apr=/opt/apr
make && make install
yum -y install gcc-c++
cd ../pcre-8.31
./configure --prefix=/opt/pcre --with-apr=/opt/apr/ --with-apr-util=/opt/apr/
make && make install
cd ../httpd-2.4.2
./configure --prefix=/opt/apache2.4 --with-apr=/opt/apr --with-apr-util=/opt/apr --with-pcre=/opt/pcre --enable-rewrite
make && make install
不能yum libmcrypt 的时候报的错误
如果linux报错 configure: error: no acceptable C compiler found in $PATH See `config.log’ for more details.
是由于没有安装gcc引起的,
rm: cannot remove `libtoolT': No such file or directory 解决方案
这时直接打开 configure,把 $RM “$cfgfile” 那行删除掉,重新再运行 ./configure 就可以了。
错误
安装mysql出现Could NOT find Curses (missing CURSES_LIBRARY CURSES_INCLUDE_PATH),提示解决方法
[iyunv@localhost software]# cd mysql-5.5.11
[iyunv@localhost mysql-5.5.11]# cmake .
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:82 (MESSAGE):
Curses library not found. Please install appropriate package,
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
cmake/readline.cmake:126 (FIND_CURSES)
cmake/readline.cmake:216 (MYSQL_USE_BUNDLED_LIBEDIT)
CMakeLists.txt:250 (MYSQL_CHECK_READLINE)
-- Configuring incomplete, errors occurred!
[iyunv@localhost mysql-5.5.11]# rm CMakeCache.txt
[iyunv@localhost mysql-5.5.11]# yum install ncurses-devel
Warning: Bison executable not found in PATH
-- Configuring done
-- Generating done
-- Build files have been written to: /software/mysql-5.5.11
[iyunv@localhost mysql-5.5.11]# yum install bison
错误 2 COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'latin1'
修改my.cnf后重新初始化
[client]
default-character-set = utf8
[mysqld]
character_set_server=utf8
cd ../
tar xvf ./cmake-2.8.7.tar
tar xvf ./mysql-5.5.24.tar
cd ./cmake-2.8.7
./bootstrap
make && make install
groupadd mysql
useradd -r -g mysql mysql
cd ../mysql-5.5.24
cmake ./ -DCMAKE_INSTALL_PREFIX=/opt/mysql5.5 -DINSTALL_DATADIR=/website/data/mysql/data -DEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_MYISAM_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1
make && make install
cp /opt/mysql5.5/support-files/mysql.server /etc/init.d/mysql
cd /opt/mysql5.5/
./scripts/mysql_install_db --user=mysql --datadir=/website/data/mysql/
fdisk -l
18 fdisk /dev/vdb
19 fdisk -l
20 mkfs -t ext3 /dev/vdb1
21 mount /dev/vdb1 /www
vi /etc/sysconfig/iptables
service iptables restart