Search This Blog

Ubuntu Tips

How to set the Proxy - mahidol Internet

 

Acquire::http::Proxy "http://user:password@proxy-sa.mahidol:8080/";
Acquire::https::Proxy "https://user:password@proxy-sa.mahidol:8080/";
Acquire::ftp::Proxy "ftp://user:password@proxy-sa.mahidol:8080/";

 

#################################################   

 

การติดตั้งแพ็กเก็จแบบออนไลน์ ด้วย apt-get

Credit จาก http://kmblog.rmutp.ac.th/suriya.c/?p=27

by suriya.c on Jul.02, 2010, under Linux
การติดตั้งแบบออนไลน์คือการดาวน์โหลด และติดตั้งแพ็กเก็จจากเซิร์ฟเวอร์ที่ให้บริการ หรือจาก CD แต่ไม่ได้เข้าถึงไฟล์ .deb โดยตรง เหมือน dpkg     ส่วนประกอบสำคัญที่ทำให้เราสามารถติดตั้งโปรแกรมต่างๆ ได้นั่นก็คือไฟล์ที่ระบุ Server ปลายทางที่ให้บริการ นั่นก็คือไฟล์ /etc/apt/sources.list  ซึ่งจะมีมาให้แล้วตอนที่เราติดตั้ง ubuntu ก่อนที่จะใช้งานหรือติดตั้งแพ็กเก็จใดควรจะเรียกใช้คำสั่ง apt-get update เพื่ออัพเดทฐานข้อมูลของแพ็กเก็จให้เป็นปัจจุบัน
ในการใช้งาน apt-get install  เป็นการดาวน์โหลดไฟล์จากเซิร์ฟเวอร์ที่ให้บริการ หรือจาก CD ติดตั้ง ทั้งนี้ขึ้นอยู่กับไฟล์ /etc/apt/sources.list  สำหรับการดาวน์โหลดไฟล์ .deb จะมีที่เก็บไฟล์อยู่ที่  /var/cache/apt/archives/  ซึ่งสามารถเก็บเอาไว้ติดตั้งด้วยคำสั่ง dpkg ได้   ถ้าแพ็กเก็จที่เราได้ติดตั้ง และลบออกไปแล้ว  และต้องการที่จะติดตั้งใหม่อีกครั้งถ้ายังมีไฟล์อยู่ใน /var/cache/apt/archives/  ก็จะไม่ดาวน์โหลดใหม่
การใช้งานคำสั่ง apt-get
 sudo apt-get update  อัพเดทฐานข้อมูลของแพ็กเก็จทั้งหมด รันคำสั่งนี้เมื่อ เปลี่ยนแปลงไฟล์ /etc/apt/sources.list

sudo apt-cache search   ค้นหาแพ็กเก็จที่ต้องการติดตั้ง
sudo apt-get install   ดาวน์โหลด และติดตั้งแพ็กเก็จ
sudo apt-get remove   ลบแพ็กเก็จที่ติดตั้งไปแล้ว
sudo apt-get -d install   ดาวน์โหลดแพ็กเก็จเก็บไว้ใน /var/cache/apt/archives แต่ไม่ติดตั้ง
sudo apt-cache show   แสดงข้อมูลรายละเอียดของแพ็กเก็จ

sudo apt-get upgrade  เชคดูว่าแพ็กเก็จที่ติดตั้งไปทั้งหมดมีเพ็กเก็จใดมีการอัพเดทบ้าง ต่อจากนั้นก็จะถามว่าต้องการดาวน์โหลดและติดตั้งหรือไม่

sudo apt-get dist-upgrade  อัพเกรดระบบทั้งหมด เช่นการเปลี่ยนเวอร์ชันจาก 7.10 เป็น 8.04

sudo apt-get autoclean  ลบแพ็กเก็จที่ดาวน์โหลดมาไม่สมบูรณ์ หรือแพ็กเก็จที่ไม่ได้ใช้ติดตั้งแล้ว

sudo apt-get clean  ลบทุกแพ็กเก็จที่ดาวน์โหลดมาเก็บอยู่ที่ /var/cache/apt/archives

