php sql apache,linux安装mysql+apache+php个人整理版

一、      卸载安装apache:

解压httpd-2.2.21 压缩包:tar –zxvf httpd-2.2.21.tar.gz

编译:./configure --prefix=/opt/apache2221 --enable-so --enable-rewrite --enable-cgi --enable-ssl --enable-proxy --enable-modules-shared='headers rewrite dav' --enable-mods-shared=most --enable-mods-shared=all

Make & make install

修改httpd.conf

启动和关闭:bin/httpd –k start/stop

二、      安装cmake:

先解压压缩包tar –zxvfCmake包名,tar –zxvf cmake-2.8.4.tar.gz

进入cmake-2.8.4文件夹,然后执行:./configure

gmake

Make install

三、      安装mysql:

先加压压缩包tar –zxvfmysql包名,tar –zxvf mysql-5.5.28.tar.gz

查看mysql进程:ps -aux|grep mysql

进入mysql-5.5.28文件夹,然后执行:

cmake -DCMAKE_INSTALL_PREFIX=/opt/mysql5528  -DSYSCONFDIR=/opt/mysql5528/etc  -DWITH_ZLIB=system  -DMYSQL_TCP_PORT=3306  -DEXTRA_CHARSETS=all -DWITH_INNOba se_STORAGE_ENGINE=1  -DWITH_READLINE=1  -DENABLED_LOCAL_INFILE=1

make & make install

改变mysql权限:chown mysql:mysql mysql5528 –R(安装mysql的上一级目录)

安装数据库:scripts/mysql_install_db(安装mysql的目录里)

修改数据库权限:chown mysql.mysql data/ -R

启动mysql:bin/mysqld_safe&

设置密码:bin/mysqladmin -u root password 'Td123456'

四、      卸载php:

解压httpd-2.2.21 压缩包:tar -zxvf php-5.2.9.tar.gz

./configure --prefix=/opt/php529 --with-config-file-path=/opt/php529/etc/cgi --enable-mbstring --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --enable-magic-quotes --with-mysql=/opt/mysql5528 --with-pear --enable-sockets --with-freetype-dir=/usr --with-zlib --enable-sysvsem --enable-sysvshm --with-libxml-dir=/usr/local/libxml2 --with-xmlrpc --enable-zip --enable-fpm --enable-zend-multibyte

make & make install

启动和关闭:bin/httpd –k start/stop

六、      oci8模块已安装:

安装步骤:

# 使用与系统一致的32位或64位Oracle Instant Client

find ./ -maxdepth 1 -name "instantclient-*.zip" | xargs -i unzip -o -d ./ {}

cd instantclient_[0-9]*

ln -s libclntsh.so.[0-9]* libclntsh.so

cd ..

mv instantclient_* /opt/oracle/instantclient

export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"

cd php-*/ext/oci8

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config --with-oci8=shared,instantclient,/opt/oracle/instantclient

make && make install

vi /usr/local/php/lib/php.ini

extension=oci8.so

./configure --prefix=/opt/nginx112 --conf-path=/opt/nginx112/etc/nginx.conf --error-log-path=/opt/nginx112/var/err.log --pid-path=/opt/nginx112/var/nginx.pid --lock-path=/opt/nginx112/var/nginx.lock --user=mysql --group=mysql --with-http_ssl_module --with-http_sub_module --with-http_flv_module --with-http_gzip_static_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --http-log-path=/opt/nginx112/var/nginx_access.log --http-client-body-temp-path=/opt/nginx112/var/client --http-proxy-temp-path=/opt/nginx112/var/proxy --http-fastcgi-temp-path=/opt/nginx112/var/fastcgi --with-mail --with-mail_ssl_module --with-pcre --with-md5-asm

./configure --prefix=/opt/php529 --with-config-file-path=/opt/php529/etc/cgi --enable-mbstring --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --enable-magic-quotes --with-mysql=/opt/mysql5512 --with-pear --enable-sockets --with-freetype-dir=/usr --with-zlib --enable-sysvsem --enable-sysvshm --with-libxml-dir=/usr/local/libxml2 --with-xmlrpc --enable-zip --enable-fpm --enable-zend-multibyte

##./configure --prefix=/opt/php538 --with-config-file-path=/opt/php538/etc/cgi --with-oci8=/opt/oracle/product/10.2.0/db_1 --enable-mbstring --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --enable-magic-quotes --with-mysql=/data/mysql5512 --with-pear --enable-sockets --with-freetype-dir=/usr --with-zlib --enable-sysvsem --enable-sysvshm --with-libxml-dir=/usr/local/libxml2 --with-xmlrpc --enable-zip --enable-fpm --enable-zend-multibyte'

./configure --prefix=/opt/php547 --with-config-file-path=/opt/php547/etc/cgi --enable-mbstring --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --enable-magic-quotes --with-mysql=/opt/mysql5528 --with-pear --enable-sockets --with-freetype-dir=/usr --with-zlib --enable-sysvsem --enable-sysvshm --with-libxml-dir=/usr/local/libxml2 --with-xmlrpc --enable-zip --enable-fpm --enable-zend-multibyte

编译svn

./configure --prefix=/opt/svn --with-apr=/opt/apache2221 --with-apr-util=/opt/apache2221 --with-apxs=/opt/apache2221/bin/apxs --with-ssl --with-zlib=/root/install/subversion-1.6.6/zlib/ --enable-maintainer-mode

./configure --prefix=/opt/php529 --with-config-file-path=/opt/php529/etc --with-mysql=/opt/mysql5528 --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr/local/libxml2 --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-gd --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl

make ZEND_EXTRA_LIBS='-liconv'

转自:http://www.zcamoure.com/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值