WordPress :: Using OS cron job
Posted by blackonsole on July 20th, 2012 04:29 AM | No Comment
:: How to change wp cron to os cron job
+ add cron job on os cron
crontab -e
# add a line like this:
wget -q -O /dev/null //yourhostname.tld/wp-cron.php?doing_wp_cron >/dev/null 2>&1
+ disable wp-cron
vi wp-config.php
# add this line:
define('DISABLE_WP_CRON', true);
:: Links
+ Google
+ WPDaylyBits
CentOS:: Install and configure LAMP
Posted by blackonsole on July 16th, 2012 03:09 AM | No Comment
:: How to install LAMP on CentOS
yum install httpd httpd-devel mysql mysql-server mysql-devel php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
:: How to configure MySQL
mysql_secure_installation
:: Add httpd and mysqld on init.d
chkconfig httpd on
chkconfig mysqld on
:: Starting httpd and mysqld
/etc/init.d/httpd start
/etc/init.d/mysqld ...
:: MySQL : enable InnoDB from source
Posted by blackonsole on June 2nd, 2012 04:29 AM | No Comment
:: How to enable InnoDB on MySQL from source
cd mysql
./configure --prefix=/usr/local/mysql --with-plugins=innobase,innodb_plugin
make && make install
:: Configure MySQL InnoDB on my.cnf
vi /etc/my.cnf
add / configure like these:
default-storage-engine = InnoDB
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /usr/local/mysql/var
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir ...
:: PHP : Installing APC from source
Posted by blackonsole on June 2nd, 2012 04:16 AM | No Comment
:: How to install APC from source
wget //pecl.php.net/get/APC
tar xzf APC
cd APC
phpize
./configure --enable-apc --enable-apc-mmap
make && make install
:: Setup APC on php.ini
vi php.ini
; add APC extension on php.ini, some like these:
extension=apc.so
apc.enabled=1
apc.shm_segments=1
apc.shm_size=128M
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
:: Checking and apply
php -m | grep apc
/etc/init.d/httpd restart
:: Link
+ Google
+ WebHostingNeeds
:: Linux : socks proxy via ssh
Posted by blackonsole on May 29th, 2012 02:30 AM | 1 Comment
:: How to connection socks proxy via ssh
+ setup proxy connection
ssh -D 8080 [email protected]
8080 = local proxy port
username = your ssh username
192.168.0.1 = your ip address server
+ enable socks proxy connection in firefox
Edit - Preferences - Advanced - Network - ...
:: CentOS: Apache2 worker MPM, FCGI, APC
Posted by blackonsole on May 28th, 2012 03:58 PM | No Comment
:: Installing Apache2, FCGI, APC
yum install httpd php-cgi mod_fcgid php-pecl-apc
:: Enable worker MPM on Apache2
vi /etc/sysconfig/httpd
# uncomment
HTTPD=/usr/sbin/httpd.worker
:: Disable mod_php on Apache2
cd /etc/httpd/conf.d/
mv php.conf php.conf.orig
:: Setup FCGI for php script
+ enable cgi.fix_pathinfo on php.ini
vi /etc/php.ini
# uncomment
cgi.fix_pathinfo = 1
+ add php script ...
:: Apache: Change Prefork MPM to Worker MPM
Posted by blackonsole on May 27th, 2012 01:03 AM | No Comment
:: Determine which MPM running in apache
apachectl -l
if you see worker.c, your apache running worker mpm, if you see prefork.c, apache running prefork.
:: Determine has apache worked mpm compiled
httpd.worker -l
make sure you see worker.c on there.
:: How to change apache ...