Skip to content

Commit 98ce3af

Browse files
committed
release 2.0.0
1 parent b2728e3 commit 98ce3af

File tree

5 files changed

+24
-121
lines changed

5 files changed

+24
-121
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You could set up a L.N.M.P based environment easily by Moss. Inlcude all feature
66

77
* **Optimize** - Automatic optimize CentOS system. Change to faster YUM repository mirror, add EPEL repository mirror, optimize kernel TCP settings, vi improved, sudo policy, SSH optimize;
88
* **Security** - Turn off unused services, disable SSH password authentication, add users with SSH RSA keys accroding to user configuration;
9-
* **Services** - Automatic install Nginx/PHP FastCGI/PECL modules(Redis, XCache)/MySQL/Percona Xtrabackup/Redis/Zabbix Agent...;
9+
* **Services** - Automatic install Nginx/PHP FastCGI/PECL modules(Redis)/MySQL/Percona Xtrabackup/Redis/Zabbix Agent...;
1010
* **Performance** - All serives were set to optimized settings, you could use it in production environment directly;
1111
* **Maintenance** - User configure file support. Automatic set up database backup policy, logs rotate policy and all service were added to SysV service;
1212
* **Develop** - You could develop Moss easily. All features in Moss were designed by modules, you can add or remove modules to fit your need;

