Author Archive
Install MongoDB + PHP
#vi /etc/yum.repos.d/mongodb-org-3.4.repo
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
#yum install -y mongodb-org
#yum install php-fpm php-gd php-json php-mbstring php-mysqlnd php-xml php-xmlrpc php-opcache \
php-imagick php-posix php-devel php-pecl-mongo php-pecl-mongodb –enablerepo=remi
#find / -name php.ini -type f -exec sh -c “echo extension=mongo.so >> {}” \;
Встановлення MySQL 5.5 на RHEL / CentOS 6 или 5
Для CentOS / RHEL 5 32-64 бит
#rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
Для CentOS / RHEL 6 32-64 бит
#rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
#rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Для CentOS / RHEL 7 32-64 бит
#wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
#rpm -Uvh remi-release-7.rpm
#yum update
#yum –enablerepo=remi install mysql mysql-server
Upgrade php5-5.4 to php56
#portmaster -o lang/php56 php5-5.4.35
#portmaster -y -D -o devel/oniguruma5 oniguruma4
#pkg info | grep php | grep 5.4 | awk ‘{print $1}’ |awk -F ‘-5.4’ ‘{print “whereis “$1}’ |sh |awk -F ‘: /usr/ports/’ ‘{print “portmaster -y -D -o “$2” “$1}’ | sed -e “s@/php5-@/php56-@” -e ‘s@$@-5.4.35@’ | sh
(more…)
How to Disable Ads in uTorrent
To turn off ads and offers, open Options > Preferences > Advanced
- offers.left_rail_offer_enabled/left_rail_offer
- gui.show_plus_upsell
- offers.sponsored_torrent_offer_enabled/sponsored_torrent_offer_enabled
- bt.enable_pulse
- gui.show_notorrents_node
- offers.content_offer_autoexec
Sendmail on lo0
#vim freebsd.submit.mc
FEATURE(`msp’, `[127.0.0.4]’)dnl
#vim freebsd.mc
DAEMON_OPTIONS(`Name=MTA, Addr=127.0.0.4, Port=smtp, Modifiers=bh’)
#vim otrs.united.net.ua.mc
MASQUERADE_AS(`domain’)
MASQUERADE_DOMAIN(domain)
FEATURE(masquerade_envelope)
FEATURE(masquerade_entire_domain)
define(`SMART_HOST’, `smtp.domain’)dnl
DAEMON_OPTIONS(`Name=MTA, Addr=127.0.0.4, Port=smtp, Modifiers=bh’)
Finding spam sending PHP scripts on your server
#php.ini
mail.add_x_header = On
mail.log = /var/log/phpmail.log
#find / -name php.ini | xargs perl -pi -e ‘s/\;mail\.log =/mail\.log = \/var\/log\/phpmail.log/i’
Request Tracker RT BlackList
Request Tracker >4.2 RT 4.2 BlackList.
Add RT_SiteConfig.pm
Set($SquelchList, ‘root@example.edu,www-data@example.edu,nobody@example.edu’);
Edit perl5/site_perl/RT/Action/SendEmail.pm
Find # Cycle through the people we’re sending.
And add befor
+ # BEGIN SNL Modification: global squelch list
(more…)
Varnish
Varnish 4.0:
If you are on RHEL 6 or a compatible distribution, use:
rpm –nosignature -i https://repo.varnish-cache.org/redhat/varnish-4.0.el6.rpm
yum install varnish
For RHEL 7 and compatible distributions, use:
rpm –nosignature -i https://repo.varnish-cache.org/redhat/varnish-4.0.el7.rpm
yum install varnish
Find
Шукаємо старі директорії і архівуємо.
find ./ -name . -prune -o -type d -mtime +90 -exec tar czvpf {}.tgz ./{} \; -exec rm -rf {} \;