Android2.3 64位服务器系统环境搭建
一、安装软件环境:
Ubuntu 10.10安装全程图解
加载画面
初始界面,选择中文安装,这里要说的是Ubuntu从这个版本开始已经原生支持中文,也就是说选中文安装完之后,所有界面都已经汉化,不用再重新更新语言。
开始安装界面,这里把第三方软件选上,如果有网络,最好把下载更新选上,www.linuxidc.com以提供对一些非开源视频音频的支持,例如MP3音乐的播放
选择磁盘,如果你想整个硬盘都用来安装,则选择整个硬盘,这里选择手动指定
选择手动指定分区(高级)——>前进
进入到这个页面,先删除原有的分区,对空闲空间进行手动分区:
1、 主分区:交换分区swap 16G*1.5=20G(内存大小的1.5倍)
2、 逻辑分区:Ext3 挂载点“/” 30G
3、 逻辑分区:Ext3 挂载点“/home” 90G
分区完成之后——>“现在安装”(大概30分钟)
进入选择时区和键盘 ——>选择默认的时区和键盘
进入用户名输入界面:
姓名:hisilicon
计算机名:Hisilicon
用户名:hisilicon
密码:*******
二、配置网络环境:
Ø 修改两个配置文件:
1、/etc/network/ interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.2(CYY注:这个地方写本机的IP地址)
netmask 255.255.254.0
gateway 192.168.0.1(CYY注:这个地方将本机的IP地址的最后一位换为1)
2、DNS设置etc/resolv.conf
# Generated by NetworkManager
nameserver xx.xx.xx.xx
deb-src http://run.hit.edu.cn/ubuntu/ jaunty main restricted universe multiverse
deb http://run.hit.edu.cn/ubuntu/ jaunty-updates main restricted universe multiverse
deb-src http://run.hit.edu.cn/ubuntu/ jaunty-updates main restricted universe multiverse
deb http://run.hit.edu.cn/ubuntu/ jaunty-backports main restricted universe multiverse
deb-src http://run.hit.edu.cn/ubuntu/ jaunty-backports main restricted universe multiverse
deb http://run.hit.edu.cn/ubuntu/ jaunty-security main restricted universe multiverse
deb-src http://run.hit.edu.cn/ubuntu/ jaunty-security main restricted universe multiverse
update之后,用sudo apt-get install sun-java5-jdk
Ø 设置上网代理
1、 默认光盘安装后未安装ssh等软件,需要利用proxy权限在线更新。目前上海的几台服务器上都已经配置好了脚本,只需要用有proxy权限的域账号来完成更新:
配置文件是/etc/apt/apt.conf.d/11proxy,内容非常简单:
Acquire::http::Proxy "http://域账号:域密码@proxycn2.huawei.com:8080";
三、必须安装的工具
Ø 安装远程控制SSH
sudo apt-get update
sudo apt-get install openssh
sudo apt-get install openssh-server
sudo apt-get install ssh
Ø 安装samba
安装samba: sudo apt-get install samba samba-tools
ssh增加新用户test:sudo adduser test
samba新增用户test:sudo smbpasswd -a test
修改配置文件:/etc/samba 下的smb.conf
sudo scp –r hisilicon@10.141.105.233:/etc/samba/smb.conf /etc/samba/
Smb.conf配置文件的内容在附件1中
一旦新增了samba用户有需要重启samba:
Ubuntu 10.10:/etc/init.d目录下运行sudo service smbd start/restart/stop
Ubuntu 9.xx:/etc/init目录下运行./samba restart
Ø 安装vim
sudo apt-get install vim
修改vim配置文件
Ø 安装svn
sudo apt-get install svn
sudo apt-get install subversion
sudo apt-get install subversion-tools
Ø 安装 perl
首先在/usr/local/share/中看有没有perl目录,没有的话从\\10.141.105.228\shared\version_release_from_zj\中的perl文件夹直接复制到该服务器中/usr/local/share/目录下即可
四、安装编译环境
增加JDK6更新源
ubuntu10.10默认是没有jdk6源,加上jdk6的源地址
请修改添加vi /etc/apt/sources.list
deb http://archive.canonical.com/ lucid partnerhttp://run.hit.edu.cn/ubuntu/ jaunty main restricted universe multiverse
deb-src http://run.hit.edu.cn/ubuntu/ jaunty main restricted universe multiverse
deb http://run.hit.edu.cn/ubuntu/ jaunty-updates main restricted universe multiverse
deb-src http://run.hit.edu.cn/ubuntu/ jaunty-updates main restricted universe multiverse
deb http://run.hit.edu.cn/ubuntu/ jaunty-backports main restricted universe multiverse
deb-src http://run.hit.edu.cn/ubuntu/ jaunty-backports main restricted universe multiverse
deb http://run.hit.edu.cn/ubuntu/ jaunty-security main restricted universe multiverse
deb-src http://run.hit.edu.cn/ubuntu/ jaunty-security main restricted universe multiverse
update之后,用sudo apt-get install sun-java5-jdk
安装必须工具包
sudo apt-get install git-core curl
sudo apt-get install gcc g++ flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z1-dev
Java 代码
Ø 安装JDK6.0:
注意:使用需要使用SUN公司提供的JAVA6 JDK编译sdk。
sudo apt-get install sun-java6-jdk
如果直接用命令:
sudo apt-get install sun-java6-jdk
会出现错误
正在读取软件包列表…完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
现在没有可用的软件包 sun-java6-jre,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,或者只能在其他发布源中找到
E: 软件包 sun-java6-jre 没有可供安装的候选者
解决的办法如下:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
如果还不行往下看:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update
sudo apt-get install sun-java6-jdk
同时需要注意:
编译S10 PADubuntu9.04是libsdl-dev
需要java的版本java-6-sun-1.6.0.26版本以上,而自动下载的java版本是java-6-sun-1.6.0.21,因此需要升级java版本。
执行下面的操作:
将10.141.105.212服务器share目录下的jdk-6u32-linux-x64.bin拷贝到要更新的服务器上面。
scp –r hisik3@10.141.105.212:/home/share/jdk-6u32-linux-x64.bin .
然后执行:
chmod 777 jdk-6u32-linux-x64.bin
执行 ./jdk-6u32-linux-x64.bin 后产生jdk1.6.0_32
将jdk1.6.0_32拷贝到/usr/lib/jvm目录下面
cp –rf jdk1.6.0_32/ /usr/lib/jvm
进入/usr/lib/jvm 删除原来的软连接java-6-sun,然后执行
sudo ln -s jdk1.6.0_32 java-6-sun
现在已经不再支持10.10了,安装之后需要使用下面的方法解决。
后来没办法只能再装10.10,然后在网上找解决方法。http://blog.csdn.net/nanatintin/article/details/8555494
解决办法:在/etc/apt/source.list中添加下面几行:
## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ maverick main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ maverick-security main restricted universe multiverse
# Optional
#deb http://old-releases.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
附件1:smb.conf
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba,
# read the Samba-HOWTO-Collection. This may be obtained from:
# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# Many working examples of smb.conf files can be found in the
# Samba-Guide which is generated daily and can be downloaded from:
# http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#=================== Global Settings =====================================
[global]
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
workgroup = K3
# server string is the equivalent of the NT Description field
server string = K3 Linux Samba Server5
security = user
# that connects
log file = /var/log/samba/%m.log
# Put a capping on the size of the log files (in Kb).
max log size = 50
# via DNS nslookups. The default is NO.
dns proxy = no
username map = /etc/samba/smbusers
#====================== Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
path = %H
valid users = %U
Share modes = no
# specifically define each individual printer
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes
# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required
[shared]
comment = shared
path = /home/share
public = yes
writable = yes
printable = no