Skip to content

Commit

Permalink
Apache2.4 use fcgi,change args,systemd mongod
Browse files Browse the repository at this point in the history
  • Loading branch information
bypanelcom committed Nov 21, 2018
1 parent 7059225 commit 1d5069a
Show file tree
Hide file tree
Showing 46 changed files with 347 additions and 268 deletions.
25 changes: 24 additions & 1 deletion addons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,29 @@ if [ -e "${php_install_dir}/bin/phpize" ]; then
phpExtensionDir=$(${php_install_dir}/bin/php-config --extension-dir)
PHP_detail_ver=$(${php_install_dir}/bin/php -r 'echo PHP_VERSION;')
PHP_main_ver=${PHP_detail_ver%.*}
case "${PHP_main_ver}" in
5.3)
php_option=1
;;
5.4)
php_option=2
;;
5.5)
php_option=3
;;
5.6)
php_option=4
;;
7.0)
php_option=5
;;
7.1)
php_option=6
;;
7.2)
php_option=7
;;
esac
fi

# Check PHP Extensions
Expand Down Expand Up @@ -103,7 +126,7 @@ Install_fail2ban() {
chkconfig --add fail2ban
chkconfig fail2ban on
fi
if [ "${PM}" == 'apt' ]; then
if [ "${PM}" == 'apt-get' ]; then
LOGPATH=/var/log/auth.log
/bin/cp files/debian-initd /etc/init.d/fail2ban
sed -i 's@2 3 4 5@3 4 5@' /etc/init.d/fail2ban
Expand Down
2 changes: 1 addition & 1 deletion include/alisql-5.6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Install_AliSQL56() {
sed -i "s@^datadir=.*@datadir=${alisql_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
4 changes: 2 additions & 2 deletions include/apache-2.2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Install_Apache22() {
pushd httpd-${apache22_ver}
[ ! -d "${apache_install_dir}" ] && mkdir -p ${apache_install_dir}
[ "${Ubuntu_ver}" == "12" ] && sed -i '@SSL_PROTOCOL_SSLV2@d' modules/ssl/ssl_engine_io.c
LDFLAGS=-ldl ./configure --prefix=${apache_install_dir} --with-mpm=prefork --with-included-apr --enable-headers --enable-deflate --enable-so --enable-rewrite --enable-ssl--with-ssl=${openssl_install_dir} --enable-expires --enable-static-support --enable-suexec --enable-modules=all --enable-mods-shared=all
LDFLAGS=-ldl ./configure --prefix=${apache_install_dir} --with-mpm=prefork --enable-mpms-shared=all --with-included-apr --enable-headers --enable-mime-magic --enable-deflate --enable-proxy --enable-so --enable-dav --enable-rewrite --enable-expires --enable-static-support --enable-suexec --with-expat=builtin --enable-mods-shared=most --enable-ssl --with-ssl=${openssl_install_dir}
make -j ${THREAD} && make install
unset LDFLAGS
if [ -e "${apache_install_dir}/conf/httpd.conf" ]; then
Expand All @@ -37,7 +37,7 @@ Install_Apache22() {
sed -i '3a # description: Apache is a World Wide Web server. It is used to serve' /etc/init.d/httpd
chmod +x /etc/init.d/httpd
[ "${PM}" == 'yum' ] && { chkconfig --add httpd; chkconfig httpd on; }
[ "${PM}" == 'apt' ] && update-rc.d httpd defaults
[ "${PM}" == 'apt-get' ] && update-rc.d httpd defaults

sed -i "s@^User daemon@User ${run_user}@" ${apache_install_dir}/conf/httpd.conf
sed -i "s@^Group daemon@Group ${run_user}@" ${apache_install_dir}/conf/httpd.conf
Expand Down
28 changes: 18 additions & 10 deletions include/apache-2.4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
Install_Apache24() {
pushd ${oneinstack_dir}/src > /dev/null
tar xzf pcre-${pcre_ver}.tar.gz
pushd pcre-${pcre_ver}
pushd pcre-${pcre_ver} > /dev/null
./configure
make -j ${THREAD} && make install
popd
popd > /dev/null
id -u ${run_user} >/dev/null 2>&1
[ $? -ne 0 ] && useradd -M -s /sbin/nologin ${run_user}
tar xzf httpd-${apache24_ver}.tar.gz
Expand All @@ -24,26 +24,25 @@ Install_Apache24() {
# install nghttp2
if [ ! -e "/usr/local/lib/libnghttp2.so" ]; then
tar xzf nghttp2-${nghttp2_ver}.tar.gz
pushd nghttp2-${nghttp2_ver}
pushd nghttp2-${nghttp2_ver} > /dev/null
./configure
make -j ${THREAD} && make install
popd
popd > /dev/null
[ -z "`grep /usr/local/lib /etc/ld.so.conf.d/*.conf`" ] && echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf
ldconfig
rm -rf nghttp2-${nghttp2_ver}
fi

pushd httpd-${apache24_ver}
pushd httpd-${apache24_ver} > /dev/null
[ ! -d "${apache_install_dir}" ] && mkdir -p ${apache_install_dir}
/bin/cp -R ../apr-${apr_ver} ./srclib/apr
/bin/cp -R ../apr-util-${apr_util_ver} ./srclib/apr-util
[[ "${php_option}" =~ ^[1-4]$ ]] && Apache_mpm_arg='--with-mpm=prefork'
LDFLAGS=-ldl ./configure --prefix=${apache_install_dir} ${Apache_mpm_arg} --enable-mpms-shared=all --with-included-apr --enable-headers --enable-deflate --enable-so --enable-dav --enable-rewrite --enable-ssl --with-ssl=${openssl_install_dir} --enable-http2 --with-nghttp2=/usr/local --enable-expires --enable-static-support --enable-suexec --enable-modules=all --enable-mods-shared=all
LDFLAGS=-ldl ./configure --prefix=${apache_install_dir} --enable-mpms-shared=all --with-pcre --with-included-apr --enable-headers --enable-mime-magic --enable-deflate --enable-proxy --enable-so --enable-dav --enable-rewrite --enable-remoteip --enable-expires --enable-static-support --enable-suexec --enable-mods-shared=most --enable-nonportable-atomics=yes --enable-ssl --with-ssl=${openssl_install_dir} --enable-http2 --with-nghttp2=/usr/local
make -j ${THREAD} && make install
popd > /dev/null
unset LDFLAGS
if [ -e "${apache_install_dir}/conf/httpd.conf" ]; then
echo "${CSUCCESS}Apache installed successfully! ${CEND}"
popd
rm -rf httpd-${apache24_ver} pcre-${pcre_ver} apr-${apr_ver} apr-util-${apr_util_ver}
else
rm -rf ${apache_install_dir}
Expand All @@ -60,7 +59,7 @@ Install_Apache24() {
sed -i '3a # description: Apache is a World Wide Web server. It is used to serve' /etc/init.d/httpd
chmod +x /etc/init.d/httpd
[ "${PM}" == 'yum' ] && { chkconfig --add httpd; chkconfig httpd on; }
[ "${PM}" == 'apt' ] && update-rc.d httpd defaults
[ "${PM}" == 'apt-get' ] && update-rc.d httpd defaults

sed -i "s@^User daemon@User ${run_user}@" ${apache_install_dir}/conf/httpd.conf
sed -i "s@^Group daemon@Group ${run_user}@" ${apache_install_dir}/conf/httpd.conf
Expand All @@ -74,6 +73,8 @@ Install_Apache24() {
fi
sed -i "s@AddType\(.*\)Z@AddType\1Z\n AddType application/x-httpd-php .php .phtml\n AddType application/x-httpd-php-source .phps@" ${apache_install_dir}/conf/httpd.conf
sed -i "s@#AddHandler cgi-script .cgi@AddHandler cgi-script .cgi .pl@" ${apache_install_dir}/conf/httpd.conf
sed -ri 's@^#(.*mod_proxy.so)@\1@' ${apache_install_dir}/conf/httpd.conf
sed -ri 's@^#(.*mod_proxy_fcgi.so)@\1@' ${apache_install_dir}/conf/httpd.conf
sed -ri 's@^#(.*mod_suexec.so)@\1@' ${apache_install_dir}/conf/httpd.conf
sed -ri 's@^#(.*mod_vhost_alias.so)@\1@' ${apache_install_dir}/conf/httpd.conf
sed -ri 's@^#(.*mod_rewrite.so)@\1@' ${apache_install_dir}/conf/httpd.conf
Expand Down Expand Up @@ -110,6 +111,13 @@ EOF
ServerName 127.0.0.1
ErrorLog "${wwwlogs_dir}/error_apache.log"
CustomLog "${wwwlogs_dir}/access_apache.log" common
<Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)\$>
Order allow,deny
Deny from all
</Files>
<FilesMatch \.php$>
SetHandler "proxy:unix:/dev/shm/php-cgi.sock|fcgi:https://localhost"
</FilesMatch>
<Directory "${wwwroot_dir}/default">
SetOutputFilter DEFLATE
Options FollowSymLinks ExecCGI
Expand Down Expand Up @@ -157,5 +165,5 @@ EOF
fi
ldconfig
service httpd start
popd
popd > /dev/null
}
2 changes: 1 addition & 1 deletion include/check_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ checkDownload() {
if [ "${PM}" == 'yum' ]; then
echo "Download tmux for CentOS..."
src_url=${mirrorLink}/libevent-${libevent_ver}.tar.gz && Download_src
src_url=https://github.com/tmux/tmux/releases/download/${tmux_ver}/tmux-${tmux_ver}.tar.gz && Download_src
src_url=${mirrorLink}/tmux-${tmux_ver}.tar.gz && Download_src

echo "Download htop for CentOS..."
src_url=http:https://hisham.hm/htop/releases/${htop_ver}/htop-${htop_ver}.tar.gz && Download_src
Expand Down
2 changes: 1 addition & 1 deletion include/check_os.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ -e "/usr/bin/yum" ]; then
command -v lsb_release >/dev/null 2>&1 || { yum -y install redhat-lsb-core; clear; }
fi
if [ -e "/usr/bin/apt-get" ]; then
PM=apt
PM=apt-get
command -v lsb_release >/dev/null 2>&1 || { apt-get -y update; apt-get -y install lsb-release; clear; }
fi

Expand Down
2 changes: 1 addition & 1 deletion include/mariadb-10.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Install_MariaDB100() {
sed -i "s@^datadir=.*@datadir=${mariadb_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
2 changes: 1 addition & 1 deletion include/mariadb-10.1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Install_MariaDB101() {
sed -i "s@^datadir=.*@datadir=${mariadb_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
2 changes: 1 addition & 1 deletion include/mariadb-10.2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Install_MariaDB102() {
sed -i "s@^datadir=.*@datadir=${mariadb_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
2 changes: 1 addition & 1 deletion include/mariadb-10.3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Install_MariaDB103() {
sed -i "s@^datadir=.*@datadir=${mariadb_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
2 changes: 1 addition & 1 deletion include/mariadb-5.5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Install_MariaDB55() {
sed -i "s@^datadir=.*@datadir=${mariadb_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
4 changes: 2 additions & 2 deletions include/memcached.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Install_memcached() {
rm -rf memcached-${memcached_ver}
ln -s ${memcached_install_dir}/bin/memcached /usr/bin/memcached
[ "${PM}" == 'yum' ] && { /bin/cp ../init.d/Memcached-init-CentOS /etc/init.d/memcached; chkconfig --add memcached; chkconfig memcached on; }
[ "${PM}" == 'apt' ] && { /bin/cp ../init.d/Memcached-init-Ubuntu /etc/init.d/memcached; update-rc.d memcached defaults; }
[ "${PM}" == 'apt-get' ] && { /bin/cp ../init.d/Memcached-init-Ubuntu /etc/init.d/memcached; update-rc.d memcached defaults; }
sed -i "s@/usr/local/memcached@${memcached_install_dir}@g" /etc/init.d/memcached
let memcachedCache="${Mem}/8"
[ -n "$(grep 'CACHESIZE=' /etc/init.d/memcached)" ] && sed -i "s@^CACHESIZE=.*@CACHESIZE=${memcachedCache}@" /etc/init.d/memcached
Expand Down Expand Up @@ -80,7 +80,7 @@ Install_pecl-memcached() {
patch -d libmemcached-${libmemcached_ver} -p0 < libmemcached-build.patch
pushd libmemcached-${libmemcached_ver} > /dev/null
[ "${PM}" == 'yum' ] && yum -y install cyrus-sasl-devel
[ "${PM}" == 'apt' ] && sed -i "s@lthread -pthread -pthreads@lthread -lpthread -pthreads@" ./configure
[ "${PM}" == 'apt-get' ] && sed -i "s@lthread -pthread -pthreads@lthread -lpthread -pthreads@" ./configure
./configure --with-memcached=${memcached_install_dir}
make -j ${THREAD} && make install
popd > /dev/null
Expand Down
11 changes: 9 additions & 2 deletions include/mongodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ Install_MongoDB() {
mkdir -p ${mongo_data_dir};chown mongod.mongod -R ${mongo_data_dir}
tar xzf mongodb-linux-${SYS_BIT_b}-${mongodb_ver}.tgz
/bin/mv mongodb-linux-${SYS_BIT_b}-${mongodb_ver} ${mongo_install_dir}
[ "${PM}" == 'yum' ] && { /bin/cp ../init.d/MongoDB-init-CentOS /etc/init.d/mongod; sed -i "s@/usr/local/mongodb@${mongo_install_dir}@g" /etc/init.d/mongod; chkconfig --add mongod; chkconfig mongod on; }
[ "${PM}" == 'apt' ] && { /bin/cp ../init.d/MongoDB-init-Ubuntu /etc/init.d/mongod; sed -i "s@/usr/local/mongodb@${mongo_install_dir}@g" /etc/init.d/mongod; update-rc.d mongod defaults; }
if [ -e /bin/systemctl ]; then
/bin/cp ${oneinstack_dir}/init.d/mongod.service /lib/systemd/system/
sed -i "s@=/usr/local/mongodb@=${mongo_install_dir}@g" /lib/systemd/system/mongod.service
systemctl enable mongod
else
[ "${PM}" == 'yum' ] && { /bin/cp ../init.d/MongoDB-init-CentOS /etc/init.d/mongod; sed -i "s@/usr/local/mongodb@${mongo_install_dir}@g" /etc/init.d/mongod; chkconfig --add mongod; chkconfig mongod on; }
[ "${PM}" == 'apt-get' ] && { /bin/cp ../init.d/MongoDB-init-Ubuntu /etc/init.d/mongod; sed -i "s@/usr/local/mongodb@${mongo_install_dir}@g" /etc/init.d/mongod; update-rc.d mongod defaults; }
fi

cat > /etc/mongod.conf << EOF
# mongod.conf
Expand Down
2 changes: 1 addition & 1 deletion include/mysql-5.5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Install_MySQL55() {
sed -i "s@^datadir=.*@datadir=${mysql_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
2 changes: 1 addition & 1 deletion include/mysql-5.6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Install_MySQL56() {
sed -i "s@^datadir=.*@datadir=${mysql_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
2 changes: 1 addition & 1 deletion include/mysql-5.7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Install_MySQL57() {
sed -i "s@^datadir=.*@datadir=${mysql_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
2 changes: 1 addition & 1 deletion include/mysql-8.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Install_MySQL80() {
sed -i "s@^datadir=.*@datadir=${mysql_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
2 changes: 1 addition & 1 deletion include/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Install_Nginx() {
systemctl enable nginx
else
[ "${PM}" == 'yum' ] && { /bin/cp ../init.d/Nginx-init-CentOS /etc/init.d/nginx; sed -i "s@/usr/local/nginx@${nginx_install_dir}@g" /etc/init.d/nginx; chkconfig --add nginx; chkconfig nginx on; }
[ "${PM}" == 'apt' ] && { /bin/cp ../init.d/Nginx-init-Ubuntu /etc/init.d/nginx; sed -i "s@/usr/local/nginx@${nginx_install_dir}@g" /etc/init.d/nginx; update-rc.d nginx defaults; }
[ "${PM}" == 'apt-get' ] && { /bin/cp ../init.d/Nginx-init-Ubuntu /etc/init.d/nginx; sed -i "s@/usr/local/nginx@${nginx_install_dir}@g" /etc/init.d/nginx; update-rc.d nginx defaults; }
fi

mv ${nginx_install_dir}/conf/nginx.conf{,_bk}
Expand Down
2 changes: 1 addition & 1 deletion include/openresty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Install_OpenResty() {
systemctl enable nginx
else
[ "${PM}" == 'yum' ] && { /bin/cp ../init.d/Nginx-init-CentOS /etc/init.d/nginx; sed -i "s@/usr/local/nginx@${openresty_install_dir}/nginx@g" /etc/init.d/nginx; chkconfig --add nginx; chkconfig nginx on; }
[ "${PM}" == 'apt' ] && { /bin/cp ../init.d/Nginx-init-Ubuntu /etc/init.d/nginx; sed -i "s@/usr/local/nginx@${openresty_install_dir}/nginx@g" /etc/init.d/nginx; update-rc.d nginx defaults; }
[ "${PM}" == 'apt-get' ] && { /bin/cp ../init.d/Nginx-init-Ubuntu /etc/init.d/nginx; sed -i "s@/usr/local/nginx@${openresty_install_dir}/nginx@g" /etc/init.d/nginx; update-rc.d nginx defaults; }
fi

mv ${openresty_install_dir}/nginx/conf/nginx.conf{,_bk}
Expand Down
2 changes: 1 addition & 1 deletion include/percona-5.5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Install_Percona55() {
sed -i "s@^datadir=.*@datadir=${percona_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
2 changes: 1 addition & 1 deletion include/percona-5.6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Install_Percona56() {
sed -i "s@^datadir=.*@datadir=${percona_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
2 changes: 1 addition & 1 deletion include/percona-5.7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Install_Percona57() {
sed -i "s@^datadir=.*@datadir=${percona_data_dir}@" /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
[ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
[ "${PM}" == 'apt' ] && update-rc.d mysqld defaults
[ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
popd

# my.cnf
Expand Down
Loading

0 comments on commit 1d5069a

Please sign in to comment.