溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

如何在RedHat AS4上安裝配置Apache2.2.4+PHP5.2.3+MySQL5.0.45+openssl0.98e

發(fā)布時(shí)間:2021-09-26 09:17:23 來源:億速云 閱讀:138 作者:iii 欄目:系統(tǒng)運(yùn)維

這篇文章主要講解了“如何在RedHat AS4上安裝配置Apache2.2.4+PHP5.2.3+MySQL5.0.45+openssl0.98e”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“如何在RedHat AS4上安裝配置Apache2.2.4+PHP5.2.3+MySQL5.0.45+openssl0.98e”吧!

系統(tǒng)環(huán)境:Redhat AS4所需軟件包:mysql-5.0.41.tar.gz

            zlib-1.2.3.tar.gz            openssl-0.9.8e.tar.gz             httpd-2.2.4.tar.gz             libpng-1.2.14.tar.gz             freetype-2.1.10.tar.gz             jpegsrc.v6b.tar.gz             libxml2-2.6.19.tar.gz             gd-2.0.33.tar.gz             php-5.2.1.tar.gz
所用軟件包都上傳至服務(wù)器/root/web目錄下 1.1.安裝mysql-5.0.45
卸載系統(tǒng)自帶的mysql rpm -qa|grep mysql rpm -e –nodeps mysql
groupadd mysql
useradd -g mysql mysql
tar zxvf mysql-5.0.41.tar.gz
cd mysql-5.0.45
#./configure –prefix=/usr/local/mysql –enable-thread-safe-client –enable-local-infile –with-charset=gbk –with-extra-charset=all –with-low-memory
#make
#make install
#cp support-files/my-medium.cnf /etc/my.cnf
#cd /usr/local/mysql
#chown -R mysql .
#chgrp -R mysql .
#bin/mysql_install_db –user=mysql
#chown -R root .
#chown -R mysql var
#bin/mysqld_safe –user=mysql &
#cd /root/web/mysql-5.0.45
#cp support-files/mysql.server /etc/rc.d/init.d/mysqld
#chmod 700 /etc/rc.d/init.d/mysqld
#chkconfig –add mysqld
#chkconfig –level 345 mysqld on 測(cè)試
#/usr/local/mysql/bin/mysqladmin ping
#/usr/local/mysql/bin/mysqladmin version
#/usr/local/mysql/bin/mysql 添加root密碼
#/usr/local/mysql/bin/mysqladmin -uroot -p 添加/usr/local/mysql/bin到環(huán)境變量PATH中
#export PATH=$PATH:/usr/local/mysql/bin 2.安裝zlib-1.2.3 #tar zxvf zlib-1.2.3.tar.gz
#cd zlib-1.2.3
#./configure –prefix=/usr/local/zlib
#make
#make install 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 4.安裝httpd-2.2.4 #tar zxvf httpd-2.2.4.tar.gz
#cd httpd-2.2.4
#./configure –prefix=/usr/local/apache –sysconfdir=/etc/httpd –enable-so –enable-ssl –with-ssl=/usr/local/ssl –enable-track-vars –enable-rewrite –with-z-dir=/usr/local/zlib –enable-mods-shared=most
#make
#make install #echo “/usr/local/apache/bin/apachectl start” >> /etc/rc.local(系統(tǒng)啟動(dòng)時(shí)服務(wù)自動(dòng)啟動(dòng)) 5.安裝libpng-1.2.14 #tar zxvf libpng-1.2.14.tar.gz  
# cd libpng-1.2.14
# cp scripts/makefile.linux makefile
# make (若是提示找不到zlib庫文件或者頭文件,多半是makefile文件里zlib的默認(rèn)路徑有誤??删庉媘akefile文件,找到zlib項(xiàng)并重新指定路徑到/usr/local/zlib/lib和/usr/local/zlib/include)。
# make install 6.安裝freetype-2.1.10 # tar -zvxf freetype-2.1.10.tar.gz
# cd freetype-2.1.10
# mkdir -p /usr/local/freetype
# ./configure –prefix=/usr/local/freetype
# make;make install  7.安裝jpegsrc.v6b jpeg默認(rèn)不會(huì)自建目錄,因此需手動(dòng)建立目錄:
# mkdir -pv /usr/local/jpeg6/{,bin,lib,include,man/man1,man1} 安裝
#tar zxvf jpegsrc.v6b.tar.gz  
# ./configure –prefix=/usr/local/jpeg6/ –enable-shared –enable-static
# make
# make install 
# make install-lib 8.安裝libxml2-2.6.19 # tar -zxf libxml2-2.6.19.tar.gz
# cd libxml2-2.6.19
# mkdir -p /usr/local/libxml2
# ./configure –prefix=/usr/local/libxml2
# make; make install
#cp xml2-config /usr/bin 9.安裝GD-2.0.33庫 # tar -zvxf gd-2.0.33.tar.gz
# mkdir -p /usr/local/gd2
# cd gd-2.0.33
# ./configure –prefix=/usr/local/gd2 –with-jpeg=/usr/local/jpeg6/ –with-png=/usr/local/lib/ –with-zlib=/usr/local/zlib/  –with-freetype=/usr/local/freetype/
# make; make install 10.安裝php-5.2.1 # tar -zvxf php-5.2.1.tar.gz
# mkdir -p /usr/local/php
# cd php-5.2.1
  # ./configure –prefix=/usr/local/php –with-apxs2=/usr/local/apache/bin/apxs –with-mysql=/usr/local/mysql –with-mysqli=/usr/local/mysql/bin/mysql_config –with-xml=/usr/local/libxml2 –with-png=/usr/local/lib –with-jpeg-dir=/usr/local/jpeg6 –with-zlib=/usr/local/zlib –with-freetype=/usr/local/freetype  –with-gd=/usr/local/gd2 –enable-track-vars  –enable-mbstring=all
# make
# make install
# cp php.ini-dist /usr/local/php/lib/php.ini 11.編輯apache配置文件httpd.conf
 
  # vi /etc/httpd/httpd.conf
  要改的有如下幾處:
  找到LoadModule php5_module modules/libphp5.so
  前面的#號(hào)去掉(默認(rèn)已去掉注釋)
  #AddType application/x-gzip .gz .tgz
  下加二行
  AddType application/x-httpd-php .php
  AddType application/x-httpd-php-source .phps
  還有找到DirectoryIndex index.html
  加上 index.php 讓它把index.php做為默認(rèn)頁 按照使用習(xí)慣,這里將網(wǎng)站根目錄指定到/var/www:
找到DocumentRoot “/usr/local/apache/htdocs”
修改為:DocumentRoot “/var/www”(后文中我們還會(huì)注釋掉此行,以啟用虛擬主機(jī)) 找到<Directory “/usr/local/apache/htdocs”>
修改為:<Directory “/var/www”> 12.測(cè)試PHP
 
# vi /var/www/index.php
  添加:
   <?
    phpinfo();
   ?>
 
重新啟動(dòng)apache服務(wù)器
# /usr/local/apache/bin/apachectl restart
瀏覽器里http://localhost/測(cè)試一下.  

感謝各位的閱讀,以上就是“如何在RedHat AS4上安裝配置Apache2.2.4+PHP5.2.3+MySQL5.0.45+openssl0.98e”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)如何在RedHat AS4上安裝配置Apache2.2.4+PHP5.2.3+MySQL5.0.45+openssl0.98e這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是億速云,小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI