Mitesh Shah
11 years ago
11 changed files with 3348 additions and 16 deletions
File diff suppressed because it is too large
@ -1,25 +1,29 @@ |
|||
# Install MySQL Package |
|||
|
|||
ee_lib_install_mysql() |
|||
ee_mod_install_mysql() |
|||
{ |
|||
# Check mysql-server is installed or not |
|||
# Check MySQL is installed or not |
|||
ee_lib_package_check mysql-server |
|||
|
|||
# If mysql-server is not installed |
|||
# Then set random mysql password for root user |
|||
# If MySQL is not installed |
|||
# Then set random MySQL password for root user |
|||
if [ -n $PACKAGE_NAME ]; then |
|||
|
|||
# setting up mysql password |
|||
# Setting up MySQL password |
|||
local ee_mysql_auto_pass=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15 | head -n1) |
|||
debconf-set-selections <<< "mysql-server mysql-server/root_password password $ee_mysql_auto_pass" |
|||
debconf-set-selections <<< "mysql-server mysql-server/root_password_again password $ee_mysql_auto_pass" |
|||
|
|||
# Generate ~/.my.cnf |
|||
echo -e "[client]\nuser=root\npassword=$ee_mysql_auto_pass" > ~/.my.cnf4 |
|||
echo -e "[client]\nuser=root\npassword=$ee_mysql_auto_pass" > ~/.my.cnf |
|||
|
|||
fi |
|||
|
|||
ee_lib_echo "Installing MySQL, please Wait..." |
|||
$EE_APT_GET install mysql-server mysqltuner percona-toolkit \ |
|||
|| ee_lib_error "Unable to install MySQL, exit status = " $? |
|||
|
|||
# Download tuning-primer.sh |
|||
wget --no-check-certificate -cqO /usr/local/bin/tuning-primer.sh https://launchpadlibrarian.net/78745738/tuning-primer.sh |
|||
chmod a+x /usr/local/bin/tuning-primer.sh |
|||
} |
@ -1,6 +1,6 @@ |
|||
# Install nginx package |
|||
|
|||
function ee_lib_install_nginx() |
|||
function ee_mod_install_nginx() |
|||
{ |
|||
ee_lib_echo "Installing $NGINX_PACKAGE, please wait..." |
|||
$EE_APT_GET install $NGINX_PACKAGE || ee_lib_error "Unable to install $NGINX_PACKAGE, exit status = " $? |
@ -1,6 +1,6 @@ |
|||
# Install php5-fpm package |
|||
|
|||
function ee_lib_install_php() |
|||
function ee_mod_install_php() |
|||
{ |
|||
ee_lib_echo "Installing php5, please wait..." |
|||
$EE_APT_GET install php5-common php5-mysqlnd php5-xmlrpc \ |
@ -1,6 +1,6 @@ |
|||
# Setup nginx repository |
|||
|
|||
function ee_lib_repo_nginx() |
|||
function ee_mod_repo_nginx() |
|||
{ |
|||
if [ "$EE_LINUX_DISTRO" == "Ubuntu" ]; then |
|||
|
@ -1,6 +1,6 @@ |
|||
# Setup php5-fpm repository |
|||
|
|||
function ee_lib_repo_php() |
|||
function ee_mod_repo_php() |
|||
{ |
|||
# Ubuntu |
|||
if [ "$EE_LINUX_DISTRO" == "Ubuntu" ]; then |
@ -1,9 +1,9 @@ |
|||
# Setup MySQL |
|||
|
|||
ee_lib_setup_mysql() |
|||
function ee_mod_setup_mysql() |
|||
{ |
|||
ee_lib_echo "Setting up MySQL, please wait..." |
|||
|
|||
# Decrease mysql wait timeout |
|||
# Setting wait_timeout = 30 & interactive_timeout = 60 |
|||
sed -i "/#max_connections/a wait_timeout = 30 \ninteractive_timeout = 60" /etc/mysql/my.cnf |
|||
} |
@ -1,8 +1,8 @@ |
|||
# Setup nginx |
|||
|
|||
function ee_lib_setup_nginx() |
|||
function ee_mod_setup_nginx() |
|||
{ |
|||
local ee_ee_whitelist_ip_address |
|||
local ee_whitelist_ip_address |
|||
|
|||
ee_lib_echo "Setting up nginx, please wait..." |
|||
|
@ -1,6 +1,6 @@ |
|||
# Setup php5-fpm |
|||
|
|||
function ee_lib_setup_php() |
|||
function ee_mod_setup_php() |
|||
{ |
|||
ee_lib_echo "Setting up php5, please wait..." |
|||
|
Loading…
Reference in new issue