View RSS Feed

Linux

  1. nginx + php-fpm + debian squeeze tutorial - the fastest way to host php!

    โดย เมื่อ 06-16-2011 เวลา 16:43:09
    Here is a quick howto for setting up nginx and php-fpm on a Debian 6 VPS. We will be using the dotdeb repository for this so a big thanks goes to the dotdeb guys for building such reliable Debian packages.

    This has been tested on a Debian 6 OpenVZ minimal template:
    First add the dotdeb repo to your sources.list file:
    Code:
    nano /etc/apt/sources.list
    add this to the bottom of the file:
    Code:
    deb http://packages.dotdeb.org stable all
    Next, add the GnuPG key to your distribution:
    Code:
    wget http://www.dotdeb.org/dotdeb.gpg
    cat dotdeb.gpg | sudo apt-key add -
    rm dotdeb.gpg
    Update APT:
    Code:
    apt-get update
    Install php and php-fpm plus some common addons:
    Code:
    apt-get install php5 php5-fpm php-pear php5-common php5-mcrypt php5-mysql php5-cli php5-gd
    Install nginx:
    Code:
    apt-get install nginx
    Tweak the php-fpm configuration:
    Code:
    nano
    ...
    ป้ายกำกับ: debian, Nginx, php-fpm เพิ่ม / แก้ไข ป้ายกำกับ
    หัวข้อ
    How To , Linux , Software
  2. Debian: No Public key available

    โดย เมื่อ 06-03-2011 เวลา 07:58:07
    วันนี้ได้ลง debian 5.0 บน vps พอสั่ง update เจอเลย
    ...
    Reading package lists... Done
    W: There is no public key available for the following key IDs:
    9AA38DCD55BE302B
    W: GPG error: http://xxx.xx.xxx.org lenny Release:
    The following signatures couldn't be verified because the public key
    is not available:
    NO_PUBKEY 9AA38DCD55BE302B
    W: You may want to run apt-get update to correct these problems
    อ๊ากกกกกกกกก อะไรนี่ ไปคนๆกับพี่กู ได้มาว่า
    aptitude install debian-archive-keyring
    เลยจัดไปผลออกมาอับเดทผ่านครับ
    ป้ายกำกับ: debian, No Public key available เพิ่ม / แก้ไข ป้ายกำกับ
    หัวข้อ
    How To , Linux , Software
  3. Install DirectAdmin + APC

    โดย เมื่อ 05-17-2011 เวลา 07:44:51
    1.Install autoconf:
    Code:
    apt-get install autoconf
    2.Install APC using PECL:
    Code:
    pecl install apc
    3.After install process we have messages like this:
    Code:
    Build process completed successfully
    Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so'
    install ok: channel://pecl.php.net/APC-3.0.19
    configuration option "php_ini" is not set to php.ini location
    You should add "extension=apc.so" to php.ini
    4.Edit php.ini (via DA or directly: /usr/local/lib/php.ini)
    -modify extension_dir directive:
    Code:
    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"
    -Enable extension apc.so:
    Code:
    extension=apc.so
    5.Restart HTTPD (via DA)
    6.Check in phpinfo() is apc enabled?
    Code:
    apc
    APC Support enabled
    Version 3.0.19
    MMAP Support Enabled
    MMAP File Mask no value
    Locking type pthread mutex Locks
    Revision $Revision: 3.154.2.5 $
    ...
    หัวข้อ
    How To , Linux , Software
  4. DirectAdmin + mod_ruid2 on Debian

    โดย เมื่อ 05-16-2011 เวลา 14:33:36
    Since there are alot of people asking for it, here is my HowTo about mod_ruid2
    This is based on my Debian server with Apache 2.x.

    Installing this module its no longer needed to chmod config files to 666 or upload/attachments directories to 777. Since with this module enabled everything @ HTTP will run under the user itself and not 'apache' anymore.

    ** If you are using mod_ruid instead of mod_ruid2, first of all remove the mod_ruid line from '/etc/httpd/conf/httpd.conf'

    First, we are going to install libcap-devel
    For CentOS:
    yum -y install libcap-devel
    For Debian:
    aptitude install libcap2-dev
    After this is done we are going to download and install mod_ruid2
    wget http://dave.t0xic.nl/tars/mod_ruid2-0.9.3.tar.bz2
    tar xjf mod_ruid2-0.9.3.tar.bz2
    cd mod_ruid2-0.9.3
    apxs -a -i -l cap -c mod_ruid2.c
    Now, if you didn't get any errors mod_ruid2 should be installed and added to the '/etc/httpd/conf/httpd.conf ...
    ป้ายกำกับ: CenOS, debian, directadmin, mod_ruid2 เพิ่ม / แก้ไข ป้ายกำกับ
    หัวข้อ
    How To , Linux , Software
  5. Linux force reboot/shutdown

    โดย เมื่อ 05-08-2011 เวลา 08:02:36
    Forcing reboot
    Linux is not Windows XP and if reboot fail you usually still connect by SSH and do something. This commands will show you how to remotely hard reboot machine. Hard reboot mean that shutdown scripts will not run and machine reboot immediately without syncing hard disk drives, shutdown applications etc, it’s more like hitting the reset button.
    Code:
    echo 1 > /proc/sys/kernel/sysrq
    echo b > /proc/sysrq-trigger
    This commands enable sysrq and after this calls fast reboot. If you want to force shutdown machine try this.
    Force shutdown
    Code:
    echo 1 > /proc/sys/kernel/sysrq
    echo o > /proc/sysrq-trigger
    Pasted from
    This came handy, when I had a server that had some IO error and it can no longer read from disk, only few cached binaries into memory kept it running (kernel, SSHD, bash), I could still access the machine via SSH but can no longer do anything, forcing the reboot as mentioned above was my only resort, and it worked like ...
    หัวข้อ
    How To , Linux

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90