中文字幕理论片,69视频免费在线观看,亚洲成人app,国产1级毛片,刘涛最大尺度戏视频,欧美亚洲美女视频,2021韩国美女仙女屋vip视频

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
linux下的Apache2 + mysql5 + php5 安裝詳解
linux下的Apache2 + mysql5 + php5 源碼完整安裝詳解

原來(lái)出處找不到了,恰巧是您的大作請(qǐng)海涵:-)
一:準(zhǔn)備軟件包,存放/home/xiutuo/software/目錄下。

主要軟件包,
1. httpd-2.2.6.tar.gz
2. mysql-5.0.45-linux-i686-glibc23.tar.gz (這個(gè)版本是已編譯好的壓縮包,解壓后稍做配置即可使用)
3. php-5.2.5.tar.gz

安裝php所需的軟件包(其中l(wèi)ibxml2是安裝php5必須的.)
1. libxml2-(version).tar.gz ---> http://ftp.gnome.org/pub/GNOME/sources/libxm2
2. libxslt-(version).tar.gz ---> http://ftp.gnome.org/pub/GNOME/sources/libxslt
3. curl-(version).tar.gz   ---> http://curl.haxx.se/download

GD庫(kù)所需要軟件包(有人說(shuō)PHP源碼包里自帶了GD2.0.28和zlib,只要安裝GD的三個(gè)支持包:jpg,png和freetype,但是我們還是下載)
1. gd-(version).tar.gz     ---> http://www.libgd.org/Main_Page or http://www.libgd.org/releases/
2. freetype-(version).tar.gz ---> http://sourceforge.net/projects/freetype
3. jpegsrc.v6b.tar.gz     ---> http://ijg.org/files/jpegsrc.v6b.tar.gz
4. libpng-(version).tar.gz   ---> http://www.libpng.org/pub/png/libpng.html
5. zlib-1.2.3.tar.gz       ---> http://www.zlib.net

把以上所有軟件包下載到:/root/Software/目錄下.

二:安裝mysql

# tar -zvxf mysql-5.0.45-linux-i686-glibc23.tar.gz
# mkdir -p /usr/local/mysql
# cp -r mysql-5.0.45 /usr/local/mysql
# cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysql //開(kāi)機(jī)啟動(dòng)mysql
# cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf

添加mysql用戶(hù)及用戶(hù)組
# groupadd mysql
# useradd -g mysql mysql
修改mysql目錄權(quán)限
# chown -R root /usr/local/mysql
# chgrp -R mysql /usr/local/mysql
# chown -R mysql /usr/local/mysql/data
生成mysql系統(tǒng)數(shù)據(jù)庫(kù)
# /usr/local/mysql/scripts/mysql_install_db --user=mysql& //啟動(dòng)mysql服務(wù)
# /usr/local/mysql/bin/mysqld_safe --user=mysql&
如出現(xiàn) Starting mysqld daemon with databases from /usr/local/mysql/data 代表正常啟動(dòng)mysql服務(wù)了.
按Ctrl + C 跳出修改 mysql 的 root 密碼
# /usr/local/mysql/bin/mysqladmin -u root -p password "123456"

三:安裝GD庫(kù)(讓PHP支持GIF,PNG,JPEG)
a.安裝 jpeg6 建立目錄:
# mkdir -p /usr/local/jpeg6
# mkdir -p /usr/local/jpeg6/bin
# mkdir -p /usr/local/jpeg6/lib
# mkdir -p /usr/local/jpeg6/include
# mkdir -p /usr/local/jpeg6/man
# mkdir -p /usr/local/jpeg6/man1
# mkdir -p /usr/local/jpeg6/man/man1
# cd /root/Software/
# tar -zvxf jpegsrc.v6b.tar.gz
# cd jpeg6
# ./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static
# make
# make install

b.libpng包(支持PNG)
# cd /root/Software/
# tar -zvxf libpng-(version).tar.gz
# cd libpng-(version)
# ./configure --prefix=/usr/local/libpng
# make
#> make install

c.安裝 freetype
# cd /root/Software/
# tar -zvxf freetype-(version).tar.gz
# cd freetype-(version)
# mkdir -p /usr/local/freetype
# ./configure --prefix=/usr/local/freetype
# make
# make install

d.安裝zlib
# cd /root/Software/
# tar -zxvf zlib-1.2.3.tar.gz
# cd zlib.1.2.3
# mkdir /usr/local/zlib
# ./configure --prefix=/usr/local/zlib
# make
# make install

