#分析文件lanmp. SH, which introduced a series of function files in its head. lib/common.conf. lib/common.sh. lib/mysql.sh. lib/apache.sh . lib/nginx.sh. lib/php.sh. lib/na.sh. lib/libiconv.sh. lib/eaccelerator.sh. lib /zend.sh. lib/pureftp.sh. lib/pcre.sh. lib/webconf.sh. lib/service.sh First analyzes lib/ common.conf# defines some path variables # gets the current path in_pwd=$ (PWD) #当前路径下的源码IN_SRC =${in_pwd}/lanmp# log Path Logpath=${in_pwd}/logsin_ Dir= "/www/wdlinux" in_dir_me=0server= "Apache" re_ins=0soft_down=0# software, you can see the specific installation version httpd_du= "/HTTP/ Mirror.bjtu.edu.cn/apache/httpd/httpd-2.2.24.tar.gz "nginx_du=" http://nginx.org/download/nginx-1.2.9.tar.gz " mysql_du= "http://cdn.mysql.com/Downloads/MySQL-5.1/mysql-5.1.69.tar.gz" php_du= "http://www.php.net/get/ Php-5.2.17.tar.gz/from/cn.php.net/mirror "php53_du=" http://tw2.php.net/distributions/php-5.3.29.tar.gz "pureftp_ du= "http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.36.tar.gz" eaccelerator_du= "http// bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2 "zend_du=" http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz " zendx86_du= "Http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-x86_64.tar.gz" php_fpm_ du= "http://php-fpm.org/downloads/php-5.2.14-fpm-0.5.14.diff.gz" vsftpd_du= "http://dl.wdlinux.cn:5180/ Vsftpd-2.2.2.tar.gz "phpmyadmin_du=" http://dl.wdlinux.cn:5180/phpMyAdmin-3.3.3-all-languages.tar.gz "pcre_du=" # Defined series of software versions mys_ver= "5.1.69" ngi_ver= "1.2.9" apa_ver= "2.2.24" php_ver= "5.2.17" pur_ver= "1.0.36" libiconv_ver= "1.14" Eacce_ver= "0.9.5.3" pcre_ver= "8.10" wdcp_ver= "v2.5" #产生程序安装时的锁定文件mysql_inf = "/tmp/mysql_ins.txt" nginx_inf= "/tmp/ Nginx_ins.txt "httpd_inf="/tmp/httpd_ins.txt "pureftp_inf="/tmp/pureftp_ins.txt "php_inf="/tmp/php_ins.txt "Na_inf = "/tmp/na_ins.txt" libiconv_inf= "/tmp/libiconv_ins.txt" eac_inf= "/tmp/eac_ins.txt" zend_inf= "/tmp/zend_ins.txt" conf_inf= "/tmp/conf_ins.txt" wdapache_inf= "/tmp/wdapache_ins.txt" wdphp_inf= "/tmp/wdphp_ins.txt" wdcp_inf= "/tmp/ Wdcp_ins.txt "#定义一个判断操作系统的变量OS_rl=1# changes the value of OS_RL according to the results of grep return grep -qi ' Debian\|ubuntu ' /etc/issue && os_rl=2if [ $OS _rl = 1 ]; then r6=0 grep -q ' release 6 ' /etc/redhat-release && r6=1fi# to determine the operating system is 32 bits the latter 64 bits x86=0if uname -m | grep -q ' x86_64 '; then x86=1fi# gets the name of the current script , and name the log command=$ (basename $0) logpre=${command%%.sh}
WDCP Environment Build shell script Analysis--lanmp.sh---lib/common.conf