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.
What Google Chrome OS Will Look Like
/usr/bin/mysqladmin -u root password ‘new-password’
/usr/bin/mysqladmin -u root -h myhost password ‘new-password’
mysql -p -u root
install samba in arch linux:
$pacman -S samba
$cp /etc/samba/smb.conf.default /etc/samba/smb.conf
$adduser -d /home/<user dir> -m <user name>
$passwd <user name>
$smbpasswd -a <user name>
add two lines in to /etc/samba/smb.conf
netbios name = archsmb
encrypt passwords = yes
[homes]
browseable = yes
writable = yes
then:
$/etc/rc.d/samba start
$smbclient -L localhost -U <user name>
for start each service in arch linux, set deamon in /etc/rc.conf. using sshd for example:
deamons(… sshd lighttpd … …)
open ssh service. change /etc/hosts.allow add one line
sshd: ALL
install lighttpd php fcgi and mysql.
pacman -Ss search
pacman -S lighttpd php fcgi mysql samba perl-cgi
configuation arch linux network by dhcp:
add following lines to /etc/rc.conf
eth0=”dhcp”
INTERFACES=(eth0)
ROUTES=(!gateway)
then try /etc/rc.d/network restart
using python get current timestamp
>>>import time
>>>time.time()
//currenting timestamp to int
>>>int(time.time())
//converting to string
>>>str(time.time())
first look kubuntu.
the most bugs of KDE have been fixed. the wifi mod has been improved. the package library adds many new software, like monodevelop2 firefox 3.1 and 3.5, kooldock, etc. but I didn’t see katapult.
To mount the ISO image file.iso to the mount point /mnt/test use this command:
mount -o loop -t iso9660 file.iso /mnt/test
building a PXE boot server in the ubuntu.
1. install dhcp3 server in the ubuntu.
apt-get install dhcp3-server
2. edit /etc/default/dhcp3-server
INTERFACES=”eth0″
3. edit /etc/dhcp3/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.example";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}
4. edit /etc/network/interfaces
auto eth0:1
iface eth0:1 inet static
name DHCPserver
address 192.168.1.1
netmask 255.255.255.0
5. restart networking and dhcp3
service networking restart
service dhcp3-server restart
remember: mono2.4 and monodevelop 2.0, try them tonight.
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.
disable linux kde auto login:
open /etc/kde3/kdm/kdmrc
change “AutoLoginEnable” to false
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
development a web browser that based on WebKit need following package:
libqt4-dev libxslt1-dev gperf bison libsqlite3-dev flex build-essential subversionthey can be installed by apt-get in the ubuntu system.
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.