Saturday, March 24, 2012

Chuyển Ubuntu Server từ DHCP sang Static

Mặc định Ubuntu Server để cấu hình DHCP mà lại không có giao diện GUI để thao tác. Phải làm sao đây? Đã là Linux thì phải command line mới chuẩn.

Ta làm như sau:

1. Sửa file cấu hình mạng:
sudo vi /etc/network/interfaces

2. Thường thì các trong file cấu hình này sẽ để mặc định như sau 
auto eth0
iface eth0 inet dhcp 

Ta cần sửa thành:
auto eth0
iface eth0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1 

Nhớ thay địa chỉ IP cho phù hợp nhé.

3.Thay đổi DNS cho chuẩn  google (8.8.8.8 hoặc 8.8.4.4)
sudo vi /etc/resolv.conf 

4. Xóa gói dhcp-client hoặc dhcp3-client
sudo apt-get remove dhcp-client 
hoặc 
dhcp3-client dhcp3-common\nPin: release\nPin-Priority: -10" | sudo tee /etc/apt/preferences
sudo aptitude remove dhcp3-client dhcp3-common

5. Thêm cái này nữa cho chắc cú:
sudo chattr +i /etc/network/interfaces

hoặc


cd /etc/udev/rules.d/
mv 70-persistent-net.rules 70-persistent-net.rules.org
touch 70-persistent-net.rules

kill dhcp process for quick :))

sudo kill $(ps -aux | grep dhc | grep eth0 | awk '{print $2}')


6. Restart lại dịch vụ mạng:

sudo /etc/init.d/networking restart 

Hi vọng là ngon !. Nếu không được ta lại google tìm guide vậy :-)

MinhPhuc 



Saturday, February 4, 2012

Uninstall / Remove Any Installed Software


GUI Package Management Tool

synaptic is graphical management tool of software packages. It allows you to perform all actions of the command line tool apt-get in a graphical environment. This includes installing, upgrading, downgrading and removing of single packages or even upgrading your whole system.
Just click on System > Administration > Synaptic Package Manager
Now you can select any package and click on Mark for Removal popup meni. You can also start GUI tool from command line, enter:
$ synaptic &

Command Line Package Management Tool

apt-get is the command-line tool for handling packages. It is used for adding / removing / updating packages.

Uninstall / Delete / Remove Package

Just use the following syntax:
sudo apt-get remove {package-name}
For example remove package called mplayer, enter:
$ sudo apt-get remove mplayer
Remove package called lighttpd along with all configuration files, enter:
$ sudo apt-get --purge remove lighttpd
To list all installed package, enter:\
dpkg --list
dpkg --list | less
dpkg --list | grep -i 'http'

How to remove/uninstall Vmware Products


How to remove/uninstall Vmware Products

There are many people get difficulty on remove/uninstall the Vmware products.For examples, Vmware Player, Vmware Station ..etc.Now I would like to tell you one simple way to remove/Uninstall every Vmware products.
1.Open there terminal and type vmware-installer -l . This command will list all of Vmware products was installled in your computer.
xxx@pc:~$ vmware-installer -l
Product Name           Product Version
====================== ====================
vmware-player          3.1.0.261024
tam@pc:~$
2.Then remove / uninstall whiich product that you want.For example, I want to uninstalll Vmware player, then I type.
xxx@pc:~$ sudo vmware-installer -u vmware-player
3.And following the graphic instructions :D

Thêm máy in mạng trong win 7 x64

Trong một số trường hợp không thể add được máy in mạng vào win 7 x64, phải làm sao đây?

Bước 1: Click Start->Devices and Printers
Bước 2: Bấm phím phải chọn Add Printer -> Add local printer -> LocalPort -> thêm địa mạng của máy in
Ví dụ: \\192.168.1.11\HPLaserJ
Bước 3: Dùng window update để nhận đúng driver

Cảm nhận sự thành công nào

Tuesday, January 31, 2012

Converting VS2010 Solution to VS2008

If you are working with VS 2010 (any Edition) and cannot open your 2010 solution on VS 2008 then just follow these 3 Steps:
 
For .sln:
 
1. Open the solution file in your favorite text editor (ex: notepad++).
2. Find the Following:
Microsoft Visual Studio Solution File, Format Version 11.00.
# Visual Studio 2010. 
Replace with:
Microsoft Visual Studio Solution File, Format Version 10.00. (I)
# Visual Studio 2008. (II, optinal)
 
For .csproj/vbproj:
 
1. Open project file in your favorite text editor (ex: notepad++).
2. Find the Following:
.
Replace with:
. (III)



---------------------------
Microsoft Visual Studio
---------------------------
Unable to read the project file 'XXX.csproj'. 
 
C:\Project path\XXX.csproj(89,11): The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the  declaration is correct, and that the file exists on disk.

---------------------------

To fix this error just change the VS version(v10.0 to v9.0) in your .csproj/vbproj file, that's all.