sudo apt-get -f install  กรณีที่มีความผิดพลาดเกิดขึ้นในขณะที่กำลังติดตั้งแพ็กเก็จ เช่น สั่งยกเลิก หรือ ไฟฟ้าดับ
แล้วใช้คำสั่ง apt-get install แล้วมีข้อความ error สามารถใช้คำสั่ง apt-get -f install ช่วยแก้ปัญหาได้
sudo apt-config -v  แสดงเวอร์ชัน และรายละเอียดของ APT utilities


################################################################################

การติดตั้ง VLC

sudo apt-get update
sudo apt-get install vlc 


################################################################################

การแก้ Could not open lock file
sudo rm /var/lib/dpkg/lock

### Could not get lock /var/lib/apt/lists/lock
ps aux | grep apt | grep -v 'grep'
kill PID


################################################################################

การถอน Ubuntu ออกจาก Window 7 หรือ ต่ำกว่าแบบสมบูรณ์

Credit: http://askubuntu.com/questions/139966/how-can-i-add-an-entry-for-ubuntu-to-the-windows-7-boot-menu

 
เครื่องที่เป็น Window ให้ทำการลงโปรแกรม EasyBCD version ล่าสุด ซึ่งโปรแกรมต้องการ .net framework ด้วย ดังนั้นอาจต้องมีการต่อ internet เพื่อทำการ download .net framework

เครื่องที่ทำการลง UNIX จะมีหน้าจอ grub มาให้โดยอัตโนมัติ

##############################################################################

การถอน UNIX
1. เลือก BCD deployment
2. เลือก Install the Window Vista/7 bootloader to the MBR
3. เลือก Write MBR
4. Restart then Enjoy!!!!
##############################################################################
การเพิ่ม entry ของ UNIX ลงบนเครื่องที่มี Window และ EasyBCD
The procedure which has worked for me is outlined below.

Did you perform the install of the NeoGrub bootloader in step (3)? If NeoGrub is installed then there will be a \NST folder on your C: drive.

I think this step is sometimes left out of guides for setting up EasyBCD.

Using EasyBCD to Boot to GRUB from Windows Boot Menu

1.Start Windows and install the free version of EasyBCD.
2.Open the EasyBCD program and select Add New Entry from the sidebar on the left.
3.Select the rightmost tab, NeoGrub, under "Operating Systems" and click the Install button.
Note: This adds the NeoGrub bootloader code to your C:\ folder. If the install worked correctly you will see the file C:\NeoGrub and the folder C:\NST.
4.Select the Linux/BSD tab. Choose GRUB2 as the type of the entry and, optionally, edit the name of the entry you are about to add to the Windows Boot menu.
5.Click the Add Entry button to add an entry to boot Linux (GRUB menu) to the Windows boot menu.
Select Edit Boot Menu from the sidebar to review your changes.

Note: You can delete the entry for NeoGrub Bootloader if you wish.
You need the bootloader, but you do not need a boot menu entry for it unless you are using it in some other way.
6.Save your changes and reboot. When the Windows boot menu appears, select the EasyBCD entry you added to boot Linux. You should see something similar to the text below.
7.Then the GNU GRUB boot menu should appear.

############################
### Install flash plugin to Firefox
From "http://forums.adobe.com/thread/1066869"

There is a procedure of Manual Installation of Adobe Flash Player on Ubuntu, follow these steps :

  1. Open http://get.adobe.com/flashplayer/otherversions/
  2. Choose Linux 32-bit on Step 1
  3. Choose Flash Player 11.2 (tar.gz) on Step 2, download the file
  4. Once download is complete, right click on the flie (tar.gz) and click on "Extract here"
  5. Launch Terminal (Keyboard Shortcut : Ctrl+Alt+T)
  6. Go to that location where you extracted the file
  7. Run this command : sudo mv libflashplayer.so \/usr/lib/firefox-addons/plugins
  8. Launch Mozilla Firefox and check do you have Adobe Flash Player








################################################################################



No comments:

Post a Comment