./build set webserver nginx
./build set php1_mode php-fpm
./build update
./build all d
./build rewrite_confs
Monthly Archives: January 2017
postfix ssl
RSA key and certificate examples:
/etc/postfix/main.cf:
smtpd_tls_cert_file = /etc/postfix/server.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
tokudb
Better performance:
with up to 20x faster response times than InnoDB without tuning
Stronger ROI:
with lower operational and infrastructure costs and increased scalability and flexibility
Higher availability:
with less downtime for demanding applications in public, private and hybrid cloud environments
pppd: LCP: timeout sending Config-Requests
Jan 17 04:52:57 cloudlix pppd[18873]: Connect: ppp0 <--> /dev/pts/1
Jan 17 04:53:27 cloudlix pppd[18873]: LCP: timeout sending Config-Requests
Jan 17 04:53:27 cloudlix pppd[18873]: Connection terminated.
Jan 17 04:53:27 cloudlix pppd[18873]: Modem hangup
Jan 17 04:53:27 cloudlix pppd[18873]: Exit.
This error means you local ot network firewall blocks GRE packets, so if you are using Fedora just do this:
sudo firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p gre -j ACCEPT
sudo firewall-cmd --permanent --direct --add-rule ipv6 filter INPUT 0 -p gre -j ACCEPT (if you are using IPV6)
sudo firewall-cmd --reload
Centos 6 pptp server on OpenVZ
yum list installed | grep ppt
ppp.x86_64 2.4.5-10.el6 @base
pptpd.x86_64 1.4.0-3.el6 @epel
cat /etc/pptpd.conf
option /etc/ppp/options.pptpd
logwtmp
connections 156
localip your_vpn_server_IP_address
remoteip 192.168.0.101-200
cat /etc/ppp/options.pptpd
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
ms-dns 8.8.8.8
ms-dns 8.8.4.4
proxyarp
lock
nobsdcomp
novj
novjccomp
nologfd
cat /etc/ppp/chap-secrets
vpn_username * your_client_password *
/etc/init.d/pptpd start
iptables:
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -i ppp+ -j ACCEPT
-A INPUT -p tcp -m tcp --dport 1723 -j ACCEPT
-A INPUT -p gre -j ACCEPT
-A OUTPUT -p gre -j ACCEPT
-P PREROUTING ACCEPT
-P POSTROUTING ACCEPT
-P OUTPUT ACCEPT
-A POSTROUTING -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/conf/venet0/proxy_arp
vi /etc/ppp/ip-up.local
ifconfig ppp0 mtu 1468
MPPE should be enabled on client side.
Jan 16 07:27:17 cloudlix pptpd[2616]: CTRL: Starting call (launching pppd, opening GRE)
Jan 16 07:27:17 cloudlix pppd[2617]: Plugin /usr/lib64/pptpd/pptpd-logwtmp.so loaded.
Jan 16 07:27:17 cloudlix pppd[2617]: pppd 2.4.5 started by root, uid 0
Jan 16 07:27:17 cloudlix pppd[2617]: Using interface ppp0
Jan 16 07:27:17 cloudlix pppd[2617]: Connect: ppp0 <--> /dev/pts/1
Jan 16 07:27:17 cloudlix pppd[2617]: peer from calling number XX.80.253.XX authorized
Jan 16 07:27:17 cloudlix pppd[2617]: MPPE 128-bit stateless compression enabled
Jan 16 07:27:17 cloudlix pppd[2617]: Cannot determine ethernet address for proxy ARP
Jan 16 07:27:17 cloudlix pppd[2617]: local IP address 5.199.XX.XX
Jan 16 07:27:17 cloudlix pppd[2617]: remote IP address 192.168.0.101
Jan 16 07:28:15 cloudlix pppd[2617]: Modem hangup
Jan 16 07:28:15 cloudlix pppd[2617]: Connect time 1.0 minutes.
Jan 16 07:28:15 cloudlix pppd[2617]: Sent 2200951 bytes, received 163549 bytes.
Jan 16 07:28:15 cloudlix pppd[2617]: MPPE disabled
Jan 16 07:28:15 cloudlix pppd[2617]: Connection terminated.
Jan 16 07:28:15 cloudlix pppd[2617]: Exit.
Jan 16 07:28:15 cloudlix pptpd[2616]: CTRL: Client XX.80.253.XX control connection finished
cPanel license
cPanel license activate:
/usr/local/cpanel/cpkeyclt
Glances
Written in Python, Glances will run on almost any plaftorm : GNU/Linux, FreeBSD, OS X and Windows. I love python 🙂
centos7 install postgresql
yum install postgresql-server postgresql-contrib
postgresql-setup initdb
systemctl start postgresql
systemctl enable postgresql
ident authentication failed for user postgres
Just set trust:
host all all 127.0.0.1/32 trust
django.db.utils.ProgrammingError: permission denied to create extension “hstore”
psql template1 -c ‘create extension hstore;’
site-packages/setuptools/dist.py has no ‘check_specifier’ attribute
pip install setuptools –upgrade
cpanel delete all email accounts
Get user list:
\ls /home/cpanel_user/mail/domain.com/ > /tmp/list
for i in `cat /tmp/list`; do cpapi2 --user=cpanel_user Email delpop domain=domain.com email=$i; done
This feature requires the “popaccts” option and is not enabled on your account
You should use user, not root whem running cpapi2:
cpapi2 --user=account_name Email delpop domain=domain.com email=user
warn [Email::delpop] Encountered error in Email::delpop: cannot chdir to /root from /home
If you have such error using cpapi2, simply: cd ~/user && cpapi2 …
curl check status code
curl -I http://www.example.org