How To: Autoexec.bat in Linuxどのように: Autoexec.batファイルにLinux
Autoexec.bat is a legacy file in Windows which is executed every time you start Windows. Autoexec.batファイルは、従来のファイルをWindowsを起動するたびにこれを実行します。 Commands you want to run with startup of windows, and applicable to all users, are added to autoexec.bat.コマンドを実行するとスタートアップしたいのWindowsでは、すべてのユーザーに適用されると、 Autoexec.batファイルが追加されました。 Let’s see how you can do the same with Linux.どれどれには、同じ方法でLinuxすることができます。
First of all Linux provides a powerful mechanism to create startup scripts which can be used for complex purposes.まず第一にリナックスでは、スタートアップスクリプトを作成する強力なメカニズムが複雑な目的に使用される。 For simple scripts to be included during startup like using autoexec.bat on windows, you have a simple alternative:単純なスクリプトを使用してAutoexec.batファイルのようなスタートアップ中に含まれるWindows上では、お持ちの単純なもう一つの選択:
Include your scripts in /etc/rc.local file.含まれてあなたのスクリプトを/ etc / rc.localファイルです。
For example to add a default load balancing route for our outgoing traffic using our dual internet connections (ADSL broadband connections from BSNL & Tata Indicom) here are the lines I included in rc.local file:たとえば、デフォルトの負荷分散を追加する発信トラフィックのルートを当社のインターネット接続を使用して、デュアル分( ADSLブロードバンド接続からのBSNL & Tata Indicomの)ここでは、私に含まれる行をrc.localファイル:
ip route add 192.168.1.0/24 dev eth1 src 192.168.1.10 table bsnl IPルートテーブルに追加192.168.1.0/24 devよりeth1 src 192.168.1.10のBSNL
ip route add default via 192.168.1.1 table bsnl IPルートテーブルに追加デフォルト経由で192.168.1.1のBSNL
ip route add 192.168.0.0/24 dev eth2 src 192.168.0.10 table tata IPルートテーブルに追加192.168.0.0/24 devよりeth2 src 192.168.0.10タタ
ip route add default via 192.168.0.1 table tata IPルートテーブルadd default via 192.168.0.1コマンドタタ
ip rule add from 192.168.1.10 table bsnl テーブルのBSNLから192.168.1.10のIPルールを追加
ip rule add from 192.168.0.10 table tata タタ192.168.0.10テーブルからのIPルールを追加
ip route add default scope global nexthop via 192.168.1.1 dev eth1 weight 1 nexthop via 192.168.0.1 dev eth2 weight 4 デフォルトのスコープのグローバルIPルートを追加nexthop経由で192.168.1.1 devよりeth1経由での重量1 nexthop 192.168.0.1 devよりeth2重量4
Filed under提出されて Fedora 7 7ソフト帽 , 、 Fedora Core 6 Fedora Coreの6 , 、 Headline Newsニュースの見出し , 、 How Toどのように , 、 Linuxリナックス , 、 Linux Migration Linuxへの移行 , 、 Tech Note技術のノート , 、 Webウェブ , 、 Web Hostingウェブホスティング , 、 Web Services Webサービス | |
| |
RSS 2.0 RSS 2.0を | |
Trackbackトラックバック this Article |この記事|
Email this Article電子メールこの記事
You may also like to readを読むようにすることも可能 |




