linux
mysql
°²×°½éÉÜ:
linux
·þÎñÆ÷ RedHat 5.0.server.
MySQL
°æ±¾:
ÏÂÔØµØÖ·Á´½Ó:http://dev.mysql
.com/downloads/mysql
/5.1.html
MySQL
·þÎñ¶Ë:MySQL
-server-community-5.1.38-0.rhel5.i386.rpm
MySQL
¿Í»§¶Ë:MySQL
-client-community-5.1.38-0.rhel5.i386.rpm
1 °²×°²½ÖèÊ×ÏȼÓÔØ¹âÇý:
mount /dev/cdrom /mnt
´ýÐø...
2 linux
MySQL
°²×°Ä¿Â¼½éÉÜ:
¡¡ÏÂÃæ¾Í½éÉÜÒ»ÏÂÕ⼸¸öĿ¼¡£
¡¡¡¡1¡¢Êý¾Ý¿âĿ¼
¡¡¡¡/var/lib/mysql
/
¡¡¡¡2¡¢ÅäÖÃÎļþ
¡¡¡¡/usr/share/mysql
£¨mysql
.serverÃüÁî¼°ÅäÖÃÎļþ£©
¡¡¡¡3¡¢Ïà¹ØÃüÁî
¡¡¡¡/usr/bin(mysqladmin mysqldumpµÈÃüÁî)
¡¡¡¡4¡¢Æô¶¯½Å±¾
¡¡¡¡/etc/rc.d/init.d/£¨Æô¶¯½Å±¾Îļþmysql
µÄĿ¼£©
Îå¡¢Ð޸ĵǼÃÜÂë
¡¡¡¡MySQL
ĬÈÏûÓÐÃÜÂ룬°²×°Íê±ÏÔö¼ÓÃÜÂëµÄÖØÒªÐÔÊDz»ÑÔ¶øÓ÷µÄ¡£
¡¡¡¡1¡¢ÃüÁî
¡¡¡¡usr/bin/mysqladmin -u root password 'new-password'
¡¡¡¡¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
¸øroot¼Ó¸öÃÜÂë123456¡£
¡¡¡¡¼üÈëÒÔÏÂÃüÁî £º
¡¡¡¡[root@test1 local]# /usr/bin/mysqladmin -u root password 123456 ......
linux
mysql
°²×°½éÉÜ:
linux
·þÎñÆ÷ RedHat 5.0.server.
MySQL
°æ±¾:
ÏÂÔØµØÖ·Á´½Ó:http://dev.mysql
.com/downloads/mysql
/5.1.html
MySQL
·þÎñ¶Ë:MySQL
-server-community-5.1.38-0.rhel5.i386.rpm
MySQL
¿Í»§¶Ë:MySQL
-client-community-5.1.38-0.rhel5.i386.rpm
1 °²×°²½ÖèÊ×ÏȼÓÔØ¹âÇý:
mount /dev/cdrom /mnt
´ýÐø...
2 linux
MySQL
°²×°Ä¿Â¼½éÉÜ:
¡¡ÏÂÃæ¾Í½éÉÜÒ»ÏÂÕ⼸¸öĿ¼¡£
¡¡¡¡1¡¢Êý¾Ý¿âĿ¼
¡¡¡¡/var/lib/mysql
/
¡¡¡¡2¡¢ÅäÖÃÎļþ
¡¡¡¡/usr/share/mysql
£¨mysql
.serverÃüÁî¼°ÅäÖÃÎļþ£©
¡¡¡¡3¡¢Ïà¹ØÃüÁî
¡¡¡¡/usr/bin(mysqladmin mysqldumpµÈÃüÁî)
¡¡¡¡4¡¢Æô¶¯½Å±¾
¡¡¡¡/etc/rc.d/init.d/£¨Æô¶¯½Å±¾Îļþmysql
µÄĿ¼£©
Îå¡¢Ð޸ĵǼÃÜÂë
¡¡¡¡MySQL
ĬÈÏûÓÐÃÜÂ룬°²×°Íê±ÏÔö¼ÓÃÜÂëµÄÖØÒªÐÔÊDz»ÑÔ¶øÓ÷µÄ¡£
¡¡¡¡1¡¢ÃüÁî
¡¡¡¡usr/bin/mysqladmin -u root password 'new-password'
¡¡¡¡¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
¸øroot¼Ó¸öÃÜÂë123456¡£
¡¡¡¡¼üÈëÒÔÏÂÃüÁî £º
¡¡¡¡[root@test1 local]# /usr/bin/mysqladmin -u root password 123456 ......
ÉÏÎÄÖÐÌáµ½ÁËkconfigÎļþÐ޸ģ¬
ÔÚÀïÃæ¼ÓÈëÁË
config EmbedSky_HELLO
tristate "TQ2440/SKY2440 Hello Driver"
depends on ARCH_S3C2440
help
EmbedSky TQ2440/SKY2440 Hello.
Õ⼸ÐдúÂ룬±íʾҪ±àÒëEmbedSky_HELLOÕâ¸öÇý¶¯½øÈ¥£¬ÎÒÃÇ»¹Òª×÷µÄ¹¤×÷ÊÇ
ÐÞ¸Äͬĸ¼ÏµÄmakefileÎļþ
ÔÚmakefileÀï¼ÓÈëÁËÕâÒ»ÐУ¬
obj-$(CONFIG_EmbedSky_HELLO) += EmbedSky_hello.o
È»ºóÔÚÄں˱àÒëÑ¡ÏîÀïÑ¡¶¨£¬ºóÖ±½Ó±àÒëÄںˣ¬»òÊÇʹÓÃÃüÁî#make SUBDIR=drivers/char/ modules,È»ºó±àÒë³öÇý¶¯Ä£¿é¡£
ÎÒÃÇÀ´¿´¿´Çý¶¯Ä£¿é
*************************************
NAME:EmbedSky_hello.c
COPYRIGHT:www.embedsky.net
*************************************/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/miscdevice.h>
#include <linux/delay.h>
#include <asm/irq.h>
#include <asm/arch/regs-gpio.h>
#include <asm/hardware.h> ......
//CUdp.h
#ifndef MY_CUDP
#define MY_CUDP
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
class CUdp{
public:
CUdp(const char* destIP, unsigned short localPort, unsigned short destPort);
CUdp(unsigned int destIP, unsigned short localPort, unsigned short destPort);
int sendData(void *data, unsigned int length);
int recvData(void *data, unsigned int length,unsigned int &inIP,unsigned short& inPort);
~CUdp(){close(sock_fd);}
private:
int sock_fd;
struct sockaddr_in local_addr;
struct sockaddr_in dest_addr;
};
#endif
//CUdp.cpp
#include "CUdp.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <arpa/inet.h>
CUdp::CUdp(unsigned int destIP,unsigned short localPort, unsigned short destPort)
{
memset(&local_addr,0,sizeof(local_addr));
local_addr.sin_family = AF_IN ......
22.1.1 LinuxÆô¶¯µÄ»ù±¾²½Öè
ÒªÍêÕû½²ÊöLinuxµÄÆô¶¯¹ý³Ì£¬ÐèҪ׷Ëݵ½°´ÏµçÔ´¿ª¹ØµÄÄÇÒ»¿Ì¡£PCÒýµ¼µÄµÚÒ»²½ÊÇÖ´Ðд洢ÔÚROM£¨Ö»¶Á´æ´¢Æ÷£©ÖдúÂ룬ÕâÖÖÒýµ¼´úÂëͨ³£±»³ÆÎªBIOS£¨»ù±¾ÊäÈëÊä³öϵͳ£¬Basic Input/Ouput System£©¡£BIOSÖªµÀºÍÒýµ¼ÓйصÄÓ²¼þÉ豸µÄÐÅÏ¢£¬°üÀ¨´ÅÅÌ¡¢¼üÅÌ¡¢´®Ðпڡ¢²¢Ðпڵȣ¬²¢¸ù¾ÝÉèÖÃÑ¡Ôñ´ÓÄÄÒ»¸öÉ豸Òýµ¼¡£
È·¶¨Òýµ¼É豸ºó£¨Í¨³£ÊǵÚÒ»¿éÓ²ÅÌ£©£¬¼ÆËã»ú¾Í³¢ÊÔ¼ÓÔØ¸ÃÉ豸¿ªÍ·512¸ö×Ö½ÚµÄÐÅÏ¢£¬°üº¬Õâ512¸ö×ֽڵĶα»³Æ×÷MBR£¨Master Boot Record£¬Ö÷Òýµ¼¼Ç¼£©¡£MBRµÄÖ÷ÒªÈÎÎñÊǸæËß¼ÆËã»ú´ÓʲôµØ·½¼ÓÔØÏÂÒ»¸öÒýµ¼³ÌÐò£¬“ÏÂÒ»¸ö”Òýµ¼³ÌÐò±»³ÆÎª“Òýµ¼¼ÓÔØÆ÷£¨Boot Loader£©”¡£Òýµ¼¼ÓÔØÆ÷¸ºÔð¼ÓÔØ²Ù×÷ϵͳµÄÄںˣ¬GrubºÍLILO¾ÍÊÇLinuxÉÏ×îÖøÃûµÄÁ½¸öÒýµ¼¼ÓÔØÆ÷¡£
½ÓÏÂÀ´·¢ÉúµÄÊÂÇé¾ÍËæ²Ù×÷ϵͳµÄ²»Í¬¶ø²»Í¬ÁË¡£¶ÔÓÚLinux¶øÑÔ£¬»ù±¾µÄÒýµ¼²½Öè°üÀ¨ÒÔϼ¸¸ö½×¶Î¡£
£¨1£©¼ÓÔØ²¢³õʼ»¯LinuxÄںˡ£
£¨2£©ÅäÖÃÓ²¼þÉ豸¡£
£¨3£©Äں˴´½¨×Ô·¢½ø³Ì¡£
£¨4£©ÓÉÓû§¾ö¶¨ÊÇ·ñ½øÈëÊÖ¹¤Òýµ¼Ä£Ê½¡£
£¨5£©£¨ÓÉinit½ø³Ì£©Ö´ÐÐϵͳÆô¶¯½Å±¾¡£
£¨6£©½øÈë¶àÓû§Ä£Ê½¡£
¿É¼û£¬LinuxÄÚºË×ÜÊǵÚÒ»¸ö±»¼ÓÔØµÄ¶«Î÷¡£ÄÚºËÖ´ÐаüÀ¨Ó²¼ ......
1. ÏÂÔØÄÚºËÔ´ÂëµÄѹËõ°ü linux-2.6.30.5.tar.bz2£¬ÓÐ56MB´óС
2. ½âѹ³öÀ´ºóÕâ¸öÄÚºËÔ´ÂëµÄÎļþ¼Ðlinux-2.6.30.5£¬ÓÐ332MB´óС
3. ²é¿´±àÒëËùÐèµÄ×îа汾µÄÈí¼þÒÀÀµµÄ»°£¬ÔÚDocumentation/ChangesÎļþÀï
4. make mrproper
È·±£ÄÚºËÔ´ÎļþÖÐûÓоɵÄ.oÎļþÓëÒÀÀµ¹ØÏµ
5. make O=/usr/src/kernels/linux-2.6.30.5 menuconfig
ÅäÖÃÄںˣ¬Éú³ÉÅäÖÃÎļþ .config
6. make O=/usr/src/kernels/linux-2.6.30.5
- -| »¨ÁË70·ÖÖÓ×óÓÒ²ÅÔÚ×Ô¼ºµÄ»úÆ÷ÉϱàÒëÍê³É£¬ÔÚʵÑéÊҵĻúÆ÷Ö»Òª30·ÖÖÓ²»µ½
±àÒëÍêºóµÄ/usr/src/kernels/linux-2.6.30.5Îļþ¼Ð´óСΪ1.6GB
Ö»ÓÃÒ»¸ömakeÃüÁÊÇ·ñÒѾ°üº¬ÁË make bzImage ¸ú make module £¿
7. make O=/usr/src/kernels/linux-2.6.30.5 modules_install
»¨ÁËÁ½·ÖÖÓʱ¼ä°²×°Ä£¿é£¬Íê³Éºó/usr/src/kernels/linux-2.6.30.5Îļþ¼Ð´óСÈÔΪ1.6GB
Õâʱ/bootĿ¼Ï¶àÁ˼¸¸öÎļþ£º
System.map(ÈíÁ´½Ó£¬Ö¸ÏòºóÕß)£¬
System.map-2.6.30.5£»
& ......
ÕâÓм¸ÆªÎÄÕ£¬ÖµµÃÒ»¶Á
http://blog.csdn.net/wuxiaoming1733/archive/2008/10/29/3175296.aspx
http://blog.csdn.net/wooin/archive/2006/12/30/1468797.aspx
http://blog.csdn.net/wooin/archive/2006/03/10/620791.aspx
http://blog.csdn.net/wuxiaoming1733/archive/2008/10/13/3068226.aspx
http://blog.csdn.net/wuxiaoming1733/archive/2008/10/13/3068238.aspx ......