@@ -18,9 +18,9 @@ mysql -u root -ppassword -e "GRANT ALL PRIVILEGES ON * . * TO 'vagrant'@'localho
1818mysql -u root -ppassword -e " GRANT ALL PRIVILEGES ON * . * TO 'vagrant'@'%';"
1919mysql -u root -ppassword -e " FLUSH PRIVILEGES;"
2020
21- # Mysqld conf
22- if ! grep -qF " innodb_buffer_pool_size" /etc/mysql/percona-server .conf.d/mysqld.cnf; then
23- cat << EOF >> /etc/mysql/percona-server .conf.d/mysqld.cnf
21+ # Mysql conf
22+ if ! grep -qF " innodb_buffer_pool_size" /etc/mysql/mysql .conf.d/mysqld.cnf; then
23+ cat << EOF >> /etc/mysql/mysql .conf.d/mysqld.cnf
2424# Innodb
2525innodb_buffer_pool_size = 1G
2626innodb_log_file_size = 256M
@@ -75,64 +75,6 @@ MAIL_END
7575# -----------------------------------------------------------------------------------------------------
7676
7777
78- # Redis conf
79- cat << 'EOF ' > /etc/systemd/system/rc-local.service
80- [Unit]
81- Description=/etc/rc.local Compatibility
82- ConditionPathExists=/etc/rc.local
83-
84- [Service]
85- Type=forking
86- ExecStart=/etc/rc.local start
87- TimeoutSec=0
88- StandardOutput=tty
89- RemainAfterExit=yes
90- SysVStartPriority=99
91-
92- [Install]
93- WantedBy=multi-user.target
94- EOF
95-
96- cat << 'EOF ' > /etc/rc.local
97- #!/bin/sh -e
98- #
99- # rc.local
100- #
101- # This script is executed at the end of each multiuser runlevel.
102- # Make sure that the script will "exit 0" on success or any other
103- # value on error.
104- #
105- # In order to enable or disable this script just change the execution
106- # bits.
107- #
108- # By default this script does nothing.
109-
110- exit 0
111- EOF
112-
113- chmod +x /etc/rc.local
114- systemctl enable rc-local
115-
116- echo never > /sys/kernel/mm/transparent_hugepage/enabled
117- sysctl -w net.core.somaxconn=65535
118- sysctl vm.overcommit_memory=1
119-
120- head -n -1 /etc/rc.local > /etc/rc.temp.local ; mv /etc/rc.temp.local /etc/rc.local
121- cat << 'EOF ' >> /etc/rc.local
122- echo never > /sys/kernel/mm/transparent_hugepage/enabled
123- sysctl -w net.core.somaxconn=65535
124-
125- exit 0
126- EOF
127-
128- cat << 'EOF ' >> /etc/sysctl.conf
129- vm.overcommit_memory=1
130- EOF
131-
132-
133- # -----------------------------------------------------------------------------------------------------
134-
135-
13678# Fpm php configuration
13779sed -i ' s/memory_limit = .*/memory_limit = 4G/' /etc/php/" $PROJECT_PHP_VERSION " /fpm/php.ini
13880sed -i " s|;date.timezone =|date.timezone = ${PROJECT_TIME_ZONE} |" /etc/php/" $PROJECT_PHP_VERSION " /fpm/php.ini
0 commit comments