指令碼安裝apache+php
#!/bin/bash
#注意,安裝前先安裝mysql,mysql安裝在/usr/local/mysql目錄。
tar -jxvf httpd-2.2.11.tar.bz2
mkdir /usr/local/apache2
cd httpd-2.2.11
./configure –prefix=/usr/local/apache2/ –enable-so
make && make install
echo “/usr/local/apache2/bin/apachectl start” >> /etc/rc.d/rc.local
/usr/local/apache2/bin/apxs -c -i -a /root/httpd-2.2.11/modules/mappers/mod_rewrite.c
mkdir /usr/local/apache2
cd httpd-2.2.11
./configure –prefix=/usr/local/apache2/ –enable-so
make && make install
echo “/usr/local/apache2/bin/apachectl start” >> /etc/rc.d/rc.local
/usr/local/apache2/bin/apxs -c -i -a /root/httpd-2.2.11/modules/mappers/mod_rewrite.c
cd
tar -jxvf php-5.2.10.tar.bz2
cd php-5.2.10
./configure –prefix=/usr/local/php/ –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql=/usr/local/mysql/ –with-libxml-dir —
with-iconv –with-gd –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –enable-mbstring –enable-sockets
make && make install
cp php.ini-dist /usr/local/php/etc/php.ini
echo “AddType application/x-httpd-php .php” >> /usr/local/apache2/conf/httpd.conf
/usr/local/apache2/bin/apachectl start
tar -jxvf php-5.2.10.tar.bz2
cd php-5.2.10
./configure –prefix=/usr/local/php/ –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql=/usr/local/mysql/ –with-libxml-dir —
with-iconv –with-gd –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –enable-mbstring –enable-sockets
make && make install
cp php.ini-dist /usr/local/php/etc/php.ini
echo “AddType application/x-httpd-php .php” >> /usr/local/apache2/conf/httpd.conf
/usr/local/apache2/bin/apachectl start
本文轉自 fenghao.cn 51CTO部落格,原文連結:http://blog.51cto.com/linuxguest/309094,如需轉載請自行聯絡原作者
相關文章
- 安裝apache+php記錄ApachePHP
- win7安裝apache+phpWin7ApachePHP
- pyenv 安裝指令碼指令碼
- lnmp安裝指令碼LNMP指令碼
- Docker的指令碼安裝Docker指令碼
- Tomcat安裝指令碼Tomcat指令碼
- LNMP安裝shell指令碼LNMP指令碼
- Ansible安裝指令碼指令碼
- install安裝指令碼指令碼
- Apache+php在windows下的安裝和配置ApachePHPWindows
- shell指令碼:一鍵安裝LAMP、LNMP指令碼指令碼LAMPLNMP
- ecs使用指令碼安裝oracle指令碼Oracle
- LAMPorLNMP一鍵安裝指令碼LAMPLNMP指令碼
- SQL Server解除安裝指令碼SQLServer指令碼
- 自動化指令碼安裝mysql shell指令碼範例指令碼MySql
- shell指令碼一鍵安裝nginx指令碼Nginx
- mydumper自動化安裝指令碼指令碼
- 【Zabbix】zabbix_agent安裝指令碼指令碼
- 11g解除安裝指令碼指令碼
- Memcached安裝及啟動指令碼指令碼
- golang一鍵自動安裝指令碼Golang指令碼
- 安裝MQ7.5指令碼MQ指令碼
- LNMP一鍵自動安裝指令碼LNMP指令碼
- Inno Setup 5.22安裝指令碼示例指令碼
- mysql8.0原始碼一鍵安裝指令碼MySql原始碼指令碼
- Shell指令碼 | 一鍵解除安裝安卓App指令碼安卓APP
- 【PHP】php安裝bcmath擴充套件指令碼PHP套件指令碼
- centos7 mysql 一鍵安裝指令碼CentOSMySql指令碼
- 使用指令碼進行 SAP Spartacus 安裝工作指令碼
- 編寫安裝配置mail服務指令碼AI指令碼
- CentOS下LAMP一鍵yum安裝指令碼CentOSLAMP指令碼
- 自動化安裝zabbix指令碼(3.0/3.2)指令碼
- cacti一鍵安裝指令碼V1.1指令碼
- Oracle安裝前的環境配置指令碼Oracle指令碼
- Hadoop自動化安裝shell指令碼Hadoop指令碼
- LNMP一鍵自動安裝指令碼薦LNMP指令碼
- Linux下JPEG庫安裝指令碼(轉)Linux指令碼
- rsync客戶端一鍵安裝rsync指令碼(原始碼)客戶端指令碼原始碼