ºìÁªLinuxÃÅ»§
Linux°ïÖú

[Òѽâ¾ö£¬¸üз½·¨]fedora h3c×Ô¶¯ÅäÖýű¾µÄÂé·³ÒÔ¼°½â¾ö·½·¨

·¢²¼Ê±¼ä:2011-01-13 07:38:53À´Ô´:ºìÁª×÷Õß:ouc_wentao
[i=s] ±¾Ìû×îºóÓÉ ouc_wentao ÓÚ 2011-1-20 15:38 ±à¼­ [/i]

ÒÉÎÊÌû£º
¾ÍÊÇÕâÑù ,ÎÒÃÇѧУÓõÄÊÇУ԰Íø,¿Í»§¶ËÓÃh3c,ÏÈÁ¬½ÓУ԰Íø,ÒªÓÃÍâÍøµÄ»°¾ÍÒªÍøÒ³ÈÏÖ¤,È»ºó²ÅÄÜÁ¬½ÓÍâÍø.
µ±Ê±×°¿Í»§¶ËµÄʱºò,ÏÔʾµÄʲô IP×Ô¶¯Ë¢Ð½ű¾°²×°³É¹¦,¿ª»ú×ÔÆô¶¯°²×°³É¹¦...µÈ
Ô­À´ÓõÄÊÇubuntu ÿ´Î¿ª»ú½øÈë×ÀÃæÖ®ºó¶¼ÒªÊÖ¶¯ÁªÍø,»¹ÄÜÊܵÃÁË,ÒòΪµ±Ê±²»ÖªµÀ¿ª»ú×ÔÆô¶¯µ½µ×ÊǸöʲôÇé¿ö.
»»ÁËfedoraºó,¸Ð¾õÌ«Å£XÁË,¿ª»ú×ÔÆô¶¯,Ö±½ÓÁ¬½ÓÉÏУ԰ÍøÁË,ÎÒÖ»ÒªÔÙ½øÐÐÒ»´ÎÍøÒ³ÈÏÖ¤¾Í¿ÉÒÔÁË,Ò»Ö±ÓÃןܺÃ.
µ«ÊÇÇ°Á½ÌìÒòΪ¿¼ÊÔ,ûÓÃÍø,ÓõçÄÔ¿´¸´Ï°×ÊÁϵÄʱºò,û²åÍøÏß,È»ºófedora¾ÍÒ»Ö±¿¨ÔÚÀ¶°×ÌõÄÇÀï,°´F1Ö®ºó²ÅÖªµÀ,Ô­À´ÊÇh3cÈÏ֤ͨ²»¹ýµÄÎÊÌâ,ÏÔʾÁ¬½Ó³¬Ê±"time out:5",È»ºóÔÙÒ»´ÎÁ¬½Ó,ÔÙ³¬Ê±,ÔÙÁ¬½Ó,Á¬½Ó5,6´ÎÖ®ºó¾Í²»Á¬ÁË,h3cÍ˳ö.ÕâʱºòҪô½øȥϵͳ,Ҫô¾Í»áÒ»Ö±ÉÁÆÁ,Ö»ÄÜÖØÆô.ÒªÊDzåÉÏÍøÏߵĻ°,ÈÏ֤ͨ¹ý¾Í¿ÉÒÔ½øÈëϵͳ.
ÎÒÒ»Ïë,Õâ²»Âé·³ÁËÂð,ÒªÊÇÎÒ²»ÓÃÍø¾Í½ø²»È¥ÏµÍ³µÄ»°,ûÍøµÄʱºòÎÒÁ¬¸öµçÓ°¶¼Ã»·¨¿´°¡,

