1、以简体中文模式安装
2、修改locale
sudo vi /etc/environment
LANGUAGE
="en_US:en"LC_ALL="C"
LC_CTYPE="zh_CN.UTF-8"
LANG="en_US.UTF-8"修改网络设置
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
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
listen=YES
local_enable=YES
write_enable=YES
local_umask=022
connect_from_port_20=YES
chroot_local_user=NO
chroot_list_file=/etc/vsftpd.chroot_list
user_config_dir=/etc/vsftpd_user_conf
secure_chroot_dir=/var/run/vsftpd
pam_service_name=/etc/pam.d/vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
*简单配置,只用于本地账户上传一些在ubuntu server下下载不方便的软件
7、安装mysql server
(1)下载mysql二进制分发包到工作目录
(2)创建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)安装数据库
shell> cd mysql
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
*此时可以手动启动数据库:shell> bin/mysqld_safe --user=mysql &
(6)设置mysql自动启动
将/usr/local/mysql/support-files/mysql.server 复制到/etc/init.d/mysql
添加为服务:
sudo update-rc.d mysql defaults
如需删除服务:
sudo update-rc.d mysql remove
或者
在MySQL安装目录下或MySQL 源码树的support-files目录中找到脚本。
要想手动安装mysql.server,用名称mysql将它复制到/etc/init.d目录,然后将它变为可执行文件。只需要将位置更改为mysql.serveris所在并执行这些命令的相应目录:
shell> cp mysql.server /etc/init.d/mysql
shell> chmod +x /etc/init.d/mysql
安装脚本后,用来激活它以便在系统启动时运行所需要的命令取决于你的操作系统。在Linux中,你可以使用chkconfig:
shell> chkconfig --addMySQL
(7)配置mysql
添加my.cnf到/etc
启动数据库,更改root密码:
cd /usr/local/mysql/bin
./mysql -u roo
mysql>GRANT ALL PRIVILEGES ON *.* TO root@ localhost IDENTIFIED BY "password";
或者启动远程访问:
mysql>GRANT ALL PRIVILEGES ON *.* TO root@ "%" IDENTIFIED BY "password";