2012-09-30

Ubuntu -- Learning

@How to configure network setting to use static IP address
sudo vi /etc/network/interfaces


 1 auto lo
 2 iface lo inet loopback
 3
 4 auto eth0
 5 iface eth0 inet static
 6 address 192.168.0.1 # 固定 IP 位址
 7 netmask 255.255.255.0   # 網路遮罩
 8 gateway 192.168.0.254 # 預設閘道

 sudo /etc/init.d/networking restart #重啓網路服務

@How to configure DNS server setting
sudo vim /etc/resolv.conf


 1# DNS of Google
 2#nameserver  8.8.4.4
 3#nameserver  8.8.8.8
 4
 5# DNS of HiNet
 6#nameserver  168.95.1.1
 7#nameserver  168.95.192.1

sudo /etc/init.d/networking restart #重啓網路服務

@How to install LAMP
sudo apt-get install tasksel
sudo  tasksel

#select LAMP to install
$sudo vi /var/www/info.php #to vi info.php

<?php
phpinfo();
?>
$sudo /etc/init.d/apache2 restart  #to restart Apache service
Visit http://192.168.0.1/info.php

@How to install phpmyadmin
sudo  apt-get  install  phpmyadmin

http://ip/phpmyadmin #to test


沒有留言:

張貼留言