2、修改locale
sudo vi /etc/environment

LC_ALL="C"
LC_CTYPE="zh_CN.UTF-8"
LANG="en_US.UTF-8"
修改網(wǎng)絡(luò)設(shè)置
sudo vi /etc/network/interfaces
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.11.5
netmask 255.255.255.0
network 192.168.11.0
broadcast 192.168.11.255
gateway 192.168.11.2
dns-nameservers 202.96.134.133
3、更新源列表
sudo?vi ?/etc/apt/sources.list
deb http://ubuntu.cn99.com/ubuntu/ dapper-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ dapper-security main restricted universe multiverse
#deb http://ubuntu.cn99.com/ubuntu/ dapper-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ dapper main restricted universe multiverse
#deb http://ubuntu.cn99.com/backports/ dapper-extras main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ dapper main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ dapper-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ dapper-security main restricted universe multiverse
#deb-src http://ubuntu.cn99.com/ubuntu/ dapper-backports main restricted universe multiverse
sudo apt-get update
sudo apt-get dist-upgrade
4、安裝ssh
sudo apt-get install openssh-server
5、安裝build-essential、java
sudo apt-get install build-essential
sudo apt-get install sun-java5-jdk
sudo update-alternatives --config java
6、vsftpd
sudo apt-get install vsftpd
sudo vi /etc/vsftpd.conf























*簡(jiǎn)單配置,只用于本地賬戶上傳一些在ubuntu server下下載不方便的軟件
7、安裝mysql server
(1)下載mysql二進(jìn)制分發(fā)包到工作目錄
(2)創(chuàng)建mysql 用戶
shell> groupadd mysql
shell> useradd -g mysql mysql
(3)解壓縮
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
(4)將工作目錄鏈接到/usr/local/mysql
shell> cd /usr/local
shell> ln -s full-path-to-mysql-VERSION-OS mysql
(5)安裝數(shù)據(jù)庫(kù)
shell> cd mysql
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root? .
shell> chown -R mysql data
shell> chgrp -R mysql .
*此時(shí)可以手動(dòng)啟動(dòng)數(shù)據(jù)庫(kù):shell> bin/mysqld_safe --user=mysql &
(6)設(shè)置mysql自動(dòng)啟動(dòng)
將/usr/local/mysql/support-files/mysql.server 復(fù)制到/etc/init.d/mysql
添加為服務(wù):
sudo update-rc.d mysql defaults
如需刪除服務(wù):
sudo update-rc.d mysql remove
或者
在MySQL安裝目錄下或MySQL 源碼樹的support-files目錄中找到腳本。
要想手動(dòng)安裝mysql.server,用名稱mysql將它復(fù)制到/etc/init.d目錄,然后將它變?yōu)榭蓤?zhí)行文件。只需要將位置更改為mysql.serveris所在并執(zhí)行這些命令的相應(yīng)目錄:
shell> cp mysql.server /etc/init.d/mysql
shell> chmod +x /etc/init.d/mysql
安裝腳本后,用來激活它以便在系統(tǒng)啟動(dòng)時(shí)運(yùn)行所需要的命令取決于你的操作系統(tǒng)。在Linux中,你可以使用chkconfig:
shell> chkconfig --addMySQL
(7)配置mysql
添加my.cnf到/etc
啟動(dòng)數(shù)據(jù)庫(kù),更改root密碼:
cd /usr/local/mysql/bin
./mysql -u roo
mysql>GRANT ALL PRIVILEGES ON *.* TO??root@?localhost IDENTIFIED BY "password";
或者啟動(dòng)遠(yuǎn)程訪問:
mysql>GRANT ALL PRIVILEGES ON *.* TO??root@?"%" IDENTIFIED BY "password";