linuxÁ½¸ö³ÌÐòͨ¹ý¹²ÏíÄÚ´æÍ¨ÐŵÄÒ»¸ö¼òµ¥Àý×Ó
д¹²ÏíÄÚ´æ³ÌÐò£º
/*
* File: server.cpp
* Author: centos
*˵Ã÷£º´Ó¼üÅ̶ÁÈëÊý¾Ý£¬´æ·ÅÔÚ¹²ÏíÄÚ´æÖС£
* Created on 2010Äê3ÔÂ1ÈÕ, ÏÂÎç3:44
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#define BUF_SIZE 1024
#define MYKEY 114
int main(int argc, char** argv)
{
int shmid;
char *shmptr;
struct shmid_ds shmbuf;
system("ipcrm -M114"); //µ÷ÊÔ³ÌÐòʱÓÃ
shmid = shmget(MYKEY, BUF_SIZE, (IPC_CREAT |0777) );
if ( -1 == shmid )
{
printf("server shmget error!\n");
fprintf(stderr, "Error: %d - %s\n", errno, strerror(errno));
exit(1);
}
shmptr = (char *) (shmat(shmid, 0, 0)) ;
if ( -1 == (int) shmptr )
{
printf("server shmat error!\n");
fprintf(stderr, "Error: %d - %s\n", errno, strerror(errno));
if(shmctl(shmid,IPC_RMID,&shmbuf) < 0)
{
perror("shmctl error");
fprintf(stderr, "Error: %d - %s\n", errno, strerror(errno));
}
exit(1);
}
strcpy(shmptr,"this is a test. \n");
while(1)
{
printf("Please input:");
scanf("%s",shmptr) ;
while ('\n' != getchar() );
// fflush(stdin);
// printf("your input: %s\n", shmptr);
if (! strcmp(shmptr,"quit")) break;
}
shmdt(shmptr);
if(shmctl(shmid,IPC_RMID,&shmbuf) < 0) perror("shmctl error");
return (EXIT_SUCCESS);
}
¶Á¹²ÏíÄÚ´æµÄ³ÌÐò£º
/*
* File: main.cpp
* Author: centos
*
˵Ã÷£º´Ó¹²ÏíÄÚ´æÖжÁÈ¡Êý¾Ý£¬ÏÔʾµ½ÆÁÄ»ÉÏ¡£
* Created on 2010Äê3ÔÂ2ÈÕ, ÉÏÎç10:47
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#define BUF_SIZE 1024
#define M
Ïà¹ØÎĵµ£º
DBA£ºLinux
ÔÚ Linux x86 Éϰ²×° Oracle RAC 10g
×÷ÕߣºJohn Smiley
Á˽âÔÚ Red Hat Enterprise Linux »ò Novell SUSE Enterprise Linux ÉÏ´ÓÍ·°²×° Oracle RAC 10g µÄ»ù´¡ÖªÊ¶£¨½öÓÃÓÚÆÀ¹À£©
Ŀ¼
¸ÅÊö
±³¾°
µÚ 1 ²¿·Ö£º °²×° Linux
µÚ 2 ²¿·Ö£º Ϊ Oracle ÅäÖà Linux
µÚ 3 ²¿·Ö£º ×¼±¸¹²Ïí´ÅÅÌ
µÚ 4 ²¿·Ö£º ......
½ñÌì×°ÁËÒ»ÌìµÄLinuxϵͳ£¬ÓëÆä˵°²×°»¹²»Èç˵ÊÇÏÂÔØÁËÒ»Ì죬ÏȺó×°ÁËfedora core 4£¬fedora core 6£¬×îºó×°fedora core 8ÖÕÓÚ¿ÉÒÔÓÃÁË£¬Ã¿¸ö¶¼ÊÇ3G¶à£¬ÒòΪÔÚѧУµÄ¹¤×÷ÊÒ£¬ËùÒÔÏÂÔØËÙ¶ÈÆ½¾ù¿ÉÒÔ´ïµ½1.9M²»µ½£¬Õâ¿ÉÊÇÏÞËٵ쬾ÍËãÕâÑùÎҵĵçÄÔÒ²ÒòΪÏÂÔØËÙ¶ÈÌ«¿ìËÀÁËN»ØÁË£¬¶¼ÊÇÇ¿ÖÆPowerµÄ£¬ÕæµÃ×°µÃÓеãÓôÃÆ°¡£¬×°FC4ÊÇÒ ......
linuxϼ¸ÖÖ·þÎñÆ÷µÄÅäÖÃʹÓÃÖ®Ò»£ºnfs tftp
°²×°nfsÐèÒªÔÚ·þÎñÆ÷¶Ë¹Ø±Õiptables·À»ðǽ£¬¹Ø±Õ·½·¨ÈçÏÂ
²é¿´·À»ðǽ״̬£º
/etc/init.d/iptables status
ÔÝʱ¹Ø±Õ·À»ðǽ£º
/etc/init.d/iptables stop
½ûÖ¹·À»ðǽÔÚϵͳÆô¶¯Ê±Æô¶¯
/sbin/chkconfig --level 2345 iptables off
ÖØÆôiptables:
/etc/init.d/iptabl ......
Äں˰汾:2.6.28
linuxÈçºÎÀûÓûï°éϵͳ,slab·ÖÅäÆ÷·ÖÅäÄÚ´æ,ÓÃÕâЩ·½·¨µÃµ½µÄÄÚ´æÔÚÎïÀíµØÖ·É϶¼ÊÇÁ¬ÐøµÄ, È»¶ø,ÓÐЩʱºò,ÿ´ÎÇëÇóÄÚ´æÊ±,ϵͳ¶¼·ÖÅäÎïÀíµØÖ·Á¬ÐøµÄÄÚ´æ¿éÊDz»ºÏÊʵÄ,¿ÉÒÔÀûÓÃС¿éÄÚ´æ“Á¬½Ó”³É´ó¿é¿ÉʹÓõÄÄÚ´æ.ÕâÔÚ²Ù×÷ϵͳÉè¼ÆÖÐÒ²±»³ÆÎª “ÄÚ´æÆ´½Ó”,ÏÔÈ»,ÄÚ´æÆ´½ÓÔÚÐèÒª½Ï´óÄÚ ......
linux϶¨Ê±Ö´Ðмƻ®ÈÎÎñ
²é¿´/etc/crontabÎļþ
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cr ......