[root@localhost ~]# cat auto_install_mysql5.5.sh #!/bin/bash #mysql define variables mysql_ver="5.5.60" mysql_soft="mysql-${mysql_ver}.tar.gz" mysql_dir="mysql-5.5.60" mysql_url="http://mirrors.163.com/mysql/Downloads/MySQL-5.5/$mysql_soft" function mysql_install(){ yum install wget gcc c ncurses-de