When you are trying to add new addon domain, fix:
WHM -> Home -> Server Configuration -> Tweak Settings
Updating Allow domain parking across accounts from Off to On.
When you are trying to add new addon domain, fix:
WHM -> Home -> Server Configuration -> Tweak Settings
Updating Allow domain parking across accounts from Off to On.
mkdir -p ~/.vim/autoload ~/.vim/bundle && curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
vi ~/.vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
vi iptables_save
*filter
-A INPUT -s
-A INPUT -s
-A INPUT -s
-A INPUT -s
COMMIT
ps aux | grep -i “defunc” | awk {‘print “kill -9 “$2?} | sh
It looks like nice job:
#!/bin/bash
# compact.sh by Devon of ByteOnSite for OpenVZ
# SETTINGS
# Config Directory
CFG="/tmp"
# VZ Partition
VZ=`cat $CFG/compact.vzdir 2>/dev/null`
# Run Compact Automatically Every X Runs. Default: 96 runs, if run every 15 minutes this is every 24 hours.
ONXRUNS=`cat $CFG/compact.onxruns 2>/dev/null`
# Minimum Free Space in MB. Will attempt to compact if free space drops below this. Default: automatically generated, 5% free space.
MINFREE=`cat $CFG/compact.minfree 2>/dev/null`
# Email Address
EMAIL=`cat $CFG/compact.email 2>/dev/null`
# Log enabled
LOG=`cat $CFG/compact.logging 2>/dev/null`
# END SETTINGS
# DEFAULT SETTINGS
# Default VZ Partition
if [ ! $VZ ]; then
VZ="/vz"
echo $VZ > $CFG/compact.vzdir
fi
# Default ONXRUNS
if [ ! $ONXRUNS ]; then
ONXRUNS=96
echo $ONXRUNS > $CFG/compact.onxruns
fi
# Default MINFREE (5% of Total Partition)
if [ ! $MINFREE ]; then
MINFREE=$[`df -PBM $VZ | awk 'NR==2 {print $2}' | cut -f1 -dM`/20]
echo $MINFREE > $CFG/compact.minfree
fi
if [ ! $LOG ]; then
LOG=1
echo $LOG > $CFG/compact.logging
fi
# END DEFAULT SETTINGS
# LOGIC
FREESPACE=`df -PBM $VZ | awk 'NR==2 {print $4}' | cut -f1 -dM`
# DEBUG
if [ "$1" = "debug" ]; then
echo "CFG: $CFG"
echo "VZ: $VZ"
echo "FREESPACE: ${FREESPACE}MB"
echo "MINFREE: ${MINFREE}MB"
echo "ONXRUNS: $ONXRUNS"
echo "LOG: $LOG"
echo "EMAIL: $EMAIL"
if [ ! -f "/bin/mail" ]; then
echo "MAILX: NOT FOUND. EMAILS WON'T BE SENT ON WARNING"
fi
exit 0
fi
# END DEBUG
i=`cat $CFG/compact.count`
if [ ! "$i" ] || [ "$i" -eq $ONXRUNS ]; then
i=1
fi
if [ $i -eq 1 ] || [ $FREESPACE -lt $MINFREE ]; then
# Run compact for every VPS
stdout="/dev/null"
if [ $LOG -eq 1 ]; then
stdout="$CFG/compact.log"
fi
for veid in `vzlist -H -o veid`
do
date=`date`
echo "Starting compact on VEID $veid at $date.." >$stdout 2>&1
vzctl compact $veid >$stdout 2>&1
done
# Check disk space again
FREESPACE=`df -PBM $VZ | awk 'NR==2 {print $4}' | cut -f1 -dM`
if [ $FREESPACE -lt $MINFREE ]; then
message="Unable to compact containers enough to reduce free space below MINFREE levels. Free Space: $FREESPACE MB."
echo $message | wall
hostname=`hostname`
if [ $EMAIL ]; then
echo $message | mail -s "Compact failure on $hostname" $EMAIL
fi
fi
fi
# Increase count
i=$[$i+1]
echo $i > $CFG/compact.count
# END LOGIC
exit 0
199.27.128.0/21
173.245.48.0/20
103.21.244.0/22
103.22.200.0/22
103.31.4.0/22
141.101.64.0/18
108.162.192.0/18
190.93.240.0/20
188.114.96.0/20
197.234.240.0/22
198.41.128.0/17
162.158.0.0/15
104.16.0.0/12
# install dependencies
yum -y install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran subversion patch zlib-devel
# get encoding software
cd /usr/local/src
wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-7.0.0.2.tar.bz2
wget http://downloads.sourceforge.net/gpac/gpac-0.4.5.tar.gz
tar xf gpac-0.4.5.tar.gz
tar jxvf amrnb-7.0.0.2.tar.bz2
tar jxvf essential-20071007.tar.bz2
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
# install encoding software
mkdir /usr/local/lib/codecs/
mv /usr/local/src/essential-20071007/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
mkdir /usr/local/src/tmp
chmod 777 /usr/local/src/tmp
export TMPDIR=/usr/local/src/tmp
cd /usr/local/src/amrnb-7.0.0.2
./configure
make && make install
cd /usr/local/src/mplayer
svn update
./configure
make && make install
cd /usr/local/src/ffmpeg/
./configure –enable-libamr-nb –disable-mmx –enable-nonfree
make && make install
cd ./gpac
./configure
make && make install
# update library links
echo /usr/local/lib > /etc/ld.so.conf.d/ffmpeg.conf
ldconfig
mkdir AAC
cd AAC/
wget http://ftp6.nero.com/tools/NeroAACCodec-1.5.1.zip
unzip -j NeroAACCodec-1.5.1.zip
install -m 0755 neroAacEnc /usr/bin/
yum install gpac
install -m 0755 neroAacDec /usr/bin/
install -m 0755 neroAacTag /usr/bin/
set backspace=indent,eol,start
for Ubuntu vi fix:
vi /root/.vimrc
set nocp
set bs=2
hg clone https://vim.googlecode.com/hg/ vim
cd vim
./lua.sh
vi lua.sh:
#!/bin/bash
# on centos minimal
yum install -y gcc
yum install -y make
yum install -y ncurses-devel
yum install -y lua lua-devel
yum install -y ruby ruby-devel
yum install -y python python-devel
yum install -y perl perl-devel
# vim7.3
./configure --disable-selinux \
--enable-luainterp \
--enable-perlinterp \
--enable-pythoninterp \
--enable-python3interp \
--enable-tclinterp \
--enable-rubyinterp \
--enable-multibyte \
--disable-gui \
--with-features=huge \
[email protected]
make
make install
vi /etc/ssh/sshd_config
#Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp
Match User someuser
ChrootDirectory /var/www/someuser
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no
chown root:root /var/www/someuser
chmod 755 /var/www/someuser
usermod -s “/usr/libexec/openssh/sftp-server” someuser
Your openssh is probably too old. ssh -v will report the version you are currently using, it’s probably older than 4.4p1.
vzquota show 100
vzquota : (warning) Quota is running, so data reported from quota file may not reflect current values
resource usage softlimit hardlimit grace
1k-blocks 0 4194304 4194304
inodes 25 200000 220000
vzctl stop 100
vzquota init 100 -p /vz/private/100 -b 4194304 -B 4194304 -i 200000 -I 220000 -e 0 -n 0
vi /etc/ssh/sshd_config
UseDNS no
vi /etc/resolv.conf
options single-request-reopen
pkill -9 -t pts/0