免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 782 | 回复: 0
打印 上一主题 下一主题

linux下ubuntu系统安装及开发环境配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-09-23 14:59 |只看该作者 |倒序浏览

1.安装
系统
:别的没什么说的,就是安的时候把网线拔了,不然到 configure apt的时候会卡起很久不走的
2.配置
网络
编辑/etc/network/interface
打开/etc/networt/interface 添加下面几句:
auto eth0
iface inet eth0 static  #设置静态IP地址
address 192.168.1.235
gateway 192.168.1.1
保存,退出,重启网络$/etc/init.d/networking restart
此时已经可以ping 通局域网
地址
,但外网仍不行,上网搜,发现
ubuntu
设置nameserver是在/etc/resolv.conf 里面。然后就编辑此
文件
,添加一行:
nameserver 192.168.1.1
然后再ping www.baidu.com
ok 网络已同
3.配置apt源 vim /etc/apt/sourcelist
4.安装lrzsz,便于传输文件
5.sudo apt-get install unzip
6.sudo apt-get install tree
7.配置vim+ctags + taglist
参考
http://kelaocai.javaeye.com/blog/105853
vim插件ctags和taglist的安装和使用.doc
8.安装g++, gdb, make
9.安装python2.5 (系统已经安装了的,但不完全,没有
Python
.h)所以我手动下载源码安装
sudo ./configure --prefix=/usr/local/python
sudo make
sudo make install
10 .安装
twisted
(由于readme里面说要安装Zope interface,所以在
http://zope.org/Products/ZopeInterface下了
zope.interface-3.3.0.tar.gz
安装:This tarball (.tgz) contains a standard distutils package; build it with the command:
$python setup.py build
You can now install it with
$python setup.py install)没有安装成功,它需要python2.4 ,而我系统是2.5。
直接安装twisted也出错。 没有找到Python.h文件,然后我就重新下了python的安装文件,重新安装python2.5,参见步骤9
安装twisted就直接运行 sudo python setup.py install 即可
11. (
mysql
建议源码安装!!!) 开始我是 apt-get install mysql-server
mysql-devel没有找到。自己手动安装?
自己下了源码
http://mysql.mirror.kangaroot.net/Downloads/MySQL-5.0/mysql-5.0.51.tar.gz
解压
编译选项$CC=gcc CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql -
-enable-thread-safe-client --enable-assembler --with-big-tables --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-   charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=complex
结果出现错误:checking for termcap functions library... configure: error: No curses/termcap library found
于是去下载ncurses,
http://ftp.gnu.org/pub/gnu/ncurses/
上下载ncurses-5.6.tar.gz
解压,然后$ ./configure
$ make
$ sudo make install
ok
gxl@ubuntu8:~/software/mysql-5.0.51$ service mysqld stop
The program 'service' can be found in the following packages:
* debian-helper-scripts
* sysvconfig
Try: sudo apt-get install
-bash: service: command not found
gxl@ubuntu8:~/software/mysql-5.0.51$ sudo apt-get install sysvconfig
此处安装了以后,就可以用 $ service mysql start 启动mysql
具体mysql安装参考
http://blog.csdn.net/xiamizy/archive/2008/01/30/2072525.aspx
非常详细
本来打算用chkconfig 类似于
windows
的msconfig命令
后来搜了下,在debian和ubuntu上最好用update-rc.d 详见
http://www.blogjava.net/mstar/archive/2008/06/20/update_rc_d_example.html
附:debian sarge 下 update-rc.d
详解
update- rc.d命令,是用来自动的升级System V类型初始化脚本,简单的讲就是,哪些东西是你想要系统在引导初始化的时候运行的,哪些是希望在
关机或重启时停止的,可以用它来帮你
设置
。这些脚本的连接位于/etc/rcn.d/LnName,对应脚本位于/etc/init.d/Script-name.
1、设置指定启动顺序、指定运行级别的启动项:
update-rc.d <service> start <order> <runlevels>
2、设置在指定运行级中,按指定顺序停止:
update-rc.d <service> stop <order> <runlevels>
3、从所有的运行级别中删除指定的启动项:
update-rc.d -f <script-name> remove
例如:
update-rc.d script-name start 90 1 2 3 4 5 . stop 52 0 6 .
start 90 1 2 3 4 5 . : 表示在1、2、3、4、5这五个运行级别中,按先后顺序,由小到大,第90个开始运行这个脚本。
stop 52 0 6 . :表示在0、6这两个运行级别中,按照先后顺序,由小到大,第52个停止这个脚本的运行。
如果在 /etc/init.d 中加入一個 script,還須要製作相關的 link
在 /etc/rc*.d 中。K 開頭是 kill , S 開頭是 start , 數字順序
代表啟動的順序。 (SysV)
update-rc.d 可以幫你的忙。
例:
在 /etc/init.d 中建立一個叫作 zope 的 script. , 然後
update-rc.d zope defaults
就會產生以下連結::
Adding system startup for /etc/init.d/zope ... /etc/rc0.d/K20zope ->
../init.d/zope /etc/rc1.d/K20zope -> ../init.d/zope /etc/rc6.d/K20zope ->
../init.d/zope /etc/rc2.d/S20zope -> ../init.d/zope /etc/rc3.d/S20zope ->
../init.d/zope /etc/rc4.d/S20zope -> ../init.d/zope /etc/rc5.d/S20zope ->
../init.d/zope
其他進階使用方式請 man update-rc.d
12. valgrind
具体使用见
http://hi.baidu.com/timegoneby/blog/item/ffaad71790bf060dc93d6dd6.html
13. apt-get install openssl ca-certificates openssl-doc
14. sudo apt-get install libxml2
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/80381/showart_1218367.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP