Как настроить проводную сеть в андроиде
При установке операционной системы андроид на ноутбук, ПК или виртуальную машину, может понадобиться настроить проводную сеть.
Например, если в виртуальной машине сеть настроена как “Сетевой мост”.
seen from Netherlands
seen from United Kingdom

seen from Canada
seen from United States

seen from Netherlands
seen from Netherlands
seen from Canada
seen from Chile

seen from United States
seen from Italy
seen from Iraq
seen from United States
seen from Türkiye
seen from China

seen from United States
seen from China

seen from Belgium

seen from Germany
seen from Italy
seen from China
Как настроить проводную сеть в андроиде
При установке операционной системы андроид на ноутбук, ПК или виртуальную машину, может понадобиться настроить проводную сеть.
Например, если в виртуальной машине сеть настроена как “Сетевой мост”.
[Arch Linux]netcfgがビルドに失敗する[AUR]
まず、俺が利用している環境は以下の通りだ。
Arch Linux 64bit
zsh
MATE(デスクトップ環境)
X.org
今日、 Arch Linux の kernel を 3.8.11 にアップグレードした。 その時に AUR にある netcfg のバージョンも上がったんだけど、それをアップグレードする過程で一つの問題が起こった。
${DESTDIR}/usr/share/man/man5 というディレクトリが存在しない
と言うエラーが発生した。 (先に言っておくと、俺はこの問題を、ソースを自らダウンロードし、 install -d の中で該当する行を全部修正した上で make install を直接実行することで解決した。 賢いやり方ではないけどね。)
通常、 make によって行われる install -d という命令は、パスを辿ってたどり着いた先に指定したディレクトリを作る。 パスを辿る過程で見つからないディレクトリがあれば、そのディレクトリを先に作る。 その命令は Makefile 中で
install -d ${DESTDIR}/path/to/{hoge,fuga} (DESTDIR にはソースのビルド先の prefix が入る。 中身はパッケージ中に用意されたインストール用のディレクトリ構成だ。)
と書かれる。 これは /path/to というディレクトリの中に、 hoge ディレクトリと fuga ディレクトリを同時に作るというものだ。 つまり、
install -d ${DESTDIR}/path/to/hoge install -d ${DESTDIR}/path/to/fuga
この二つの命令の糖衣構文だ。 この命令の結果、 man5 ディレクトリが見つからなくて困ってるというのだ。
AUR にあるソースパッケージをインストールする yaourt や makepkg といったコマンドは、ダウンロードしたソースのディレクトリ構成を /tmp/yaourt-***(***はユーザ名) といった具合のディレクトリの中に再現するんだけど、俺は man5 があるはずのところで何が起きてるのか気になって、その中身を探ってみたんだ。 その結果がこれだ。
$ ls (後略) {man5, man8}
一瞬何が起こったのかわからなかった。 Makefile を見ると、確かに manpages や docs を生成する過程で install -d ${DESTDIR}/usr/share/man/{man5,man8} といった命令があった。 でも今回のアップグレードには make のパッケージは含まれていなくて、今になって make 中の命令で失敗に至る原因がわからない。 (make に仕様変更が入ったのかと思って、 Arch の公式リポジトリのウェブを覗いてみたんだけど、 make は数ヶ月以上前からバージョンが変わっていなかった。 それと、他のパッケージについては無事にインストールが成功している)
依存関係のある bash や glibc については、アンインストールなんかは行なっていない。 (Archをインストールする時に pacstrap /mnt base base-devel してそれっきりだ)
もうこうなると俺には何が原因でこうなってるのかさっぱりわからない。 誰か原因を教えてくれ〜〜〜
※ちなみに、パッケージの更新は割とまめにチェックしていて、カーネルのバージョンが上がる度に毎回 yaourt -Syua してるよん。
P.S. yaourt の実行中に /tmp に置かれた Makefile を編集して再度ビルドし直そうとしたんだけど、 yaourt の奴、既にソースがあろうがお構いなしにダウンロードし直すんだよな… :(
追記:どうやら、ひと月ほど前からnetctlという名前に置き換えられた模様。同様のものが欲しい時にはこっちをインストールしてくれということらしい。netctl is now in [core]
Net Install
I did a net (re)install yesterday. Personally, I think that net install is better than installing off of a CD media.
When installing through CD media, base installation can take some time. After which you'd have to do a full system update which will download about ~100MB worth of packages which, again, could take some time. Also, when installing through the CD media, a lot of other packages get installed by default (which you probably don't need e.g. ndiswrapper) depending on the ISO you are using (I used Archboot 2011-02).
A net install is faster because it will download the latest packages from the Arch mirrors first before installing thus eliminating the need to do a full system update after install. And during a net install, you can choose what packages get installed (well, it's the same as with the CD media but I noticed that the CD media ISO I used installed many other packages). If you want a base install, choose base and devel packages only during install.
Of course, you will need to have a live internet connection when using the net install method of installing Arch Linux.
Once I got the base (and devel) system installed, I needed to add a few packages to manage my networking activities.
First, upgrade the pacman database management system by issuing the ff. command:
# pacman-db-upgrade
This command installs the necessary tools needed to issue ifconfig related commands:
# pacman -S net-tools
This command installs the necessary tools needed for the netcfg command (of course, this is a personal choice of network management; choose one that you prefer):
# pacman -S netcfg
Then, proceed with installing the extras depending on your needs.
Connecting to a Network using Netcfg
Now that my networking interfaces are up and about, I am ready to connect to a network. In my case, I chose to try out connecting via WiFi because a wired connection isn't very feasible. And connecting via WiFi is a way to go since I'm using a laptop.
Again, the Arch Wiki is a very, very good place to start looking for documentation. I followed this wiki to get started on wireless connection. As it is with linux, there are so many ways to skin a cat. In this case, I skinned the cat using the Netcfg*** way.
It's really simple to set it up. In command line, issue the ff. command to see the existing template profiles:
# ls /etc/network.d/examples
In my case, I am going to connect to a WPA-Personal enabled router so the profile to use is wireless-wpa. All I do is copy this profile to a new one (I used the WiFi name of the network I am connecting to as my profile name; it is not mandatory but I personally feel it will help me remember what network I am connecting to). I issue the ff. command in the command line:
# cp /etc/network.d/examples/wireless-wpa /etc/network.d/wificon
Here wificon is the name of the profile. I need to edit this to reflect the network name and passkey. Note that the wireless network name may not be the same as the profile name so make sure that you are using the correct name (you can issue the iwlist wlan0 scan to see the network id).
Edit the file and change the values of ESSID and KEY accordingly (put these values inside the single quotes). Issue the ff. command to edit the profile:
# nano /etc/network.d/wificon
Edit the values accordingly:
ESSID='wificon' KEY='passkey'
Save the profile file and issue the following command to connect:
# netcfg wificon
If all goes well, then you are connected to your wireless network! Since the profile is saved as a plain text file, it is advised to make the root user be the only one to see it's contents. To do this, issue the ff. command:
# chmod 0600 /etc/network.d/wificon
To check if you are connected to the internet, issue the ff. command:
# ping -c 3 www.google.com
If it is able to ping the site, then you're all set!
*** Netcfg was installed along with the system installation using Archboot image.