Install Apache + PHP + MySQL step by step
Last Update:2018-12-05
Source: Internet
Author: User
1. Before installation you need to download the following package 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.1 Website: 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.033 Website: http://www.boutell.com/gdDownload URL: http://www.boutell.com/gd/http/gd-2.0.33.tar.gz 2. Install 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. install 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. install zlib 1.2.3 # tar xzfv zlib-1.2.3.tar.gz # cd zlib-1.2.3 #. /configure -- shared # Make install5. install gd-2.0.33 # tar xzfv gd-2.0.33.tar.gz # cd gd-2.0.33 #. /configure # Make install6. install MySQL 4.1 client because the compiled file is used before installing MySQL server, you need to install MYSQL client here. To facilitate the direct installation of MySQL 4.1 client package # pkg_add mysql-client-4.1.14.tbz7. install 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 installl in the Apache configuration file httpd. add addtype application/X-httpd-PHP to Conf. phpl creates a file named test. PHP: <? Phpinfo ();?> To test whether Apache can parse Php 8. optimize Apache to modify Apache configuration file httpd. conf <ifmodule worker. c> startservers 3 maxclients 2000 minsparethreads 50 maxsparethreads 200 threadsperchild 100 maxrequestsperchild 0 threadlimit 200 serverlimit 25 </ifmodule>