Monday, July 25, 2011

Disk full error message on Skype

Disk full error message on Skype
I got it one time and I solved like this:
I exit Skype then delete this folder C:\user\nguyen\app data\roaming\skype\nhakhtn
note: nguyen is my computer account. nhakhtn is my skype account
then start Skype again.
That's it.

Sunday, December 23, 2007

Clean install packages for save your hard disk

After you install new software by "sudo apt-get install .... ", packages need by software will be downloaded and archived in /var/cache/apt/archive, and those occupy space hard disk. How to clean up those?
- You can remove them with root permittion: sudo rm /var/cache/apt/archive/*.deb
- sudo apt-get autoremove

Friday, December 7, 2007

Installing LAMP on Ubuntu 7.10

Lately I’ve been using ubuntu 7.10 for all my projects/daily work.
As a web developer i should have LAMP on my machine and now i would guide you through installing it on yours.

This guide is divided into 3 steps: installing/tesing Apache, PHP and finally MySQL.

Lets start with Apache:
1. Open the terminal (we will be using it through most of my guide) from Applications > Accessories > Terminal
2. Install apache2 using apt-get by typing the following
sudo apt-get install apache2

Note that you should know the root password.
Now everything should be downloaded and installed automatically.
To start/stop apache2 write:
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop

Your www folder should be in: /var/www/

If everything is OK you should see an ordinary HTML page when you type: http://localhost in your firefox browser

Finished with Apache ? lets conquer PHP:
1. Also in terminal write:
sudo apt-get install php5 libapache2-mod-php5

or any php version you like
2. restart apache
sudo /etc/init.d/apache2 restart

This is it for PHP :D
Wanna test it ? Just create an ordinary PHP page in /var/www/ and run it.
Example:
sudo gedit /var/www/test.php

and write in it: < ?php echo "Hello World"; ?>

Now run it by typing http://localhost/test.php in firefox… You should see your ” Hello World ”

66 % is over, lets continue to installing MySQL:
1. Again and again in terminal execute:
sudo apt-get install mysql-server

2. (optional) If you are running a server you should probably bind your address by editing bind-address in /etc/mysql/my.cnf and replacing its value (127.0.0.1) by your IP address
3. set your root password (although mysql should ask you about that when installing)
mysql> SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’xxxxxx’);

4. Try running it
mysql -uroot -pxxx

where xxx is your password.
Note: You can install PHPMyAdmin for a graphical user interface of MySQL by executing
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

5. restart apache for the last time
sudo /etc/init.d/apache2 restart

Congratulions your LAMP system is installed and running :D
Happy Coding

//Jo

UPDATE:
Due to the large number of people emailing about installing/running phpmyadmin.
Do the following:
sudo apt-get install phpmyadmin

The phpmyadmin configuration file will be installed in: /etc/phpmyadmin
Now you will have to edit the apache config file by typing
sudo vi /etc/apache2/apache2.conf

and include the following line:
Include /etc/phpmyadmin/apache.conf

Restart Apache
sudo /etc/init.d/apache2 restart

Another issue was making mysql run with php5
First install these packages:
sudo apt-get install php5-mysql mysql-client

then edit php.ini and add to it this line : ” extensions=mysql.so” if it isnt already there
sudo vi /etc/php5/apache2/php.ini

Restart Apache
sudo /etc/init.d/apache2 restart

Hope this helps :)

Popularity: 44%

From : http://joeabiraad.com

Friday, September 28, 2007

Cài Ubuntu từ a->z (tiep theo)

8. Cài startdic từ điển đa ngôn ngữ.
$ ./configure

gặp lỗi: configure: error: Package requirements (libgnomeui-2.0 >= 2.2.0) were not met:
No package 'libgnomeui-2.0' found
sửa:
$ sudo apt-get install libgnomeui-dev
config lại:
./configure
make
sudo make install

Tạo thư mục chứa file từ điển
$ mkdir /home/nha/.stardict (nha là tại vì username của tôi là nha các bạn có thể thay bằng username của các bạn)
$ mkdir /home/nha/.stardict/dic
$ cd /home/nha/.stardict/dic
$ wget http://jaist.dl.sourceforge.net/sourceforge/stardict/stardict-dictd_anh-viet-2.4.2.tar.bz2
$ wget http://nchc.dl.sourceforge.net/sourceforge/stardict/stardict-dictd_viet-anh-2.4.2.tar.bz2
$ tar -xjvf stardict-dictd_anh-viet-2.4.2.tar.bz2
$ tar -xjvf stardict-dictd_viet-anh-2.4.2.tar.bz2

Vậy là xong phần cài.
Tạo icon ở trên desktop và trên taskbar.
a. Tạo trên desktop:
click chuột phải ngoài màn hình desktop. Chọn create Launcher, name bạn gõ "từ điển" command bạn gõ "stardict" xong ok
b. Tạo trên taskbar
click chuột phải vào taskbar chọn Add to panel chọn tiếp custom application launcher làm tương tự tạo icon bên desktop.
(phần hình cho icon bạn có thể browse từ thư mục usr/local/share/stardict/pixmap)

Thursday, September 20, 2007

Cài Ubuntu từ a->z

Mình đang cài lại Ubuntu, nói chung là cài từ đầu, thế nên mình viết bài nầy để các bạn đang muốn chuyển sang sử dụng Ubuntu có thể làm theo một cách tuần tự dễ dàng và có một máy tính được cài đặt hoàn chỉnh.

Về phần cài Ubuntu thì mình khỏi nói lại, chắc các bạn cũng đã cài được rồi, mình sẽ bắt đầu vào phần cấu hình, cập nhật và cài đặt các phần mềm cần thiết.

(bài viết nầy sẽ được viết dần dần và khi mình cài xong cũng là lúc hoàn thành bài viết nầy :-))

1. Cập nhật Ubuntu.
- Lựa chọn nguồn cài đặt.
Sau khi cài đặt xong, các bạn click vào menu System->Administration->Software Sources. Trong thẻ Ubuntu software, phần Download from bạn chọn Other... và sau đó chọn japan->ftp.ecc.u-tokyo.ac.jp. Thực ra thì bạn có thể chọn Select best Server nhưng nói chung là nó không chính xác lắm. Sau một thời gian sử dụng mình thấy server Nhật software đầy đủ và nhanh nhất. Khi bạn chọn tuỳ chọn nầy xong máy tính của chúng ta sẽ cập nhật lại nguồn các gói phần mềm cài đặt .v.v...
- Cập nhật Ubuntu:
Bạn để ý thấy góc phải trên của màn hình Desktop chúng ta có một biểu tượng màu cam, rê chuột vào nó sẽ xuất hiện một yêu cầu cập nhật lại hệ điều hành. Click vào đó và cập nhật ngay nhé, việc nầy hơi mất thời gian, có thể là mấy tiếng đồng hồ tuỳ theo số lượng phần mềm bạn cần update.

2. Cài xvnkb để gõ tiếng Việt
Bạn mở terminal lên (Applications->Accesories->terminal) bạn nên click chuột phải lên nó và click chọn: Add this launcher to panel, nó sẽ xuất hiện trên top panel cho bạn lần sau bạn chỉ cần click vào nó là mở được terminal.
Sau khi mở terminal bạn gõ các dòng sau vào:
$ sudo apt-get install build-essential
$ sudo apt-get install xorg-dev

Hai lệnh nầy dùng để cài thư viện cần thiết cho việc biên dịch và các thư viện để xvnkb hoạt động được, hai lệnh nầy cũng chạy khá là lâu đó nhé các bạn, xin hãy kiên nhẫn (bạn có thể để máy tính ở đó cho nó chạy còn bạn thì kiếm gì thư giãn ;-).
Tải xvnkb về vào link http://xvnkb.sourceforge.net/xvnkb-0.2.9a.tar.bz2
giải nén
$ cd Desktop/ (chuyển vào thư mục Desktop vì chúng ta download về bằng firefox sẽ lưu file vàoDesktop)
$ tar -xjvf xvnkb-0.2.9a.tar.bz2
$ cd xvnkb-0.2.9a/

$ ./autogen.sh
$ gedit config.h


sửa file config.h lại như sau:

#define __VK_CONFIG_H
#define VK_CHECK_SPELLING
#define VK_USE_EXTSTROKE
#define VK_NEED_UCHAR

(bỏ -e ở đầu file đi)

$ ./configure
$ make
$ sudo make install


khởi động xvnkb:

$ xvnkb

Cấu hình: click chuột fải lên biểu tuợng xvnkb góc dưới phải màn hình (chọn charset = unicode, input method là vni)
để xnvkb tự chạy khi khởi động trong terminal gõ:
$ gnome-session-properties
thêm một tác vụ mới vào (cái nầy tự mò nhé các bạn)
(khi khởi động máy lại bạn cũng phải cấu hình lại cho xvnkb, nó mặc định là off)

3. Cài flash player
Mở firefox và gõ vào tuoitre.com.vn
sẽ có một thông báo là bạn cần cài flug-in để play file flash bạn chọn install plug-in và theo hướng dẫn để cài flash player.

4. Cài thêm fonts

Cài microsoft font.
$ sudo apt-get install msttcorefonts
$ sudo fc-cache -fv


Cài font vni 8 bit (vni-times....)
Tải các font vni-times.ttf .... từ trang web http://www.dpi.hochiminhcity.gov.vn/vie/webappDN/fonts/index.htm rồi copy vào một thư mục nào đó ví dụ vni_fonts
sau đó copy thư mục nầy vào /usr/share/fonts
$ sudo cp -R Desktop/vni_fonts /usr/share/fonts
cập nhật lại font
$ sudo fc-cache -fv

5. Đọc và ghi dĩa cứng định dạng ntfs : bạn có nhu cầu đọc và ghi dữ liệu từ các ổ đĩa ntfs thì phải làm thế nào? Rất đơn giản chỉ cần 2 bước:
Bước 1 vào terminal gõ:
$ sudo apt-get install ntfs-config
Bước 2: menu Applications > System Tools > NTFS Configuration Tool. Sẽ có một màn hình yêu cầu bạn nhập mật khẩu của bạn vào, rồi đến cửa sổ cấu hình rất đơn giản. Đánh dấu vào tuỳ chọn bạn thấy cần rồi nhấn OK là xong (internal device là hỗ trợ cho ổ cứng gắn trong, bao gồm những phân vùng Windows trên đĩa cứng của bạn, external device là cho thiết bị gắn ngoài như ổ cứng di động, USB…). Từ giờ bạn có thể làm việc thoải mái với phân vùng NTFS rồi.
Chú ý: Nếu trước đó Ubuntu chưa nhận diện phân vùng NTFS thì có thể sẽ xuất hiện thêm một cửa sổ liệt kê danh sách những phân vùng NTFS có trên máy (mà chưa được kết nối (mount)) để bạn xác nhận có muốn kết nối và sử dụng phân vùng đó không. Bạn cứ làm theo những tuỳ chọn mặc định là được.

6. Nghe nhạc mp3, wma, wmv ....
$ sudo apt-get install ubuntu-restricted-extras

$ sudo gedit /etc/apt/sources.list
Thêm hai dòng
deb http://medibuntu.sos-sts.com/repo/ feisty free non-free
deb-src http://medibuntu.sos-sts.com/repo/ feisty free non-free
Save và đóng file lại.

chạy các dòng sau
$ sudo apt-get update
$ sudo apt-get install w32codecs
$ sudo apt-get install libxine-extracodecs gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-pitfdll


cuối cùng nghe nhạc: applications->sound & video -> Movie player

cài xmms:
$ sudo apt-get install xmms xmms-skins xmms-wma
sử dụng: applications->sound & video ->xmms
cài amarok
$ sudo apt-get install amarok
sử dụng: Applications -> Sound & Video -> amaroK

7. cài plug-in cản quảng cáo và play flash của trình duyệt (đỡ tốn tiền internet), làm đẹp firefox

Cài block ads plus vào https://addons.mozilla.org/en-US/firefox/addon/1865 nhấn install now.
Cài flash block vào https://addons.mozilla.org/en-US/firefox/addon/433 nhấn install now.
Cách sử dụng: click phải vào banner quảng cáo chọn Adblock Images.

Làm đẹp firefox
Mở cửa sổ dòng lệnh Terminal bằng cách vào menu Applications > Accessories > Terminal. Bạn gõ và thực hiện tuần tự các lệnh sau:

$ wget http://users.tkk.fi/~otsaloma/art/firefox-form-widgets.tar.gz
$ tar -xvf firefox-form-widgets.tar.gz
$ sudo cp /usr/lib/mozilla-firefox/res/forms.css /usr/lib/mozilla-firefox/res/forms.css.bak
$ cat firefox-form-widgets/res/forms-extra.css | sudo tee --append /usr/lib/mozilla-firefox/res/forms.css > /dev/null
$ sudo cp -r firefox-form-widgets/res/form-widgets /usr/lib/mozilla-firefox/res
$ rm -rf firefox-form-widgets*

Quá trình này thực chất là thay những thiết lập mặc định của Firefox bằng một vài thứ hay hơn. Phương pháp mình học được từ Forum của cộng đồng Ubuntu đấy.

(Còn tiếp)

Cài đặt phần mềm từ một file RPM

Nếu bạn có một file đuôi .rpm (thường download từ trang chủ của Red Hat) và bạn muốn cài đặt nó, và bạn cũng không thể tìm thấy gói .deb tương ứng thì bạn có thể sử dụng alien để cài file .rpm nầy.
"Alien là một chương trình dịch gói .rpm và .deb. Nếu bạn muốn sử dụng một gói cài đặt của một distro Linux khác bạn nên dùng chương trình nầy để chuyển định dạng gói và cài nó bình thường."

Hướng dẫn cài Alien
$sudo apt-get update (dùng lệnh nầy nếu lệnh sau không chạy được)
$sudo apt-get install alien

Cài từ the file .rpm
1. Chuyển vào thư mục chứa file .rpm
2. Convert
$sudo alien -k tên-của-file-rpm.rpm
- Lệnh nầy sẽ chuyển gói .rpm thành gói .deb.
- Tham số -k sẽ giữ nguyên số phiên bản.
3. cài
$sudo dpkg -i tên-của-file-deb.deb
- lệnh nầy sẽ cài gói .deb vừa convert được.

Tuesday, September 18, 2007

Download nhạc từ nhacso.net

Nhạc số chấm net dùng giao thức mms để chuyển dữ liệu từ server về web browser, để download và ghi lại file nhạc nầy các bạn phải cài đặt mimms. Vào terminal gõ:
sudo apt-get install mimms
Khi bạn mở một bài nhạc trên trang nhạc số, click chuột phải chọn copy location. sau đó vào terminal gõ:
mimms đường_dẫn_vừa copy_được
Vậy là đã download được nhạc từ nhạc số rồi đó các bạn.