common/functions.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,6 @@ compile(){
196196
ln -sf ${INST_DIR}/${SRC_DIR} "$SYMLINK"
197197
fi
198198

199-
succ_msg "Strip files"
200-
[ -d "${INST_DIR}/${SRC_DIR}/bin" ] && strip ${INST_DIR}/${SRC_DIR}/bin/* > /dev/null 2>&1
201-
[ -d "${INST_DIR}/${SRC_DIR}/sbin" ] && strip ${INST_DIR}/${SRC_DIR}/sbin/* > /dev/null 2>&1
202-
[ -d "${INST_DIR}/${SRC_DIR}/lib" ] && find ${INST_DIR}/${SRC_DIR}/lib/ -iregex '.*\.so' | xargs strip > /dev/null 2>&1
203-
[ -d "${INST_DIR}/${SRC_DIR}/lib64" ] && find ${INST_DIR}/${SRC_DIR}/lib64/ -iregex '.*\.so' | xargs strip > /dev/null 2>&1
204-
succ_msg "Finish strip files"
205-
206199
succ_msg "Clean old dir : ${STORE_DIR}/${SRC_DIR}"
207200
cd ${STORE_DIR} && rm -rf "${STORE_DIR}/${SRC_DIR}"
208201

common/uninstall.sh

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -233,96 +233,11 @@ if grep '^PHP$' ${INST_LOG} > /dev/null 2>&1 ; then
233233
succ_msg "PECL Module: Redis Removed!"
234234
fi
235235

236-
if grep '^PECL_XCACHE$' ${INST_LOG} > /dev/null 2>&1 ; then
237-
sed -i "/^PECL_XCACHE$/d" ${INST_LOG}
238-
succ_msg "PECL Module: XCache Removed!"
239-
fi
240-
241236
succ_msg "PHP has been removed from your system!"
242237
sleep 3
243238
fi
244239
fi
245240

246-
## uninstall OpenSSL
247-
if grep '^OPENSSL$' ${INST_LOG} > /dev/null 2>&1 ; then
248-
y_or_n 'Do you wish to remove OpenSSL?' 'n'
249-
DEL_OPENSSL=${USER_INPUT}
250-
251-
if [ "${DEL_OPENSSL}" = 'y' ];then
252-
rm -f /usr/local/openssl
253-
rm -rf ${INST_DIR}/openssl-*
254-
255-
sed -i "/^OPENSSL$/d" ${INST_LOG}
256-
257-
succ_msg "OpenSSL has been removed from your system!"
258-
sleep 3
259-
fi
260-
fi
261-
262-
## uninstall zlib
263-
if grep '^ZLIB$' ${INST_LOG} > /dev/null 2>&1 ; then
264-
y_or_n 'Do you wish to remove zlib?' 'n'
265-
DEL_ZLIB=${USER_INPUT}
266-
267-
if [ "${DEL_ZLIB}" = 'y' ];then
268-
rm -f /usr/local/zlib
269-
rm -rf ${INST_DIR}/zlib-*
270-
271-
sed -i "/^ZLIB$/d" ${INST_LOG}
272-
273-
succ_msg "zlib has been removed from your system!"
274-
sleep 3
275-
fi
276-
fi
277-
278-
## uninstall PCRE
279-
if grep '^PCRE$' ${INST_LOG} > /dev/null 2>&1 ; then
280-
y_or_n 'Do you wish to remove PCRE?' 'n'
281-
DEL_PCRE=${USER_INPUT}
282-
283-
if [ "${DEL_PCRE}" = 'y' ];then
284-
rm -f /usr/local/pcre
285-
rm -rf ${INST_DIR}/pcre-*
286-
287-
sed -i "/^PCRE$/d" ${INST_LOG}
288-
289-
succ_msg "PCRE has been removed from your system!"
290-
sleep 3
291-
fi
292-
fi
293-
294-
## uninstall LibXML2
295-
if grep '^LIBXML2$' ${INST_LOG} > /dev/null 2>&1 ; then
296-
y_or_n 'Do you wish to remove LibXML2?' 'n'
297-
DEL_LIBXML2=${USER_INPUT}
298-
299-
if [ "${DEL_LIBXML2}" = 'y' ];then
300-
rm -f /usr/local/libxml2
301-
rm -rf ${INST_DIR}/libxml2-*
302-
303-
sed -i "/^LIBXML2$/d" ${INST_LOG}
304-
305-
succ_msg "LibXML2 has been removed from your system!"
306-
sleep 3
307-
fi
308-
fi
309-
310-
## uninstall LibMcrypt
311-
if grep '^LIBMCRYPT$' ${INST_LOG} > /dev/null 2>&1 ; then
312-
y_or_n 'Do you wish to remove LibMcrypt?' 'n'
313-
DEL_LIBMCRYPT=${USER_INPUT}
314-
315-
if [ "${DEL_LIBMCRYPT}" = 'y' ];then
316-
rm -f /usr/local/libmcrypt
317-
rm -rf ${INST_DIR}/libmcrypt-*
318-
319-
sed -i "/^LIBMCRYPT$/d" ${INST_LOG}
320-
321-
succ_msg "LibMcrypt has been removed from your system!"
322-
sleep 3
323-
fi
324-
fi
325-
326241
## uninstall CURL
327242
if grep '^CURL$' ${INST_LOG} > /dev/null 2>&1 ; then
328243
y_or_n 'Do you wish to remove CURL?' 'n'

compile/php.sh

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,44 +26,42 @@ if ! grep '^PHP$' ${INST_LOG} > /dev/null 2>&1 ;then
2626
--with-config-file-path=${INST_DIR}/${SRC_DIR}/etc \
2727
--with-curl=${CURL_DIR} \
2828
--with-mysql=mysqlnd \
29-
--enable-mysqlnd
3029
--with-mysqli=mysqlnd \
3130
--with-pdo-mysql=mysqlnd \
3231
--with-openssl \
3332
--with-zlib \
33+
--with-mcrypt \
34+
--with-gettext \
3435
--with-gd \
35-
--enable-gd-jis-conv \
3636
--with-jpeg-dir \
3737
--with-png-dir \
3838
--with-gettext \
3939
--with-freetype-dir \
40-
--enable-gd-native-ttf \
4140
--with-mhash \
4241
--with-gmp \
4342
--with-iconv \
4443
--with-xmlrpc \
4544
--with-pcre-regex \
4645
--without-pear \
47-
--without-pdo-sqlite \
48-
--without-sqlite3 \
49-
--disable-cgi \
50-
--disable-ipv6 \
51-
--disable-phar \
52-
--disable-rpath \
46+
--enable-mysqlnd \
5347
--enable-fpm \
48+
--enable-gd-jis-conv \
49+
--enable-gd-native-ttf \
5450
--enable-ftp \
5551
--enable-zip \
56-
--with-gettext \
5752
--enable-bcmath \
5853
--enable-sockets \
59-
--with-mcrypt \
6054
--enable-calendar \
6155
--enable-shmop \
6256
--enable-sysvsem \
6357
--enable-sysvshm \
6458
--enable-sysvmsg \
6559
--enable-mbstring \
66-
--enable-opcache "
60+
--enable-opcache \
61+
--disable-ipv6 \
62+
--disable-cgi \
63+
--disable-phar \
64+
--disable-rpath"
6765

6866

6967
## for compile
@@ -94,7 +92,10 @@ if ! grep '^PHP$' ${INST_LOG} > /dev/null 2>&1 ;then
9492
echo '0 0 * * * /usr/sbin/logrotate -f /usr/local/etc/logrotate/php-fpm > /dev/null 2>&1' >> /var/spool/cron/root
9593
chown root:root /var/spool/cron/root
9694
chmod 600 /var/spool/cron/root
97-
# security
95+
## opcache
96+
OPCACHE=$(find ${INST_DIR}/${SRC_DIR}/ -name 'opcache.so')
97+
mv -f ${OPCACHE} ${INST_DIR}/${SRC_DIR}/ext/
98+
## security
9899
#sed -i "s#^open_basedir.*#open_basedir = "${NGX_DOCROOT},/tmp"#" /usr/local/php/etc/php.ini
99100
## init scripts
100101
install -m 0755 ${TOP_DIR}/conf/php/php-fpm.init /etc/init.d/php-fpm

conf/php/php.ini

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,21 +1873,23 @@ ldap.max_links = -1
18731873
;dba.default_handler=
18741874

18751875
[opcache]
1876+
zend_extension=opcache.so
1877+
18761878
; Determines if Zend OPCache is enabled
1877-
;opcache.enable=0
1879+
opcache.enable=1
18781880

18791881
; Determines if Zend OPCache is enabled for the CLI version of PHP
1880-
;opcache.enable_cli=0
1882+
opcache.enable_cli=1
18811883

18821884
; The OPcache shared memory storage size.
1883-
;opcache.memory_consumption=64
1885+
opcache.memory_consumption=128
18841886

18851887
; The amount of memory for interned strings in Mbytes.
1886-
;opcache.interned_strings_buffer=4
1888+
opcache.interned_strings_buffer=8
18871889

18881890
; The maximum number of keys (scripts) in the OPcache hash table.
18891891
; Only numbers between 200 and 100000 are allowed.
1890-
;opcache.max_accelerated_files=2000
1892+
opcache.max_accelerated_files=4000
18911893

18921894
; The maximum percentage of "wasted" memory until a restart is scheduled.
18931895
;opcache.max_wasted_percentage=5
@@ -1905,7 +1907,7 @@ ldap.max_links = -1
19051907
; How often (in seconds) to check file timestamps for changes to the shared
19061908
; memory storage allocation. ("1" means validate once per second, but only
19071909
; once per request. "0" means always validate)
1908-
;opcache.revalidate_freq=2
1910+
opcache.revalidate_freq=60
19091911

19101912
; Enables or disables file search in include_path optimization
19111913
;opcache.revalidate_path=0
@@ -1920,7 +1922,7 @@ ldap.max_links = -1
19201922
;opcache.load_comments=1
19211923

19221924
; If enabled, a fast shutdown sequence is used for the accelerated code
1923-
;opcache.fast_shutdown=0
1925+
opcache.fast_shutdown=1
19241926

19251927
; Allow file existence override (file_exists, etc.) performance feature.
19261928
;opcache.enable_file_override=0
@@ -1995,11 +1997,3 @@ ldap.max_links = -1
19951997
; tab-width: 4
19961998
; End:
19971999

1998-
[Zend OPcache]
1999-
opcache.memory_consumption = 128
2000-
opcache.interned_strings_buffer = 8
2001-
opcache.max_accelerated_files = 4000
2002-
opcache.revalidate_freq = 60
2003-
opcache.fast_shutdown = 1
2004-
opcache.enable_cli = 1
2005-

0 commit comments

Comments
 (0)