ÎÒ²»ÖªµÀÄǸö¿ª»úÔËÐеÄÃüÁîÊÇÔÚʲôµØ·½,¸ßÊÖÖ¸µãÒ»¶þ,h3cÈÏÖ¤ÊÇÔÚ start cups ÄÇÒ»¶Ñ[OK]Ö®ºó×îºó³öÏÖµÄ,ÈÏ֤ͨ¹ýÖ®ºó¾ÍÖ±½Ó½øÈë×ÀÃæ,ÕâÑùÓиßÊÖ¸æËßÏÂÄǸöÃüÁî¾ßÌåÔÚÄǸöÎļþÀïÃæ,ÎÒºÃÈ¥ÐÞ¸ÄÏÂ,ÒѾ­ÖªµÀÊÇÔõô»ØÊÂÁË,ºÇºÇ

±¾ÒÔΪ¼ÌÐøÓÃubuntuµÄ ,µ«ÊÇ»»ÉϺó¸Ð¾õÔõô²»ÈçfedoraÊæ·þÁËÄØ,ÎҸоõ»¹ÊÇfedora½Ì»áÎҵĶ«Î÷¶àÒ»µã, ÎÒÏ뻹ÊÇ»»»Øfedora,ËùÒԲŷ¢ÁËÕâ¸ö,

ÎÒ°ÑÎҵĿͻ§¶ËÈí¼þ·¢ÉÏÀ´°É,ÊDz»Óà ÊÖ¶¯ÅäÖõÄ,ÒòΪ±ðµÄ¶¼ÊÇÖ´ÐÐ[code]sudo ./pre.ps[/code]È»ºóÊÇÊÖ¶¯ÅäÖöಥ»¹Êǹ㲥,»¹ÓбðµÄʲôµÄ,Òò´ËÓиßÊÖ(¸ßÊÖIGI,Ïò¸ßÊÖÖ¾´)дÁ˸ö×Ô¶¯ÅäÖýű¾,ÎÒÕâ¸öÖ±½ÓÔËÐÐ[code]sudo ./setup.sh[/code]¾ÍÐÐÁËÎҸоõºÜ·½±ã,²»ÓÃÊÖ¶¯ÅäÖÃ.
######################·Ö¸îÏß##################
½â¾öÌû£º
¿´ÁËÄǸösetup.shÎļþºó,ÎÒÖªµÀÁË Ô­À´ÊÇ×÷ÕßÁíÍâдÁ˺ܶණÎ÷,ÆäÖоÍÓпª»ú×Ô¶¯Æô¶¯³ÌÐò,»¹ÓÐ×Ô¶¯ÖØÁ¬³ÌÐò½Å±¾,ËùÒÔ,Èç¹ûÎÒ°²×°¿Í»§¶Ë,ËäÈ»²»ÓúÜÂé·³µÄÅäÖÃÁË,µ«ÊÇÒªÊÇÎÒûÓÐÍøÂç,»òÕßÎÒ²»²åÍøÏßµÄʱºò,ÎҾͺÜÄѽøÈ¥×ÀÃæÁË,×îºÃµÄ°ì·¨¾ÍÊÇ°ÑÄÇЩ¿ª»ú×Ô¶¯Æô¶¯½Å±¾É¾³ý,¿´ÁË¿´shÎļþ,ÆäÖÐÖ÷º¯Êý[code]declare who1=`whoami`
if [ $who1 != "root" ]
then
echo You are using a non-privileged account;
echo Please change to root user and try again;
exit;
fi

