Saturday, July 24, 2010

Cài đặt MySQL Server 5 trên Ubuntu



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


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.