Reset root password on CentOS 7
Posted by blackonsole on April 8th, 2018 02:37 PM | No Comment
Edit boot menu on-the-go
0. reboot the CentOS 7 and press ESC when GRUB menu show up on the screen and press "e"
1. find "ro" on "linux16" section and then change to "rw init=/sysroot/bin/sh"
2. press "CTRL + x" to reboot CentOS ...
Block or ban ip with NGINX
Posted by blackonsole on December 22nd, 2016 11:47 AM | No Comment
How to block ip with NGINX
0. define block ip on nginx.conf
vim /etc/nginx/nginx.conf
http {
geo $ban_ip {
default 0;
include ban_ip.conf;
}
}
that will blocked ip by clientip on access.log, if want to block ...
scp :: transfer data remote to remote server
Posted by blackonsole on November 10th, 2014 03:19 PM | No Comment
:: How to transfer data from remote to remote server
+ file
scp -3 host1:/path/to/file host2:/path/to/file
+ directory
scp -r -3 host1:/path/to/folder host2:/path/to/folder
:: Ref
+ Google
+ man scp
cPanel : Change Main Domain DocumentRoot
Posted by blackonsole on September 5th, 2013 02:57 AM | No Comment
:: What's is cPanel
cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site.
:: How to Change Main Domain DocumentRoot in cPanel
+ Change documentroot
vi ...
Apache :: MP4 Streaming
Posted by blackonsole on March 2nd, 2013 01:14 AM | No Comment
:: How to Enable mp4 Streaming in Apache
+ Installing mod h624 streaming
wget //h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz
tar -xzf apache_mod_h264_streaming-2.2.7.tar.gz
cd mod_h264_streaming-2.2.7/
./configure --with-apxs=`which apxs2`
make && make install
+ Configure mod-h624-streaming in Apache
vi /etc/httpd/conf/httpd.conf
# add these line:
LoadModule h264_streaming_module modules/mod_h264_streaming.so
AddHandler h264-streaming.extensions .mp4
+ Restarting Apache
/etc/init.d/httpd restart
:: Links
+ Google
+ h264
Apache :: Flash / FLV Streaming
Posted by blackonsole on March 2nd, 2013 01:07 AM | No Comment
:: How to Configure Apache for FLV Streaming
+ Installing mod_flvx
wget //people.apache.org/~pquerna/modules/mod_flvx.c
which apxs
/usr/bin/apxs
/usr/bin/apxs -cia mod_flvx.c
+ setup mod_flvx in http.conf
vi /etc/apache/conf/httpd.conf
## add these line:
LoadModule flvx_module modules/mod_flvx.so
AddHandler flv-stream .flv
+ restrarting Apache
/etc/init.d/httpd restart
:: Links
+ Google
+ GeekTNT
Ubuntu :: PHP FastCGI + NGINX
Posted by blackonsole on February 28th, 2013 06:54 AM | 1 Comment
:: How to setup PHP FastCGI for NGINX in Ubuntu
+ Installing NGINX and php-cgi
apt-get update
apt-get install nginx php5-cli php5-cgi spawn-fcgi
+ Make php-fcgi script in init.d
vi /etc/init.d/php-fcgi
add these line:
#!/bin/bash
BIND=127.0.0.1:9000
USER=www-data
PHP_FCGI_CHILDREN=15
PHP_FCGI_MAX_REQUESTS=1000
PHP_CGI=/usr/bin/php-cgi
PHP_CGI_NAME=`basename $PHP_CGI`
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
RETVAL=0
start() {
...