linux安装mysql+apache+php个人整理版
linux安装mysql+apache+php个人整理版
a467617622 发表于7个月前
linux安装mysql+apache+php个人整理版
  • 发表于 7个月前
  • 阅读 1
  • 收藏 0
  • 点赞 0
  • 评论 0

腾讯云 技术升级10大核心产品年终让利>>>   

一、      卸载安装apache:

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

  2. 编译:./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

  3. Make & make install

  4. 修改httpd.conf

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

  6.  

二、      安装cmake:

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

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

  3. gmake

  4. Make install

     

三、      安装mysql:

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

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

  3. 进入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

  4. make & make install

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

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

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

  8. 启动mysql:bin/mysqld_safe&

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

 

四、      卸载php:

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

  2. ./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

  3. make & make install

  4.  

  5. 启动和关闭: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/

标签: Linux PHP
共有 人打赏支持
粉丝 0
博文 2
码字总数 0
×
a467617622
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: