วันพฤหัสบดีที่ 14 กุมภาพันธ์ พ.ศ. 2556

Handy howto for ubuntu

Most common task for admin was document here server-world.info. I found this accidentally. It include installation of OS, as well as common package such as ssh, dns, dhcp, virtualization, database and proxy. This is a good place to start.

http://server-world.info/en/note?os=Ubuntu_10.04

วันพุธที่ 13 กุมภาพันธ์ พ.ศ. 2556

วันพฤหัสบดีที่ 17 มกราคม พ.ศ. 2556

Tunning nginx worker process



From stackoverflow here : http://stackoverflow.com/questions/7325211/tuning-nginx-worker-process-to-obtain-100k-hits-per-min
worker_processes  4;  # 2*number of cpus
events {
    worker_connections  19000;  #it's the key to high performance - have a lot of coinnections available
}
worker_rlimit_nofile    20000;  #each connection needs a filehandle (or 2 if you are proxying)
keepalive_timeout  5;  #that' another key - close live connections as early as possible or disable them completely
#total amount of users you can serve in 1 second = worker_processes*worker_connections/keepalive_timeout

More info about nginx directive: http://blog.martinfjordvald.com/2011/04/optimizing-nginx-for-high-traffic-loads/

วันศุกร์ที่ 14 กันยายน พ.ศ. 2555

Java JRE for ubuntu, Debian, Mint

Since the java are under the oracle control, some license policy changed. Linux distro are also move away from original java(sun/oracle) to openjdk. I found this link that help you install java whether openjdk or oracle java.

https://sites.google.com/site/easylinuxtipsproject/java

วันอังคารที่ 11 กันยายน พ.ศ. 2555

[link] Nginx "how to" - Fast and Secure Web Server

I found useful link describe nginx configuration. For newbie, this could be a starting guide for nginx. There are examples config for various common nginx usage  : static files, ssl, reverse proxy. And some explanation of directives are also provided.

Let's have a look ! https://calomel.org/nginx.html

วันอังคารที่ 24 กรกฎาคม พ.ศ. 2555

ssh with out password

Are you boring with entering password every times logging in to linux via ssh? The followings are time saving and secure without storing user password in clear text.

HOST_SRC = Your system.
HOST_DEST = The system you want to login.

1. On HOST_SRC
-generating key (/.ssh/id_rsa.pub) when you are prompted to enter pass pharse just press enter.
$ssh-keygen -t rsa


-transfer id_rsa.pub to HOST_DEST use scp.
$scp ~/.ssh/id_rsa.pub username@ip:/home/username/
(this will be the last time you enter password :) ) 


2. On HOST_DEST 

$ cat id_rsa.pub >>~/.ssh/authorized_keys
$ chmod 700 ~/.ssh/authorized_keys






refer: https://blogs.oracle.com/jkini/entry/how_to_scp_scp_and

วันอังคารที่ 22 พฤษภาคม พ.ศ. 2555

Install nginx with php

Hey, Nginx gain popularity because it lightweight and scalability. Here I will provide a short how to set up nginx running php with php5-fpm(fastcgi process manager) in ubuntu 12.04

#apt-get install nginx php-fpm

Config file for php is at /etc/php5/fpm/pool.d/
This you can control how php process run, tcp or unix socket


The config file for nginx to run php is you need the following configuration to location block :

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi_params;
        }



For configuration optimizing please see this link :
http://www.if-not-true-then-false.com/2011/nginx-and-php-fpm-configuration-and-optimizing-tips-and-tricks/