Standard

View Manufacturer, Model and Serial number of the equipment using dmidecode

You can get information about the make, model and serial number of the equipment as shown below

# dmidecode -t system
SMBIOS 2.3 present.

Handle 0x0100, DMI type 1, 25 bytes
System Information
        Manufacturer: Dell Computer Corporation
        Product Name: PowerEdge 1750
        Version: Not Specified
        Serial Number: 1234567
        UUID: 4123454C-4123-1123-8123-12345603431
        Wake-up Type: Power Switch

Handle 0x0C00, DMI type 12, 5 bytes
System Configuration Options
        Option 1: NVRAM_CLR:  Clear user settable NVRAM areas and set defaults
        Option 2: PASSWD:  Close to enable password

Handle 0x2000, DMI type 32, 11 bytes
System Boot Information
        Status: No errors detected
more
Standard

MP4box install on centos

#yum install zlib*
#yum install gcc
#wget http://sourceforge.net/projects/gpac/files/GPAC/GPAC%200.4.5/gpac-0.4.5.tar.gz/download
#wget http://sourceforge.net/projects/gpac/files/GPAC%20extra%20libs/GPAC%20extra%20libs%200.4.5/gpac_extra_libs-0.4.5.tar.gz/download
# tar -xzf gpac-0.4.5.tar.gz 
# tar -xzf gpac_extra_libs-0.4.5.tar.gz 
# cd gpac_extra_libs
# cp -rf * ../gpac/extra_lib/
# cd ../gpac
# chmod +x configure 
# ./configure 
# make lib

If we have a trouble with (make) /usr/bin/ld cannot find lglut

#yum install mesa-libGL-devel
#yum install mesa-libGLU-devel
#yum install libXi-devel
#yum install libXmu-devel
#yum install freeglut-devel
#make apps
# make install lib
# make install
# cp bin/gcc/libgpac.so /usr/lib/
#MP4Box -version
MP4Box - GPAC version 0.4.5 (build 33)
GPAC Copyright: (c) Jean Le Feuvre 2000-2005
                (c) ENST 2005-200X
more
Standard

php memcache

Download and install latest stable memcache version from PECL

cd /usr/src
wget http://pecl.php.net/get/memcache-2.2.5.tgz
tar zxvf memcache-2.2.5.tgz
cd memcache-2.2.5
phpize
./configure
make
make install

If you have trouble with phpize install php-devel

memcache.so will be install in php modules directory, now enable memcache.so extension in php.ini

To find out your php.ini location, execute following command

php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
vi /usr/local/lib/php.ini
extension = “memcache.so”

save the file and restart httpd server

/etc/init.d/httpd restart

To check is memcache extension loaded in php, execute following command

php -i | grep memcache
memcache
memcache support => enabled
memcache.allow_failover => 1 => 1
memcache.chunk_size => 8192 => 8192
memcache.default_port => 11211 => 11211
memcache.default_timeout_ms => 1000 => 1000
memcache.hash_function => crc32 => crc32
memcache.hash_strategy => standard => standard
memcache.max_failover_attempts => 20 => 20
Registered save handlers => files user sqlite memcache
PWD => /usr/src/memcache-2.2.5
_SERVER["PWD"] => /usr/src/memcache-2.2.5
_ENV["PWD"] => /usr/src/memcache-2.2.5

This information can also be seen using phpinfo().

more
more
Standard

“Memcached” High Performance Distributed Memory Object Cache Server

# yum install memcached.x86_64 php-pecl-memcache.x86_64

Edit /etc/sysconfig/memcached file, enter

# vi /etc/sysconfig/memcached

Sample outputs

PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS="

For busy servers you need to increase the values as follows:

MAXCONN: Use 1024 max simultaneous connections; the default is 1024. For busy server increase this number as per requirements.
CACHESIZE: Use 64 MB memory max to use for object storage; the default is 64 megabytes. For busy server you can set it to 512MB or 1GB (1024).
OPTIONS: You can set server IP address (listen on address) here so that apache/php/nginx based serer can connect to the server. By default it is set to INADDR_ANY. This is an important option to consider as there is no other way to secure the installation. Binding to an internal or firewalled network interface is suggested.

PORT="11211"
USER="memcached"
MAXCONN="4096"
CACHESIZE="512"
OPTIONS="-l 192.168.1.15"

Type the following commands

# /etc/init.d/memcached start
# /etc/init.d/memcached stop
# /etc/init.d/memcached restart
# /etc/init.d/memcached status

Type the following command to see if it is running or not

# pgrep memcached
# netstat -tulpn | grep :11211

Sample outputs

tcp        0      0 192.168.1.15:11211           0.0.0.0:*                   LISTEN      24964/memcached
udp        0      0 192.168.1.15:11211           0.0.0.0:*                               24964/memcached

Use the memcached-tool to get general stats

# memcached-tool 192.168.1.15:11211 stats

Sample outputs

#192.168.1.15:11211 Field       Value
         accepting_conns           1
               auth_cmds           0
             auth_errors           0
                   bytes     5481902
              bytes_read     8242409
           bytes_written    26023492
              cas_badval           0
                cas_hits           0
              cas_misses           0
               cmd_flush           0
                 cmd_get        9042
                 cmd_set        4469
             conn_yields           0
   connection_structures          48
        curr_connections          47
              curr_items        3197
               decr_hits           0
             decr_misses           0
             delete_hits           6
           delete_misses         112
               evictions           0
                get_hits        7490
              get_misses        1552
               incr_hits           0
             incr_misses           0
          limit_maxbytes   536870912
     listen_disabled_num           0
                     pid       24964
            pointer_size          64
           rusage_system    0.149977
             rusage_user    0.043993
                 threads           4
                    time  1327395688
       total_connections         171
             total_items        3226
                  uptime         198
                 version       1.4.4

