cd /usr/local/directadmin/data/users/username
perl -pi -e 's/usertype=reseller/usertype=admin/' user.conf
cd /usr/local/directadmin/data/admin
perl -pi -e 's/^username\n//' reseller.list
echo username >> admin.list
Monthly Archives: January 2015
The system experienced a problem during the creation of the “testadress” subdomain.
cat /usr/local/cpanel/logs/error_log | grep sub
You can get this error, when: You have exceeded the maximum allowed subdomains.
replace MySQL with MariaDB on cPanel
cp -Rf /var/lib/mysql /var/lib/mysql-old
mv /etc/my.cnf /etc/my.cnf-old
/scripts/update_local_rpm_versions –edit target_settings.MySQL50 uninstalled
/scripts/update_local_rpm_versions –edit target_settings.MySQL51 uninstalled
/scripts/update_local_rpm_versions –edit target_settings.MySQL55 uninstalled
/scripts/check_cpanel_rpms –fix –targets=MySQL50,MySQL51,MySQL55
vi /etc/yum.repos.d/mdb.repo
# MariaDB 10.0 CentOS repository list – created 2015-01-16 13:06 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
yum install MariaDB-Galera-server MariaDB-client galera
/etc/init.d/mysql start
mysql_upgrade
/etc/init.d/mysql restart
/scripts/easyapache –build
cpanel make ip shared
Add 192.168.0.1 IP as shared.
vi /etc/reservedips
192.168.0.1
mkdir /var/cpanel/mainips
vi /var/cpanel/mainips/root
192.168.0.1
warning: user mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
Fix.
yum install mock
useradd -s /sbin/nologin mockbuild
mysql select database size
SELECT table_schema AS “DB_NAME”, SUM(data_length + index_length) / 1024 / 1024 AS “Size (MB)” FROM information_schema.TABLES GROUP BY table_schema;
exim set different outgoing IP address
vi /etc/exim.conf
remote_smtp:
driver = smtp
interface = XX.XX.XX.XX
exim remove received from headers
vi /etc/exim.conf
remote_smtp:
driver = smtp
headers_remove = Received
ftp create read only user
For this you should use proftpd server:
vi /etc/proftpd.conf
DenyAll
AllowAll
docker deattach keep running
Inside container: ctrl+p ctrl+q
vim Python-mode
Python-mode is a vim plugin that helps you to create python code very quickly by utilizing libraries including pylint, rope, pydoc, pyflakes, pep8, and mccabe for features like static analysis, refactoring, folding, completion, documentation, and more.
vim ~/.vimrc
” Pathogen load
filetype off
call pathogen#infect()
call pathogen#helptags()
filetype plugin indent on
syntax on
cd ~/.vim
mkdir -p bundle && cd bundle
git clone git://github.com/klen/python-mode.git
docker delete all images
sudo docker rmi $(docker images -q)
docker remove all containers
sudo docker rm $(docker ps -a -q)
check filesystem block size
tune2fs -l /dev/sda1 | grep -i 'block size'
check dd progress
pgrep dd
kill -USR1 process_ID
watch -n 600 kill -USR1 process_ID