e.安裝GD庫(kù)
# cd /root/Software/
# tar -zvxf gd-(version).tar.gz
# mkdir -p /usr/local/gd2
# cd gd-(version)
# ./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg6 --with-zlib-dir=/usr/local/zlib --with-png=/usr/local/libpng --with-freetype=/usr/local/freetype
# make
# make install

e.安裝Curl庫(kù)
# cd /root/Software/
# tar -zxf curl-(version).tar.gz
# mkdir -p /usr/local/curl
# ./configure --prefix=/usr/local/curl
# make
# make install

四:安裝apache2
# cd /roo/Software/
# tar -zvxf httpd-2.2.6.tar.gz
# cd httpd-2.2.6
# mkdir -p /usr/local/apache2
# ./configure --prefix=/usr/local/apache --enable-modules=so --enable-rewrite
# make
# make install
# /usr/local/apache2/bin/apachectl -k start //啟動(dòng)apahce
用瀏覽器查看http://localhost,得到it works,說(shuō)明apache已經(jīng)配置成功了.
# /usr/local/apache2/bin/apachectl -k stop //停止apache

五:安裝php5,php5必須有l(wèi)ibxml2支持!
a. 安裝libxml2
# cd /root/Software/
# tar -zvxf libxml2-(version).tar.gz
# cd libxml2-(version)
# mkdir -p /usr/local/libxml2
# ./configure --prefix=/usr/local/libxml2
# make
# make install

b.安裝 libxslt (可選安裝,你可以不安裝)
# cd /root/Software/
# tar -zvxf libxslt-(version).tar.gz
# mkdir -p /usr/local/libxslt
# cd libxslt-(version)
# ./configure --prefix=/usr/local/libxslt --with-libxml-prefix=/usr/local/libxml2
# make
# make install

c.安裝php5
# cd /root/Software/
# tar -zvxf php-(version).tar.gz
# mkdir -p /usr/local/php5
# cd php-(version)
# ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs \
>--with-gd=/usr/local/gd2 --with-jpeg-dir=/usr/local/jpeg6 \
>--with-zlib-dir=/usr/local/zlib \
>--with-png-dir=/usr/local/libpng \
>--with-freetype-dir=/usr/local/freetype -\
>--enable-trace-vars --with-mysql=/usr/local/mysql \
>--enable-mbstring=all --with-curl=/usr/local/curl --enable-mbregex \
>--with-config-file-path=/usr/local/php5 --enable-ftp \
>--enable-soap --with-xsl=/usr/local/libxslt

# make
# make install
# cp php.ini-dist /usr/local/php5/php.ini (別忘記了呵呵)

六:重新配置apache2讓他支持php

# cd /usr/local/apache2/conf
# vim httpd.conf
在LoadModule php5_module modules/libphp5.so
添加AddType application/x-httpd-php .php

OK,基本的安裝已經(jīng)完成.
重新起動(dòng)APACHE:
# /usr/local/apache2/bin/apachectl start
如果重新起動(dòng)APACHE出現(xiàn):
Syntax error on line 232 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server:
/usr/local/apache2/modules/libphp4.so: cannot restore segment prot after reloc: Permission denied
那就要按照下面的方法解決:

1.chcon -t texrel_shlib_t /usr/local/apache2/modules/*.so

2.編輯/etc/selinux/config,找到這段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing

把 SELINUX=enforcing 注釋掉:#SELINUX=enforcing ,然后新加一行為:
SELINUX=disabled
保存,關(guān)閉。

編輯/etc/sysconfig/selinux,找到:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing

如果SELINUX已經(jīng)是 SELINUX=disabled,那么就不用改了,否則就把SELINUX=enforcing 注釋掉,新加一行:
SELINUX=disabled
保存,退出。

ok,web環(huán)境apache2+mysql5+php5就介紹到這里。更詳細(xì)的apache2的配置和mysql配置和php.ini的配置參考相應(yīng)文檔
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶(hù)發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
apache2+mysql+php安裝
LAMP安裝配置超詳細(xì)講解
Linux+Apache2+MySQL5.0.33+PHP5.2.0完全安裝配置指南
linux php5.1.6 mysql5.0.2 apache2.0.55安裝配置說(shuō)明:...
64位linux centOS 5.5 安裝 Apache+Mysql+PHP+GD
linux+mysql+apache+php設(shè)置
更多類(lèi)似文章 >>
生活服務(wù)
熱點(diǎn)新聞
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服