apache2.2.4+mysql5.0.77+php5.2.8安装精简
程序员文章站
2023-10-31 19:55:40
1.安装apache 将httpd-2.2.4.tar.gz拷贝至/usr/local/src目录中 tar -zxvf httpd-2.2.4.tar.gz cd htt...
1.安装apache
将httpd-2.2.4.tar.gz拷贝至/usr/local/src目录中
tar -zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apache2 --enable-so --enable-vhost-alias --enable-rewrite --enable-deflate --enable-mods-shared=all --with-mpm=worker
make && make install
2.安装php
安装freetype-2.3.5.tar.gz
tar zxvf freetype-2.3.5.tar.gz
cd freetype-2.3.5
./configure --prefix=/usr/local/phpsyslib/freetype-2.3.5
make && make install
mkdir /usr/local/phpsyslib/freetype-2.3.5/include/freetype2/freetype/internal(如果报错需要)
安装jpeg
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=/usr/local/phpsyslib/jpeg-6b --enable-shared 必须加后面这个参数,不然不能生成那个共享库
根据报错信息自己创建相应目录
cp libjpeg.a /usr/local/lib(如果安装gd不成功的话)
安装zlib
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=/usr/local/phpsyslib/zlib-1.2.3
安装openssl-0.9.8e
tar zxvf openssl-0.9.8e.tar.gz
cd openssl-0.9.8e
./config shared zlib
make
make test
make install
mv /usr/bin/openssl /usr/bin/openssl.off
mv /usr/include/openssl /usr/include/openssl.off
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
配置库文件搜索路径
#echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
#ldconfig -v
安装libpng
tar zxvf libpng-1.2.23.tar.gz
cd libpng-1.2.23
cp scripts/makefile.linux makefile
安装gd库(如果失败先安装libtool和gettext)
tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure --prefix=/usr/local/phpsyslib/gd-2.0.35 --with-jpeg=/usr/local/phpsyslib/jpeg-6b --with-png=/usr/local/ --with-zlib=/usr/local/phpsyslib/zlib-1.2.3 --with-freetype=/usr/local/phpsyslib/freetype-2.3.5/
make && make install
安装gettext(如果失败先安装 libtool)
tar zxvf gettext-0.17.tar.gz
cd gettext-0.17
./configure --prefix=/usrmake && make install 安装libtool
tar zxvf libtool-2.2.tar.gz
cd libtool-2.2
./configure --prefix=/usrmake && make installcp /usr/lib/libattr.la /lib/
安装curl
tar zxvf curl-7.17.1.tar.gz
cd curl-7.17.1
./configure --prefix=/usr/local/phpsyslib/curl-7.17.1
make && make install
3.安装mysql
# tar zxvf mysql-5.0.77-linux-i686-icc-glibc23.tar.gz
cp mysql-5.0.77-linux-i686-icc-glibc23 /usr/local/mysql
cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysql ---mysql自启动
cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
groupadd mysql
useradd -g mysql mysql
chown -r root /usr/local/mysql
chgrp -r mysql /usr/local/mysql
上面两句可用(chown -r root:mysql /usr/local/mysql)
chown -r mysql /usr/local/mysql/data
/usr/local/mysql/scripts/mysql_install_db --user=mysql&
/usr/local/mysql/bin/safe_mysqld --user=mysql&
安装php
./configure --prefix=/usr/local/php5.2.8 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr/share/doc/libxml2-2.6.16 --with-gd=/usr/local/phpsyslib/gd-2.0.35 --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg-6b --with-png-dir --with-freetype-dir=/usr/local/phpsyslib/freetype-2.3.5 --with-iconv-dir --with-zlib=/usr/local/phpsyslib/zlib-1.2.3 --enable-mbstring --disable-ipv6 --with-openssl-dir=/usr/local/ssl --with-curl=/usr/local/phpsyslib/curl-7.17.1 --with-mime-magic=/usr/share/file/magic.mime
mysql日常用法
mysqldump –uxxx –hxxx -p samp_db >/usr/archives/mysql/samp_db.1999-10-02 备份
mysql 数据库名 <文件路径 用户名和密码(如果有) 导入
建立用户:
grant all on redflag.* to 用户名@"%" identified by "密码";
flush privileges;
将httpd-2.2.4.tar.gz拷贝至/usr/local/src目录中
tar -zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apache2 --enable-so --enable-vhost-alias --enable-rewrite --enable-deflate --enable-mods-shared=all --with-mpm=worker
make && make install
2.安装php
安装freetype-2.3.5.tar.gz
tar zxvf freetype-2.3.5.tar.gz
cd freetype-2.3.5
./configure --prefix=/usr/local/phpsyslib/freetype-2.3.5
make && make install
mkdir /usr/local/phpsyslib/freetype-2.3.5/include/freetype2/freetype/internal(如果报错需要)
安装jpeg
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=/usr/local/phpsyslib/jpeg-6b --enable-shared 必须加后面这个参数,不然不能生成那个共享库
根据报错信息自己创建相应目录
cp libjpeg.a /usr/local/lib(如果安装gd不成功的话)
安装zlib
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=/usr/local/phpsyslib/zlib-1.2.3
安装openssl-0.9.8e
tar zxvf openssl-0.9.8e.tar.gz
cd openssl-0.9.8e
./config shared zlib
make
make test
make install
mv /usr/bin/openssl /usr/bin/openssl.off
mv /usr/include/openssl /usr/include/openssl.off
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
配置库文件搜索路径
#echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
#ldconfig -v
安装libpng
tar zxvf libpng-1.2.23.tar.gz
cd libpng-1.2.23
cp scripts/makefile.linux makefile
安装gd库(如果失败先安装libtool和gettext)
tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure --prefix=/usr/local/phpsyslib/gd-2.0.35 --with-jpeg=/usr/local/phpsyslib/jpeg-6b --with-png=/usr/local/ --with-zlib=/usr/local/phpsyslib/zlib-1.2.3 --with-freetype=/usr/local/phpsyslib/freetype-2.3.5/
make && make install
安装gettext(如果失败先安装 libtool)
tar zxvf gettext-0.17.tar.gz
cd gettext-0.17
./configure --prefix=/usrmake && make install 安装libtool
tar zxvf libtool-2.2.tar.gz
cd libtool-2.2
./configure --prefix=/usrmake && make installcp /usr/lib/libattr.la /lib/
安装curl
tar zxvf curl-7.17.1.tar.gz
cd curl-7.17.1
./configure --prefix=/usr/local/phpsyslib/curl-7.17.1
make && make install
3.安装mysql
# tar zxvf mysql-5.0.77-linux-i686-icc-glibc23.tar.gz
cp mysql-5.0.77-linux-i686-icc-glibc23 /usr/local/mysql
cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysql ---mysql自启动
cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
groupadd mysql
useradd -g mysql mysql
chown -r root /usr/local/mysql
chgrp -r mysql /usr/local/mysql
上面两句可用(chown -r root:mysql /usr/local/mysql)
chown -r mysql /usr/local/mysql/data
/usr/local/mysql/scripts/mysql_install_db --user=mysql&
/usr/local/mysql/bin/safe_mysqld --user=mysql&
安装php
./configure --prefix=/usr/local/php5.2.8 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr/share/doc/libxml2-2.6.16 --with-gd=/usr/local/phpsyslib/gd-2.0.35 --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg-6b --with-png-dir --with-freetype-dir=/usr/local/phpsyslib/freetype-2.3.5 --with-iconv-dir --with-zlib=/usr/local/phpsyslib/zlib-1.2.3 --enable-mbstring --disable-ipv6 --with-openssl-dir=/usr/local/ssl --with-curl=/usr/local/phpsyslib/curl-7.17.1 --with-mime-magic=/usr/share/file/magic.mime
mysql日常用法
mysqldump –uxxx –hxxx -p samp_db >/usr/archives/mysql/samp_db.1999-10-02 备份
mysql 数据库名 <文件路径 用户名和密码(如果有) 导入
建立用户:
grant all on redflag.* to 用户名@"%" identified by "密码";
flush privileges;
推荐阅读
-
安装配置php-fpm来搭建Nginx+PHP的生产环境
-
keeplive+mysql+drbd高可用架构安装步骤
-
Centos7.2 编译安装方式搭建 phpMyAdmin
-
node安装--linux下的快速安装教程
-
Win7安装和配置Apache2.4服务器的详细方法
-
windows2003安装apache-mysql-php-phpmyadmin
-
Windows 安装IIS出现的问题(无法安装IIS,提示“安装程序无法复制文件IISApp.vbs”)
-
linux云主机安装pdo详细教程
-
Windows Apache2.4 VC9(ApacheHaus)详细安装配置教程
-
阿里云Windows 2003安装IIS+FTP图文教程