Skip to content

Instantly share code, notes, and snippets.

View centminmod's full-sized avatar

George Liu (eva2000) centminmod

View GitHub Profile
@centminmod
centminmod / changelog.txt
Created February 19, 2014 13:17
preview of Centmin Mod v1.2.3-eva2000.07 change log
v1.2.3-eva2000.07 change log
- Moved all downloads links themselves out of the download functions at inc/downloads.inc to their own file at inc/downloadlinks.inc for easier management
- Changed PHP's default config scan directory variable path (CONFIGSCANDIR) from /root/centminmod/php.d to /etc/centmimod/php.d. centmin.sh will auto detect this and create the necessary directory and copy over any existing PHP extension .ini files from the old path. This is preparation for when chrooted user SSH/SFTP/SCP user account support comes https://blog.centminmod.com/194 to allow chrooted users PHP binary access to PHP extensions.
- Updated PHP upgrade routine to auto reinstall previously installed PHP extensions such as APC Cache, Xcache, Memcache/Memcached, igbinary and ImagicK. No longer will users need to manually reinstall these PHP extensions after each PHP upgrade. The script will detect what .ini files are in /root/centminmod/php.d (.07 release will be /etc/centminmod/php.d) when PHP upgrade is ran. Then at en
@centminmod
centminmod / mysqltuner.pl
Created March 2, 2014 02:04
mysqltuner.pl 1.3.0 mod by George Liu (eva2000) vbtechsupportcom
#!/usr/bin/perl -w
# mysqltuner.pl - Version 1.3.0
# High Performance MySQL Tuning Script
# Copyright (C) 2006-2011 Major Hayden - major@mhtx.net
#
# For the latest updates, please visit http://mysqltuner.com/
# Git repository available at http://github.com/major/MySQLTuner-perl
# Aria engine patch https://github.com/major/MySQLTuner-perl/pull/41
#
# This program is free software: you can redistribute it and/or modify
@centminmod
centminmod / gist:9300938
Created March 2, 2014 02:25
mysqltuner 1.3.0 modded by George Liu (eva2000) vbtechsupport.com sample output on MariaDB 10.0.8 on centminmod.com web stack
>> MySQLTuner 1.3.0 mod - Major Hayden <major@mhtx.net>
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Modified by George Liu (eva2000) at http://vbtechsupport.com/
>> Run with '--help' for additional options and output filtering
[!!] Currently running unsupported MySQL version 10.0.8-MariaDB
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -ARCHIVE +Aria +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MyISAM
[--] Data in MyISAM tables: 1G (Tables: 11)
@centminmod
centminmod / login.defs
Last active August 29, 2015 13:57
/etc/login.defs centos 6.5 default https://www.digitalocean.com/community/articles/how-to-set-password-policy-on-a-centos-6-vps changed from defaults so that password change is required every 180 days (password expiry) with a warning 30 days before password expiry and minimum of 1 days lapse before you can change your password again. Minimum pas…
#
# Please note that the parameters in this configuration file control the
# behavior of the tools from the shadow-utils component. None of these
# tools uses the PAM mechanism, and the utilities that use PAM (such as the
# passwd command) should therefore be configured elsewhere. Refer to
# /etc/pam.d/system-auth for more information.
#
# *REQUIRED*
# Directory where mailboxes reside, _or_ name of file, relative to the
@centminmod
centminmod / system-auth
Last active August 29, 2015 13:57
/etc/pam.d/system-auth default centos 6.5 https://www.digitalocean.com/community/articles/how-to-set-password-policy-on-a-centos-6-vps changed from default minimum of 2 upper case + 2 lower case + 2 numbers + 2 symbols for passwords and deny reusing the last 5 passwords
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 500 quiet
auth required pam_deny.so
account required pam_unix.so
account sufficient pam_localuser.so
@centminmod
centminmod / password-auth
Last active August 29, 2015 13:57
/etc/pam.d/password-auth default centos 6.5 https://www.digitalocean.com/community/articles/how-to-set-password-policy-on-a-centos-6-vps changed from default to only allow 3 login failures before account is locked
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth required pam_tally2.so deny=3
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 500 quiet
auth required pam_deny.so
account required pam_unix.so
yum -y install figlet
font='banner big block bubble digital ivrit lean mini mnemonic script shadow slant small smscript smshadow smslant standard term'
for f in $font; do figlet -ctkf $f Centmin Mod; done
##### # #
# # ###### # # ##### # # # # # ## ## #### #####
# # ## # # ## ## # ## # # # # # # # # #
@centminmod
centminmod / gist:9522131
Last active August 29, 2015 13:57
vBulletin 5.05 and 5.10 RC1 - Centmin mod Nginx revised vhost configuration as at March 13th, 2014
# legacy css being handled separate for performance
location ^~ /vb5/css.php {
include /usr/local/nginx/conf/phpvb5.conf;
rewrite ^ /vb5/core/css.php break;
}
# make install available from root
location ^~ /vb5/install/ {
rewrite ^ /vb5/core/install/ break;
}
@centminmod
centminmod / gist:9542083
Last active August 29, 2015 13:57
Practical example usage for Centmin Mod v1.2.3-eva2000.07's addons/passenger.sh installer which installs Ruby, RubyGems, Node.js and Python Passenger. Use gem package request-log-analyzer for producing html web analytics reports for your Nginx access logs. Steps are below
1. From Centmin Mod v1.2.3-eva2000.07 addons/passenger.sh folder run and install ruby, rubygem, node.js and python passenger.
cd addons
chmod +x passenger.sh
./passenger.sh install
Once install is completed, log out of your SSH session and log back in
2. Now install request-log-analyzer via gem. Documentation at https://github.com/wvanbergen/request-log-analyzer and http://www.request-log-analyzer.com/
@centminmod
centminmod / gcc473.sh
Created March 23, 2014 11:57
gcc 4.7.3 compile for centminmod.com builds
#/bin/bash
#######################################################
# gcc 4.7.3 install for Centminmod.com
#######################################################
GCC_VERSION='4.7.3'
GCC_CONF='n'
GMP_VER='5.1.3'
MPC_VER='1.0.1'
MPFR_VER='3.1.2'