clear
sys_lang=`echo $LANG`
case $sys_lang in
zh_CN*)
menu_chinese
;;
*)
menu_english
;;
esac[/code]È»ºóÁ´½Óµ½menu_chineseº¯Êý #Ç°ÌáÊÇÄãµÄϵͳÓïÑÔÊÇÖÐÎÄ,ÒªÊÇÊDZðµÄÓïÑԵĻ°,»áÁ´½Óµ½menu_englishº¯Êý,ʹÓÃÓ¢ÓïÖ¸µ¼Äã°²×°¿Í»§¶Ë.
menu_chineseº¯ÊýÈçÏÂ[code]function menu_chinese
{
declare wrong_input=1;
while [ $wrong_input -eq 1 ]
do
clear
echo "»¶Ó­Ê¹Óà H3C for Linux °²×°Òýµ¼½Å±¾"
echo " 1.°²×° H3C for Linux"
echo " 2.Ö±½ÓÔËÐÐ H3C for Linux"
echo " 3.жÔØ H3C for Linux"
echo " 4.Í˳ö"
echo -ne "ÇëÊäÈëÄãµÄÑ¡Ôñ:"
read menu_choose
case $menu_choose in
1)
wrong_input=0
creat_hold #´Ëº¯ÊýÊÇÓÃÀ´×Ô¶¯ÖØÁ¬³ÌÐòµÄ,ÎÒ×öµÄ¾ÍÊÇ°ÑÄǸöcreat_holdº¯Êý×¢½âµô¾Í¿ÉÒÔÁË
auto_choose
install_chinese
;;
2)
wrong_input=0
run_chinese
;;
3)
wrong_input=0
uninstall_chinese
;;
4)
wrong_input=0
echo "³ÌÐò½áÊø."
;;
*)
echo "´íÎóµÄÑ¡ÔñÊý!"
echo "ÇëÖØÐÂÊäÈë!"
sleep 1
wrong_input=1
;;
esac
done;
}[/code]autochooseº¯ÊýÊÇÓÃÀ´Ñ¡ÔñÄ¿Ç°µÄ·¢Ðа汾µÄ,Ö§³Ö°æ±¾ÓÐfedora ubuntu redhat debian centos gentoo ,Òò´ËÕâ¸öº¯Êý¾Í²»Òª¶¯ÁË
ÁíÒ»¸öÒª¶¯µÄ¾ÍÊÇÏÂÒ»¸öinstall_chineseº¯ÊýÁË[code]function install_chinese
{
declare wrong_pre=0
if test -e "/etc/h3c-linux1x"
then
echo "ÅäÖÃĿ¼ÒѾ­´æÔÚ."
else
mkdir /etc/h3c-linux1x
fi

if test -e "/var/log/h3c-linux1x"
then
echo "ÈÕ־Ŀ¼ÒѾ­´æÔÚ."
else
mkdir /var/log/h3c-linux1x
fi

if test -e "/usr/lib/libstdc++-libc6.2-2.so.3"
then
echo "¹²Ïí¿âÎļþÒѾ­´æÔÚ."
else
declare temp1=`ls /usr/lib/libstdc++* | head -1`
ln -s $temp1 /usr/lib/libstdc++-libc6.2-2.so.3
echo "³É¹¦´´½¨¿âÎļþÈíÁ¬½Ó."
fi

if test -e "./renew.ps"
then
{
cp ./renew.ps /usr/local/bin
chmod 755 /usr/local/bin/renew.ps
echo "Ë¢ÐÂIP½Å±¾×¼±¸¾ÍÐ÷."
}
else
{
echo "ÎÞ·¨ÕÒµ½Ë¢ÐÂIP½Å±¾!"
echo "ÇëÈ·ÈÏ'renew.ps'Îļþ´æÔÚ!"
wrong_pre=1
}
fi

if test -e "./linux1x"
then
cp ./linux1x /usr/local/bin
chmod 755 /usr/local/bin/linux1x
echo "ÈÏÖ¤³ÌÐò×¼±¸¾ÍÐ÷."
else
echo "ÎÞ·¨ÕÒµ½ÈÏÖ¤³ÌÐò!"
echo "ÇëÈ·ÈÏ'linux1x'Îļþ´æÔÚ!"
wrong_pre=2
fi
autorun_chinese #ÕâÀï¾ÍÊÇÖ¢½áËùÔÚ,°ÑÕâ¸öº¯Êý×¢½âµô¾Í²»»áÉú³É¿ª»ú×Ô¶¯ÔËÐгÌÐòÁË
case $wrong_pre in
0)
echo "°²×°³É¹¦."
;;
1)
echo "ȱÉÙ 'renew.ps'Îļþ."
;;
2)
echo "ȱÉÙ 'linux1x'Îļþ."
;;
*)
echo "°²×°³É¹¦."
;;
esac
mv hold_h3c.sh /usr/local/bin/ #Õâ¾ä»°Ò²Òª×¢½âµô,ÒòΪÎÒÃÇ°Ñcreate_holdº¯Êý×¢½âµôÁË,ËùÒÔ²»»áÉú³Éhold_h3c.sh,»áÌáʾÕÒ²»µ½Îļþ»òĿ¼
killall linux1x
/usr/local/bin/hold_h3c.sh &
/usr/local/bin/linux1x -d
}[/code]ÔÚÕâ¸öº¯ÊýÖÐ,ÓÐÒ»¾ä»°µ÷ÓÃÁËautorun_chineseº¯Êý,¾ÍÊÇ¿ª»ú×ÔÆô¶¯µÄ³ÌÐòÉú³Éº¯Êý,Ò²ÊÇ×¢½âµô
ÍùÏ»¹ÓÐÒ»¾äÊÇmv hold_h3c.sh /usr/local/bin/ ÒòΪ°Ñcreate_holdº¯Êý×¢½âµôÁË,ËùÒÔ´Ë´¦ÔËÐеÄʱºò»á˵ûÓÐÄǸöÎļþ»òĿ¼,ËùÒÔ°ÑÕâ¾äÒ²×¢½âµô.

