Cài mysql server:
#sudo apt-get install mysql-server
Cài module PHP cho mysql nếu dùng php:
#sudo apt-get install php5-mysql
Kiểm tra thử tạo mới 1 database dùng mysqladmin:
#mysqladmin create < databasename >
Cài đặt Apache web server:
#sudo apt-get install apache2
Cài đặt PHP 5
#sudo apt-get install php5
#sudo apt-get install libapache2-mod-php5
Restart apache server:
sudo /etc/init.d/apache2 restart
MYSQL:
Start MySql server:
#/etc/init.d/mysql start
Stop MySql server:
#/etc/init.d/mysql stop
Restart MySql server:
#/etc/init.d/mysql restart
Kiểm tra trạng thái của MySql server:
#/etc/init.d/mysql status
Saturday, July 24, 2010
Cài đặt MySQL Server 5 trên Ubuntu
Monday, July 5, 2010
Sunday, July 4, 2010
Ubuntu Server
1. Install SSH:
Type the following two command to install both ssh client and server:
#sudo apt-get install openssh-server openssh-client
Start SSH Server:
# sudo /etc/init.d/ssh start
Stop SSH Server:
# sudo /etc/init.d/ssh stop
Restart SSH Server:
# sudo /etc/init.d/ssh restart
2. Installing and setting TFTPD in Ubuntu
- Install tftpd and related packages.
$ sudo apt-get install xinetd tftpd tftp
- Create /etc/xinetd.d/tftp and put this entry:
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
- Make /tftpboot directory
$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot
- Start tftpd through xinetd
$ sudo /etc/init.d/xinetd start
Or
$ sudo /etc/init.d/xinetd restart
3. NFS Server
- In order to set NFS server you need to install the following packages:
=> nfs-kernel-server - Linux NFS Server
=> nfs-common - NFS Common programs
=> portmap - The RPC portmapper
- Use apt-get command to install all required packages:
$ sudo apt-get install nfs-kernel-server portmap nfs-common
- Sharing directory with /etc/exports
$ sudo vi /etc/exports
To export /data directory to 192.168.1.0/24 network enter the following
in /etc/exports file:
/data 192.168.1.0/24(rw,rsync)
To export /sales to hostname tom and jerry, enter:
/sales tom(ro,sync) jerry(ro,sync)
To export /users to 192.168.1.0/24 in read write format, enter:
/users 192.168.1.0/24(ro,sync) jerry(rw,fsid=0,insecure,no_subtree_check,async)
/AMCC/ppc_4xx *(rw,no_root_squash,no_all_squash,sync,no_subtree_check)
Where,
* rw : Allow clients to read as well as write access
* ro : Read only access
* insecure : Tells the NFS server to use unpriveledged ports (ports > 1024).
* no_subtree_check : If the entire volume (/users) is exported, disabling
this check will speed up transfers.
* async : async will speed up transfers.
Save and close the file. Just restart nfs-server:
$ sudo /etc/init.d/nfs-kernel-server restart
Now your NFS sever is sharing /sales and /data directories.
Saturday, July 3, 2010
Ubuntu (TT)
4. Grub2
Cài đặt:
$ sudo apt-get install grub2
Link
5. Phầm mềm chỉnh sửa & ghi CD & DVD:
- Phần mềm chỉnh sửa đĩa ISO: ISO Master. Có thể cài đặt bằng cách vô
Ubuntu Software Center gõ ISO Master or bằng lệnh sau:
sudo apt-get install isomaster
- Phần mềm ghi đĩa: K3B, Brasero, GnomeBaker ... & google :D
Cách cài thì tương tự như trên.
Wednesday, June 30, 2010
Ubuntu ...
1. Dùng alias để tạo lệnh mới trên Ubuntu:
Thêm vào dòng lệnh alias vào file ~/.bashrc.
Ví dụ:
alias ls='ls --color=auto -hF'
alias ll='ls --color=auto -lhF'
alias la='ls --color=auto -lahF'
alias grep='grep --color=auto'
alias diff='diff -rBNup'
Sau đó tắt terminal đi, mở lại. Bây giờ ta có thể dùng lệnh la tương đương
với gõ ls --color=auto -lahF,
or grep thì tương đương với gõ grep --color=auto, ...
2. Tăng tốc cho Ubuntu:
2.1 Disable IPV6 Ubuntu:
Cách 1: Thay đổi nội dung file aliases
sudo vi /etc/modprobe.d/aliases
Tìm dòng alias net-pf-10 ipv6
Sau đó đổi thành alias net-pf-10 off (Or aliases net-pf-10 off ipv6)
Save file and reboot.
Cách 2: Disable trên Firefox
Vào thành address bar: Gõ about:config search từ network.dns.disableIPv6,
sau đó nhấn chuột phải đổi thành TRUE
Cách 3: Thay đổi file /etc/default/grub
sudo vi /etc/default/grub
Tìm
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
Sau đó đổi thành
GRUB_CMDLINE_LINUX_DEFAULT=”ipv6.disable=1 quiet splash”
Save lại.
Sau đó update grub
sudo update-grub
2.2 Tăng tốc quá trình khởi động:
Code:
sudo vi /etc/init.d/rc
Sửa dòng CONCURRENCY=none thành CONCURRENCY=shell là hoàn tất.
Nhớ lưu file lại & reboot
2.3 Đẩy dữ liệu lên RAM
Thủ thuật này đặc biệt hiệu quả khi bạn có nhiều RAM (tầm 512MB trở lên).
Thủ thuật này sẽ giảm số lần ghi dữ liệu tạm lên ổ cứng, thay vì vậy sẽ
ghi dữ liệu tạm vào ram càng nhiều càng tốt.
Bạn chạy lệnh:
Code:
sudo gedit /etc/sysctl.conf
Sau đó thêm dòng vm.swappiness=10 vào cuối file rồi lưu lại.
Từ lần khởi động sau thiệt lập sẽ được thực hiện mặc định.
Khi không có dòng này thì giá trị mặc định là 60, bạn có thể thay
bằng 5 nếu có nhiều hơn 1GB ram, và đặt về 0 nếu thích, khi đặt về 0
thì Linux sẽ giảm thiểu tối đa việc sử dụng đĩa cứng lưu dữ liệu tạm.
3. Cài đặt Ubuntu từ đĩa USB di động:
Link
(Còn nữa).
Các chương trình tiện ích nên cài cho Ubuntu
1. Phần mềm hổ trợ download:
Dùng DownThemAll (1 add-on của Firefox): Vào Tools->Add-ons->
Gõ DownThemAll nhấn Enter để search, sau khi tìm thấy thì bấm
Add to Firefox để cài đặt.
(Còn nữa)
Monday, June 28, 2010
Mất biểu tượng ứng dụng ở System Tray Ubuntu
Cách khắc phục lỗi biến mất biểu tượng ở thanh System Tray mặc dù kiểm tra
trong System->Administration->System Monitor->Processes ứng dụng đó vẫn
đang chạy.Cách đơn giản: Click chuột phải vào thanh System Tray chọn
Add to panel... -> Notification Area -> Click Add để hiển thị vùng
Icon thuộc dạng Notification như Skype, Scim, GodenDict, ...
Subscribe to:
Posts (Atom)