This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # a2enmod proxy | |
| # a2enmod proxy_http | |
| # a2enmod proxy_ajp | |
| # a2enmod rewrite | |
| # a2enmod deflate | |
| # a2enmod headers | |
| # a2enmod proxy_balancer | |
| # a2enmod proxy_connect | |
| # a2enmod proxy_html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80 deferred; | |
| server_name server.com; | |
| index index.php; | |
| charset utf-8; | |
| # App 1 (main app) | |
| location / { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mysql -u homestead -psecret -e "select @@sql_mode" | |
| +-------------------------------------------------------------------------------------------------------------------------------------------+ | |
| | @@sql_mode | | |
| +-------------------------------------------------------------------------------------------------------------------------------------------+ | |
| | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | | |
| +-------------------------------------------------------------------------------------------------------------------------------------------+ | |
| [mysqld] | |
| # ... other stuff will probably be here | |
| sql_mode = "STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # add line below: | |
| net.ipv6.conf.all.disable_ipv6 = 1 | |
| net.ipv6.conf.default.disable_ipv6 = 1 | |
| net.ipv6.conf.lo.disable_ipv6 = 1 | |
| # restart: sudo sysctl -p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // set variable windows to non-space folder | |
| setx VAGRANT_HOME "drive:\path" /M | |
| // install plugin | |
| vagrant plugin install vagrant-winnfsd | |
| vagrant plugin install vagrant-vbguest | |
| //edit vagrant config | |
| config.winnfsd.logging = "on" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mysql --max_allowed_packet=100M -u root -p database < dump.sql | |
| Also, change the my.cnf or my.ini file under the mysqld section and set: | |
| max_allowed_packet=100M | |
| or command MySQL: | |
| set global net_buffer_length=1000000; | |
| set global max_allowed_packet=1000000000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [program:sleekr-staging] | |
| process_name=%(program_name)s_%(process_num)02d | |
| command=php artisan queue:work --queue=staging1 --daemon --sleep=3 --tries=3 | |
| directory=/home/htdocs/deploy/staging/backend/current | |
| stdout_logfile=/home/htdocs/deploy/staging/logs/supervisord.log | |
| user=sleekr | |
| redirect_stderr=true | |
| autostart=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To change the jenkins user, open the /etc/sysconfig/jenkins (in debian this file is created in /etc/default) and change the JENKINS_USER to whatever you want. Make sure that user exists in the system (you can check the user in the /etc/passwd file ). | |
| $JENKINS_USER="manula" | |
| Then change the ownership of the Jenkins home, Jenkins webroot and logs. | |
| chown -R manula:manula /var/lib/jenkins | |
| chown -R manula:manula /var/cache/jenkins | |
| chown -R manula:manula /var/log/jenkins | |
| Then restarted the Jenkins jenkins and check the user has changed using a ps command | |
| /etc/init.d/jenkins restart | |
| ps -ef | grep jenkins |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Notes: | |
| execute the function twice to see if the variable values are changed or not. | |
| I did not bother with creating additional foreach queries for before and after. | |
| If you exceed either the minimum or maximum values the Min|Max value will be used instead of your value. | |
| integer is in bytes: 1024 = 1KB | 1073741824 = 1GB | |
| max_allowed_packet | |
| Permitted Values Type integer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # try to find if this is an inodes problem | |
| df -ih | |
| # find list directories of inode | |
| du --inodes -d 3 /home/htdocs | sort -n | tail | |
| # try to find root folders with large inodes count | |
| for i in /*; do echo $i; find $i |wc -l; done | |
| # try to find specific folders: |