add php gd (graphics directly) support in ubuntu
#sudo apt-get install php5-gd
then, restart web service
#sudo service lighttpd restart //or #sudo service apache2 restart
add php gd (graphics directly) support in ubuntu
#sudo apt-get install php5-gd
then, restart web service
#sudo service lighttpd restart //or #sudo service apache2 restart
clean kernel temp files
#make clean
next, install modules of new kernel:
#make modules_install
then, generate a image for new kernel.
#cd /lib/modules #mkinitramfs -o initrd.img-2.6.30.4 2.6.30.4 #mv initrd.img-2.6.30.4 /boot
edit menu.lst file for grub booter, add following:
title Ubuntu 8.04.3 LTS, kernel 2.6.30.4 root (hd0,2) kernel /boot/vmlinuz root=UUID=98f69044-be12-4dde-95df-358dca35c632 ro quiet splash initrd /boot/initrd.img-2.6.30.4 quiet
install new linux kernel 2.6.30.4 using “make install”, system should show following detail:
root@ibm-laptop:/usr/src/linux-2.6.30.4# make install
sh /usr/src/linux-2.6.30.4/arch/x86/boot/install.sh 2.6.30.4 arch/x86/boot/bzImage \
System.map “/boot”
In order to use the new kernel image you have just installed, you
will need to reboot the machine. First, however, you will need to
either make a bootable floppy diskette, re-run LILO, or have GRUB
installed.
Checking for ELILO…No
GRUB is installed. To automatically switch to new kernels, point your
default entry in menu.lst to /boot/vmlinuz-2.6.30.4
====================
GRUB menu configuration file menu.lst should be update.
configuration and update to linux kernel 2.6.30.4
using root account do following.
#make mrproper #check kernel .o and .config files
next configuration kernel. there are three kinds of configuration UI.
#make config #Text UI
#make menuconfig #Text graph UI
#make xconfig
before using menuconfig mode, ncurses should be installed.
#apt-get install libncurses*
and before using xconfig mode, following package should be installed.
#apt-get install libqt3-headers libqt3-mt-dev
after all configuration work done. using make command to compile kernel.
get recent linux kernel (2.6.30.4)
$sudo wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.4.tar.gz /usr/src $sudo tar xvf /usr/src/linux-2.6.30.4.tar.gz
if linux-2.6.30.4.tar.bz2 package, using command:
$sudo tar jxvf /usr/src/linux-2.6.30.4.tar.bz2
open root account in ubuntu:
$sudo passwd root
then, set new password for root.
improve your arch linux pacman speed.
pacman using wget for download task. but wget is not for multiple thread download. if using “aria2″, the download speed can sharply increase.
firstly, install aria2 by:
$pacman -Sy
$pacman -S aria2
then, edit /etc/pacman.conf, add a line:
XferCommand = /usr/bin/aria2c -s 2 -m 2 -d / -o %o %u
ok, try pacman again, you can see big change for download speed.
a shell script for quick uploading one file via ftp:
#!/bin/bash
ftp -v -n http://ftp.server.com <
mput $1
bye
END
using command ‘badbloocks’ check bad block on the device.
$badblocks -c -v /dev/sda1
-c blocks at once
-v verbose mode
in the freebsd system, smart montools can be used:
$cd /usr/ports/sysutils/smartmontools
$make config install clean
$smartctl -a /dev/ad0 // quick checking and check all
$smartctl -t long /dev/ad0 // check and test
export and import mysql database in command line
export
mysqldump -u admin_user -p database_name > file.sql
import
mysql -u admin_user -p database_name < file.sql
clean ubuntu package cache:
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
clean isolated package
sudo apt-get install deborphan -y
unix shell programming tutorial for command awk, and a chinese version is available.