1.安装apache http server: 安装相关库: yum install expat-devel yum install libxml2 yum install libxml2-dev yum install libxml* yum -y install gcc* (yum -y update gcc)
下载apr(请自行百度下载) tar -zxf apr-1.7.0.tar.gz ./configure --prefix=/usr/local/apr make make install
下载aprapr-util(请自行百度下载) tar -zxf apr-util-1.6.1.tar.gz ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config make make install
unzip -o pcre-8.10.zip ./configure --prefix=/usr/local/pcre --disable-shared --with-pic make make install
下载apache http server:(请自行百度下载) tar xvf httpd-2.4.46.tar.gz cp -r apr-1.7.0 /data/soft/http/httpd-2.4.46/srclib/apr cp -r apr-util-1.6.1 /data/soft/http/httpd-2.4.46/srclib/apr-util
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --with-included-apr make make install
http.conf文件: #ServerName www.example.com:80 改成:ServerName localhost:80
/usr/local/apache2/bin/apachectl start
It works! 安装成功
=========================================================
安装php5.6:
wget http://cn2.php.net/distributions/php-5.6.13.tar.gz
tar xvf php-5.6.13.tar.gz
cd php-5.6.13/
./configure --prefix=/usr/local/php56 --with-apxs2=/usr/local/apache2/bin/apxs
make
make install
=========================================================
=========================================================
安装:MySql5.6
cd /usr/local/ wget https://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.45-linux-glibc2.12-x86_64.tar.gz tar -zxvf mysql-5.6.45-linux-glibc2.12-x86_64.tar.gz mv mysql-5.6.45-linux-glibc2.12-x86_64/ mysql groupadd mysql useradd -r -g mysql mysql groups mysql cd mysql/ chown -R mysql:mysql ./ ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data chown -R root:root ./ && chown -R mysql:mysql data sudo ln -s /usr/lib64/libtinfo.so.6.1 /usr/lib64/libtinfo.so.5 ./support-files/mysql.server start ./bin/mysqladmin -u root password '000000' ./bin/mysql -h127.0.0.1 -uroot -p000000 grant all privileges on . to root@'%' identified by '000000'; flush privileges;
MySQL设置开机自启: cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld chmod +x /etc/init.d/mysqld chkconfig --add mysqld
========================================================= 配置mysql.so(未成功) yum install autoconf cd /data/soft/http/php-5.6.13/ext/openssl cp ./config0.m4 ./config.m4 cd /data/soft/http/php-5.6.13 /usr/local/php56/bin/phpize ./configure --with-php-config=/usr/local/php56/bin/php-config --with-mysql=/usr/local/mysql/ make make install