Apache+php+MySQL安裝 Step By Step

來源:互聯網
上載者:User
1.  安裝之前你需要下載如下軟體包a)         Apache2website:http://www.apache.orgDownload URL:http://apache.justdn.org/httpd/httpd-2.0.55.tar.gzb)        PHP5website:http://www.php.netdownload URL: http://cn.php.net/get/php-5.1.1.tar.gz/from/this/mirrorc)        MySQL 4.1Website: http://www.mysql.orgdownload:http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-max-4.1.15-unknown-freebsd5.3-i386.tar.gz/from/http://mirror.vmmatrix.net/mysql/d)        MySQL 4.1 ClientWebsite: http://www.freebsd.org/portsDownload:ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/mysql-client-4.1.15.tbze)         Zlib 1.2.3Website: http://www.zlib.netDownload url: http://www.zlib.net/zlib-1.2.3.tar.gzf)         GD Library 2.033Website: http://www.boutell.com/gdDownload URL:http://www.boutell.com/gd/http/gd-2.0.33.tar.gz 2.  安裝Mysql4.1# tar xzfv mysql-max-4.1.15-unknown-freebsd5.3-i386.tar.gz# cd mysql-max-4.1.15-unknown-freebsd5.3-i386# pw groupadd mysql# pw adduser mysql -g mysql # mv mysql-max-4.1.15-unknown-freebsd5.3-i386/ /usr/local/mysql-max-4.1.15# cd /usr/local# ln -s mysql-max-4.1.15 mysql# chown -R mysql:mysql mysql-max-4.1.15# mysql/bin/mysqld_safe &# /usr/local/mysql/bin/mysqladmin -u root password xxxxxx# /usr/local/mysql/bin/mysqladmin -u root -p shutdown# cd /usr/local/mysql/support-files# cp my-large.cnf /etc/my.cnf# /usr/local/mysql/bin/mysqld_safe &3.  安裝Apache2        # tar xzfv httpd-2.0.55.tar.gz # cd httpd-2.0.55# ./configure --prefix=/usr/local/apache2.0.55 /       --enable-so --enable-rewrite /       --enable-mime-magic /       --enable-vhost-alias /       --enable-deflate /       --enable-expires /       --with-mpm=worker # make# make install# cd /usr/local# ln -s apache2.0.55 apache# cd apache# bin/apachectl start 4.  安裝Zlib 1.2.3# tar xzfv zlib-1.2.3.tar.gz# cd zlib-1.2.3# ./configure --shared# make# make install5.  安裝gd-2.0.33# tar xzfv gd-2.0.33.tar.gz# cd gd-2.0.33# ./configure# make# make install6.  安裝 MySQL 4.1 Client由於前邊安裝MySQL Server時用了編譯好的檔案,所以這裡需要安裝一下 MySQL Client。為了方便直接安裝了MySQL 4.1 Client的package# pkg_add mysql-client-4.1.14.tbz7.  安裝 PHP5#tar xzfv php-5.1.1.tar.gz #cd php-5.1.1#./configure --with-apxs2=/usr/local/apache/bin/apxs /--enable-track-vars --with-zlib --with-gd /--with-sockets --enable-sockets /--disable-debug --with-tiff-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib /--with-zlib-dir=/usr/local/lib --with-mysql --with-xml /--enable-shmop /--prefix=/usr/local/php5 /--enable-mbstring /--enable-sysvsem --enable-sysvshm --enable-sysvmsg /--enable-soap#make#make installl         在 apache 的設定檔httpd.conf中加入 AddType application/x-httpd-php .phpl         建立檔案 test.php,內容如下: <? phpinfo(); ?> ,測試apache是否可以解析php 8.  最佳化Apache修改apache的設定檔httpd.conf<IfModule worker.c>StartServers         3MaxClients          2000MinSpareThreads     50MaxSpareThreads     200ThreadsPerChild     100MaxRequestsPerChild 0ThreadLimit 200ServerLimit 25</IfModule> 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.