ÕâÑùÀíÂÛÉϾͰѿª»ú×Ô¶¯ÔËÐгÌÐòºÍ×Ô¶¯ÖØÁ¬³ÌÐòÈ¥µôÁË,µ«ÊÇÕâÑùµÄ»°,½øµ½×ÀÃ滹ҪÊÖ¶¯ÁªÍø°¡,д¸ö×î¼òµ¥µÄshßÂ,¸ßÊÖĪЦ,±¾ÈËÐÂÊÖ.[code]
#!/bin/bash
/usr/local/bin/linux1x -d
ifup eth0
exit 0[/code]#ÎÒÓþø¶Ô·¾¶µÄÔ­ÒòÊÇ´Ë´¦ÓÃsudo linux1x -d ÃüÁî»áÏÔʾÕÒ²»µ½ÃüÁî,¶øÓÃsu -c 'linux1x -d'¾Í¿ÉÒÔÕÒµ½,µ«ÊÇÎÒ¿´ÎÒµÄPATHÀïÃæÃ÷Ã÷¾ÍÓÐÕâ¸ö·¾¶µÄ,¸ßÊÖ¸æËßÎÒÔõô»ØÊÂßÂ,
È»ºóÔÙÓÃÒ»¸öÆô¶¯Æ÷Á´½Óµ½Õâ¸öÎļþ¾Í¿ÉÒÔÁË,ÏÈÈÏÖ¤h3c,ÓÐʱºòÍø¿¨Ã»Ó줻î,È»ºóÔÙ¼¤»îÍø¿¨,ÊǼ¤»î״̬µÄ»°¾ÍÍ˳ö.
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 18 ÌõÆÀÂÛ

  1. PolyGram ÓÚ 2016-05-24 21:39:05·¢±í:

    ËäÈ»²»ÊǺÜÄÑÉõÖÁÊǺܷôdzµÄ¶«Î÷,µ«ÊÇÎÒºÜÓÐ×ÔºÀ¸Ð°¡

  2. 17898045 ÓÚ 2013-09-17 17:25:25·¢±í:

    ÕýÔÚÕÒÁË Ð»Ð»Äã°¡

  3. goldenrich ÓÚ 2013-09-10 14:35:17·¢±í:

    ´ËÌù±Ø»ð¡££¬Ö§³Ö

  4. ymygy ÓÚ 2013-02-08 11:49:51·¢±í:

    ·¹ýѧϰһÏÂ

  5. jjx0223 ÓÚ 2012-10-30 00:43:55·¢±í:

    ¸Ðл¥Ö÷µÄ·ÖÏí£¡£¡

  6. lingye_ll ÓÚ 2012-09-08 22:17:31·¢±í:

    Â¥Ö÷ºÃÇ¿´ó£¬Ä¤°Ý´óÉñ(6)m:b

  7. 418541233 ÓÚ 2012-08-01 23:52:29·¢±í:

    ÒªºÃºÃѧϰÒÔÏÂ

  8. brush1299u2 ÓÚ 2012-03-25 00:00:57·¢±í:

    ×ö¸öÅóÓÑ°É£¬¼ÓÎÒ

  9. gwssgc ÓÚ 2011-09-15 15:49:28·¢±í:

    ·¢ÏÖLZдµÄ¶«Î÷ÎÒ¾ÓÈ»¶¼ÄÜ¿´¶®£¡ËäÈ»¶Ô¸ßÊÖ²»Ëãʲôµ«ÊǶÔÎÒÕâ¸ÕÈëÃŵÄÒ²ÊǸö²»Ð¡µÄ¹ÄÀøÄØ ºÇºÇ¡£

  10. lanzby ÓÚ 2011-09-15 14:16:38·¢±í:

    лл·ÖÏí

  11. chaixcy ÓÚ 2011-09-14 23:25:59·¢±í:

    лл·ÖÏí£¬ÐÁ¿à

  12. lufenghxu ÓÚ 2011-08-02 10:48:33·¢±í:

    лл·ÖÏí£¬ÐÁ¿à

  13. klion26 ÓÚ 2011-06-16 21:22:59·¢±í:

    ллÀ²,ËÑlinuxÁªÐ£Ô°Íø¹ýÀ´µÄ ²»»áÅäÖð¡= =

  14. a49718 ÓÚ 2011-01-31 14:32:43·¢±í:

    Éî¶ÈµÄÌùËøÁË£¬ÎÒÄǸö¿ÉÒÔÓã¬ÎұȽÏϲ»¶×Ô¼ºÒªÔÙµÇÉÏÈ¥¡£²»¹ý»¹ÊÇлÁË£¬Áô×ÅÒÔºóÒªÓÃ×ö²Î¿¼¡£

  15. wuren110 ÓÚ 2011-01-28 14:19:23·¢±í:

    ·Ç³£µÄ²»´í

  16. alick ÓÚ 2011-01-22 13:39:10·¢±í:

    ÒýÓÃ:
    ÎÒÓþø¶Ô·¾¶µÄÔ­ÒòÊÇ´Ë´¦ÓÃsudo linux1x -d ÃüÁî»áÏÔʾÕÒ²»µ½ÃüÁî,¶øÓÃsu -c 'linux1x -d'¾Í¿ÉÒÔÕÒµ½,µ«ÊÇÎÒ¿´ÎÒµÄPATHÀïÃæÃ÷Ã÷¾ÍÓÐÕâ¸ö·¾¶µÄ,¸ßÊÖ¸æËßÎÒÔõô»ØÊÂßÂ,


    ¿´¿´ÕâÁ½¸öÃüÁîÊä³öÓкβ»Í¬£º
    sudo echo $PATH
    ºÍ
    su -c'echo $PATH'

  17. lykginy ÓÚ 2011-01-13 18:11:25·¢±í:

    ?÷áÓÐ×ÔºÀ¸Ð£¬¾Í?Äã?һϰÉ

  18. ouc_wentao ÓÚ 2011-01-13 16:00:11·¢±í:

    [i=s] ±¾Ìû×îºóÓÉ ouc_wentao ÓÚ 2011-1-20 15:38 ±à¼­ [/i]

    °¥,Óöµ½ÎÊÌ⻹ÊÇÒª×Ô¼º½â¾ö°¡,ºÇºÇ ×Ô¼º¶¥Ò»ÏÂ×Ô¼º°¡
    ËäÈ»²»ÊǺÜÄÑÉõÖÁÊǺܷôdzµÄ¶«Î÷,µ«ÊÇÎÒºÜÓÐ×ÔºÀ¸Ð°¡(6)m:b