Repository navigation
Expand file tree
/
Copy pathinstall_httpd_php.sh
More file actions
executable file
·66 lines (57 loc) · 1.84 KB
/
Copy pathinstall_httpd_php.sh
File metadata and controls
executable file
·66 lines (57 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
cd ./download
rm -rf ${php_dir}
tar zxvf ${php_dir}.tar.gz
cd ${php_dir}
./configure --prefix=${conf_install_dir}/server/php \
--enable-opcache \
--with-config-file-path=${conf_install_dir}/server/php/etc \
--with-apxs2=${conf_install_dir}/server/httpd/bin/apxs \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--enable-static \
--enable-maintainer-zts \
--enable-zend-multibyte \
--enable-inline-optimization \
--enable-sockets \
--enable-wddx \
--enable-zip \
--enable-calendar \
--enable-bcmath \
--enable-soap \
--with-zlib \
--with-iconv \
--with-gd \
--with-xmlrpc \
--enable-mbstring \
--without-sqlite \
--with-curl \
--enable-ftp \
--with-mcrypt \
--with-freetype-dir=/usr/local/freetype.2.1.10 \
--with-jpeg-dir=/usr/local/jpeg.9 \
--with-png-dir=/usr/local/libpng.1.6.19 \
--disable-ipv6 \
--disable-debug \
--with-openssl \
--disable-maintainer-zts \
--disable-safe-mode \
--disable-fileinfo
if [ $CPU_NUM -gt 1 ];then
make ZEND_EXTRA_LIBS='-liconv' -j$CPU_NUM
else
make ZEND_EXTRA_LIBS='-liconv'
fi
make install
cp ./php.ini-production ${conf_install_dir}/server/php/etc/php.ini
cd ../../
#adjust php.ini
sed -i 's#; extension_dir = \"\.\/\"#extension_dir = "${conf_install_dir}/server/php/lib/php/extensions/no-debug-non-zts-20121212/"#' ${conf_install_dir}/server/php/etc/php.ini
sed -i 's/post_max_size = 8M/post_max_size = 64M/g' ${conf_install_dir}/server/php/etc/php.ini
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 64M/g' ${conf_install_dir}/server/php/etc/php.ini
sed -i 's/;date.timezone =/date.timezone = PRC/g' ${conf_install_dir}/server/php/etc/php.ini
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=1/g' ${conf_install_dir}/server/php/etc/php.ini
sed -i 's/max_execution_time = 30/max_execution_time = 300/g' ${conf_install_dir}/server/php/etc/php.ini
/etc/init.d/httpd restart
sleep 5