Make sure iptables only allows access to your own servers. Edit /etc/sysconfig/iptables and append the following rules or add it as follows to your shell scripts

## add to your shell script ##
## assumption default INPUT policy is set to DROP ##
## only accept connection to tcp/udp port 11211 if ip is between 192.168.1.10 and 192.168.1.15 ##
iptables -A INPUT -p tcp --destination-port 11211 -m state --state NEW  -m iprange --src-range 192.168.1.10-192.168.1.15 -j ACCEPT
iptables -A INPUT -p udp --destination-port 11211 -m state --state NEW  -m iprange --src-range 192.168.1.10-192.168.1.15 -j ACCEPT
more
Standard

PHP Json extension

Download from http://pecl.php.net/package/json

tar -zxvf json-1.2.1.tgz
cd json-1.2.1
vi JSON_parser.c

Find ZVAL_DELREF replace to Z_DELREF_P (You can Find in 3 place) And Save file
Then

phpize
./configure 
make 
make install

in php.ini

extension=json.so
more
Standard

Installing Debian on Plug Computers

This page describes how to install Debian 6.0 (squeeze) on plug computers, such as the SheevaPlug and GuruPlug.

The following devices are currently supported:

  • SheevaPlug (the SheevaPlug Development Kit)
  • eSATA SheevaPlug
  • GuruPlug Server Standard
  • GuruPlug Server Plus
  • Seagate FreeAgent DockStar (limited support: only if you added a serial console)

Please read the plug variants page to find out about the status of other plug computers.

The Debian installer doesn’t currently support installations to on-board flash storage, but you can use it to install to USB, SD or eSATA. In order to proceed, you will therefore need either a USB stick (or disk), an SD card or an external disk with an eSATA port.

Preparation

Make sure to connect an Ethernet cable to your plug computer (if you haven’t already) because the installer will download files from the Internet for the installation.

Upgrading U-Boot

You have to upgrade the u-boot boot loader before you can install Debian. Please visit the page describing the u-boot upgrade process to ensure that you have the right version of u-boot before proceeding with the installation of Debian.

Starting the Installer

First of all, you have to download the installer. Download the uImage and uInitrd and store them either on a USB stick, MMC/SD card or a TFTP server.

Now connect the install medium (USB stick, SD card or eSATA disk) to your plug computer and connect a mini-USB connector in order to access the serial console. Start your plug computer and a few seconds later you should be able to connect to /dev/ttyUSB1 with 115200 baud. If you need help accessing the serial console, check out this guide on the Plug Computer wiki. When you get serial output, press a key to interrupt the boot process so you can load the installer.

The instructions for loading the installer depend on where you want to load the installer from. Also note that you may have to replace fatload with ext2load in case you used the ext2 or ext3 filesystem on your USB stick or MMC card.

Note for GuruPlug users: on the GuruPlug, MMC/SD cards show up as USB devices. Therefore, if you’re using a MMC/SD card, make sure to follow the instructions for USB devices and not for MMC/SD.

USB: If you stored the installer on a USB stick, please use:

usb start
fatload usb 0:1 0x00800000 /uImage
fatload usb 0:1 0x01100000 /uInitrd

SD: for MMC/SD cards, use:

mmc init
fatload mmc 0:1 0x00800000 /uImage
fatload mmc 0:1 0x01100000 /uInitrd

TFTP: if you want to load the installer via the network from a TFTP server, use this:

setenv serverip 192.168.1.2
setenv ipaddr 192.168.1.147
tftpboot 0x00800000 uImage
tftpboot 0x01100000 uInitrd

Of course, you have to replace 192.168.1.2 with the IP address of your TFTP server.

Finally, start the installer:

setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most
bootm 0x00800000 0x01100000

The Installation

The installation itself should be pretty standard and you can follow the installation guide. The installer knows about all supported plug computers and will create a bootable kernel and ramdisk at the end of the installation. The installer will also offer a partition layout that is known to work. If you want to choose a different layout, make sure that you create a small (ca. 150 MB) /bootpartition with the ext2 filesystem.

When the installation is done, you have to configure u-boot so it will automatically boot Debian. Interrupt the boot process of u-boot and enter the following commands. For USB, use this:

setenv bootargs_console console=ttyS0,115200
setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x00800000 /uImage; ext2load usb 0:1 0x01100000 /uInitrd'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_usb; bootm 0x00800000 0x01100000'
saveenv

If you're using an SD card, use these commands instead:

<div>
<pre>setenv bootargs_console console=ttyS0,115200
setenv bootcmd_mmc 'mmc init; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x00800000 0x01100000'
saveenv

Finally, use these commands to boot from eSATA:

setenv bootargs_console console=ttyS0,115200
setenv bootcmd_sata 'ide reset; ext2load ide 0:1 0x00800000 /uImage; ext2load ide 0:1 0x01100000 /uInitrd'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_sata; bootm 0x00800000 0x01100000'
saveenv

The commands above use 0:1 to refer to your boot partition. This indicates device 0 and partition 1. Depending on your configuration and device, you may have to specify a different boot partition. Please refer to the explanation on how to find out your boot partition in case your device does not boot with 0:1.

Your plug computer is now ready to boot Debian from USB, SD or eSATA and it will automatically do so whenever you turn on the plug computer. You can now type the following command to boot:

run bootcmd
more