Apache+SSL+PHP+JSP+MySQL+IMAP+GD安裝全攻略(轉)
Apache+SSL+PHP+JSP+MySQL+IMAP+GD安裝全攻略(轉)[@more@]在RedHat 7.2上,假設所有安裝程式包都下在/pub下面,原始碼包都用紅色表示,假設在telnet或ssh文字介面下進行如下所有操作。1. Installtarget=_blank>J2SDK 1.41. 下載 J2SDK1.4 的 Linux RPM版本 j2sdk-1_4_0-linux-i386-rpm.bin2. cd /pub3. chmod +x j2sdk-1_4_0-linux-i386-rpm.bin4. ./j2sdk-1_4_0-linux-i386-rpm.bin5. rpm -ivh j2sdk-1_4_0-fcs-linux-i386.rpm6. vi /etc/profile 增加如下內容:JAVA_HOME=/usr/java/j2sdk1.4.0export JAVA_HOMECLASSPATH=/usr/java/j2sdk1.4.0/lib:/usr/java/j2sdk1.4.0/jre/libexport CLASSPATHPATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/binexport PATH7. 重新登入讓環境變數生效2. Installtarget=_blank>Tomcat 4.01. 下載Tomcat的linux binary版本,以及 mod_webapp.so2. tar zxvf jakarta-tomcat-4.0.3.tar.gz3. 做 /pub/jakarta-tomcat-4.0.3/conf 目錄下面server.xml中的其他相關配置(暫時不做也可以)4. /pub/jakarta-tomcat-4.0.3/bin/startup.sh啟動 Tomcat 服務,並且將它加到系統的啟動程式中/etc/rc.d/rc.local(用/pub/jakarta-tomcat-4.0.3/bin/shutdown.sh停止Tomcat )3. Installtarget=_blank>MySQL1. groupadd mysql2. useradd -g mysql mysql3. tar zxvf mysql-3.23.49.tar.gz(or, gunzip < mysql-3.23.49.tar.gz | tar xvf -)4. cd mysql-3.23.495. ./configure --prefix=/usr/local/mysql6. make7. make install8. scripts/mysql_install_db9. chown -R root /usr/local/mysql10. chown -R mysql /usr/local/mysql/var11. chgrp -R mysql /usr/local/mysql12. cp support-files/my-medium.cnf /etc/my.cnf13. cp scripts /usr/local/mysql -R14. cp support-files /usr/local/mysql -R15. cd /usr/local/mysql16. chmod +x support-files/mysql.server17. cp support-files/mysql.server /etc/rc.d/init.d/mysqld同時要設定 /etc/rc.d/init.d/mysqld 開機自動執行:ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc3.d/S99mysqld18. /etc/rc.d/init.d/mysqld start啟動 MySQL19. /usr/local/mysql/bin/mysqladmin -u root passwordew-password設定 MySQL root 口令4. Installtarget=_blank>OpenSSL1. cd /pub2. tar zxvf openssl-0.9.6b.tar.gz3. cd openssl-0.9.6b4. ./config5. make6. make test7. make install5. Installtarget=_blank>mod_ssl1. cd /pub2. tar zxvf mod_ssl-2.8.8-1.3.24.tar.gz3. tar zxvf apache_1.3.24.tar.gz(from )4. cd mod_ssl-2.8.8-1.3.245. ./configure --with-apache=../apache_1.3.246. cd ../apache_1.3.247. ./configure --prefix=/www6. Installhref="ftp://ftp.cac.washington.edu/imap/" target=_blank>IMAP support1. cd /pub2. tar zxvf imap-2001a.tar.Z3. cd imap-2001a4. make slx (for Linux)5. 修改 /etc/services 註冊埠,修改 /etc/inetd.conf 開啟服務6. cp c-client/c-client.a /usr/local/lib/libc-client.a7. cp c-client/rfc822.h /usr/local/include8. cp c-client/mail.h /usr/local/include9. cp c-client/linkage.h /usr/local/include7. Installtarget=_blank>CURL support1. cd /pub2. tar zxvf curl-7.9.6.tar.gz3. cd curl-7.9.64. ./configure --with-ssl --with-prefix=/usr/local/curl5. make6. make test7. make install8. Installtarget=_blank>GD support1. Installtarget=_blank>zlib support1. cd /pub2. tar zxvf zlib-1.1.3.tar.gz3. cd zlib-1.1.34. ./configure5. make6. make test7. make install2. Installtarget=_blank>libpng support1. cd /pub2. tar zxvf libpng-1.0.10.tar.gz3. cd libpng-1.0.104. cp scripts/makefile.linux makefile5. vi makefile修改其中ZLIBLIB=/usr/local/libZLIBINC=/usr/local/include引數6. make test7. make install3. Install jpeg-6bsupport1. cd /pub2. tar zxvf jpegsrc.v6b.tar.gz3. cd jpeg-6b4. ./configure5. make6. make test7. make install8. make install-lib4. Install FreeType2.0.1 support1. cd /pub2. tar zxvf freetype-2.0.1.tar.gz3. cd freetype-2.0.14. make setup5. make6. make install5. Install GDsupport1. cd /pub2. tar zxvf gd-1.8.4.tar.gz3. cd gd-1.8.44. vi Makefile修改其中CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPELIBS=-lgd -lpng -lz -ljpeg -lfreetype -lmINCLUDEDIRS=-I. -I/usr/local/include/freetype2 -I/usr/include/X11-I/usr/X11R6/include/X11 -I/usr/local/include5. make6. make install9. Installtarget=_blank>PHP1. cd /pub2. tar zxvf php-4.2.0.tar.gz3. cd php-4.2.04.CFLAGS=-O2 -I/usr/local/ssl/include./configure --with-apache=../apache_1.3.24--enable-memory-limit=yes--with-config-file-path=/usr/local/lib --with-imap --enable-ftp--with-mysql=/usr/local/mysql--enable-sockets --enable-debug=no --enable-track-vars--with-gd=/usr/local--with-jpeg-dir=/usr/local --with-png-dir=/usr/local--with-curl=/usr/local/curl--with-zlib --with-ttf --with-java5. make6. make install7. cp php.ini-dist /usr/local/lib/php.ini8. 修改 /usr/local/lib/php.ini10.Installtarget=_blank>Zend Optimizer (這步可在最後完成)1. cd /pub2. tar zxvf ZendOptimizer-1[1].2.0-PHP_4.1.0-Linux_glibc21-i386.tar.gz3. cd ZendOptimizer-1.2.0-PHP_4.1.0-Linux_glibc21-i3864. mkdir /usr/local/Zend5. mkdir /usr/local/Zend/lib6. ./install.sh11. Installtarget=_blank>Zend Cache (用在等於或低於 PHP 4.0.5版本,要註冊碼,這步可在最後完成)1. cd /pub2. tar zxvf ZendCache-1[1].1.0b-PHP_4.0.5-Linux_glibc2.1-i386.tar.gz3. cd ZendCache-1.1.0b-PHP_4.0.5-Linux_glibc2.1-i3864. cp data/ZendCache.so /usr/local/Zend/lib5. ( cp zend_cache.dat /usr/local/Zend ) // to registerlicense6. Add the following lines to your php.ini file;do not add any extra spaces or tabs; must after Zend Optimizer configuration:zend_cache.use_cwd=1zend_cache.memory_consumption=16 ; 16MBzend_cache.validate_timestamps=1zend_extension="/usr/local/Zend/lib/ZendCache.so"12. Install ZendAccelerator (用在php 4.0.5以上php 4.2.0以下,要註冊碼哦,這步可在最後完成)1. cd /pub2. tar xvf ZendAccelerator-2.0.0-PHP_4.0.5-Linux_glibc21-i386.tar3. cd ZendAccelerator-2.0.0-PHP_4.0.5-Linux_glibc21-i3864. ./install.sh13. Install Apache1. cd ../apache_1.3.242.SSL_BASE=/usr/local/ssl ./configure--prefix=/www --enable-module=ssl --enable-module=so--activate-module=src/modules/php4/libphp4.a--enable-rule=SSL_SDBM --enable-module=rewrite3. make4. make certificate5. make install6. 修改 /www/conf/httpd.conf,Options Indexes FollowSymLinks MultiViews -> Options FollowSymLinks MultiViewsDirectoryIndex index.html -> DirectoryIndex index.html index.php3 index.php增加LoadModule webapp_module libexec/mod_webapp.soWebAppConnection warpConnection warp localhost:8008WebAppDeploy examples warpConnection /examples/7. vi /www/conf/mime.types 增加application/x-httpd-php php php38. 複製下載的 mod_webapp.so 到 /www/libexec9. 啟動Apache/www/bin/apachectl startssl10. vi /etc/rc.d/init.d/httpd (可選)#!/bin/sh. /etc/rc.d/init.d/functionscase "$1" instart)echo -n "Starting httpd with SSL : "/www/bin/apachectl startssl;;stop)echo -n "Shutting down httpd: "/www/bin/apachectl stop;;restart)echo -n "Restarting httpd: "/www/bin/apachectl restart;;status)echo -n "Show httpd status: "/www/bin/apachectl status;;*)echo "Usage: $0 {start|stop|restart|status}"exit 1esacexit 011. ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc3.d/S99httpd (開機自動執行)14. 最後測試1. 在/www/htdocs/下寫個test.php,內容:,2. ,看看有沒有很多php資訊出來,如果有,說明php/mysql等都沒有問題了。如果有“withZend Optimizer v1.2.0, Copyright (c) 1998-2001, by Zend Technologies”,說明ZendOptimizer裝好了。如果有“with Zend Cache v1.1.0, Copyright (c) 1999-2001, by ZendTechnologies”,說明Zend Cache裝好了。同理,看Zend Accelerator裝好沒有。3. 訪問,有很多jsp的例子,執行看看有沒有問題。恭喜你,jsp也可以了
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8225414/viewspace-944655/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- informix for linux安裝全攻略(轉)ORMLinux
- windows下MRTG安裝全攻略Windows
- Novell Linux Desktop SP1安裝全攻略(轉)Linux
- 無人參與安裝Windows2K全攻略(轉)Windows
- VMware下RedHat安裝Oracle 9i RAC全攻略(轉)RedhatOracle
- sybase-ase- 11.0.3.3安裝不完全攻略(轉)
- SAP IDES ECC6.0安裝全攻略IDE
- Oracle i-Learing 安裝配置全攻略。。。Oracle
- puppet完全攻略(一)puppet應用原理及安裝部署
- 玩轉ubuntu全攻略Ubuntu
- OpenBSD安裝(轉)
- GCC 安裝(轉)GC
- (轉)Nginx安裝Nginx
- JDK安裝(轉)JDK
- grub安裝(轉)
- 輕鬆上手 | 使用國內資源安裝 K3s 全攻略
- DolphinScheduler快速上手:基於Docker Compose的安裝與配置全攻略Docker
- svn安裝【轉載】
- YUM安裝MYSQL(轉)MySql
- ANT安裝、配置(轉)
- grub安裝心得(轉)
- JBoss的安裝(轉)
- 硬碟安裝 Mandriva(轉)硬碟
- 安裝MySQL(UNIX)(轉)MySql
- Chinput 安裝指南(轉)
- 五筆安裝???(轉)
- jive安裝指南 (轉)
- GRUB安裝方式(轉)
- 安裝:SuSE Linux FTP版安裝指南(轉)LinuxFTP
- LINUX下播放DVD全攻略(轉)Linux
- Linux不完全攻略(轉)Linux
- apache安裝和調整效能安裝實踐(轉)Apache
- 選擇一種安裝方法安裝Linux(轉)Linux
- 紅旗安裝攻略--RedFlag4.0安裝心得(轉)
- 輕鬆安裝、解除安裝Linux軟體(轉)Linux
- 轉: Ubuntu 安裝字型方法Ubuntu
- 安裝Pure-FTPD(轉)FTP
- SCO UNIX--安裝(轉)