博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux下ubuntu系统安装及开发环境配置
阅读量:4317 次
发布时间:2019-06-06

本文共 3802 字,大约阅读时间需要 12 分钟。

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/105853vim插件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 <selected package>
-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

转载于:https://www.cnblogs.com/wayne173/p/3741861.html

你可能感兴趣的文章
Android:日常学习笔记(10)———使用LitePal操作数据库
查看>>
鱼那么信任水,水却煮了鱼
查看>>
HTML5 Canvas ( 文字的度量 ) measureText
查看>>
Http和Socket连接区别
查看>>
Arrays基本使用
查看>>
受限玻尔兹曼基
查看>>
Angular2,Springboot,Zuul,Shiro跨域CORS请求踩坑实录
查看>>
C语言中操作符的优先级大全
查看>>
SQL Server 查询分析器提供的所有快捷方式(快捷键)
查看>>
Linux - 查看系统基础信息的一般渠道
查看>>
Java第七次作业--图形用户界面
查看>>
MongoDB学习笔记06
查看>>
Powerdesigner+Execel
查看>>
数学基础 数论(二)
查看>>
走进模块
查看>>
什么是簇?
查看>>
[LeetCode] Construct Binary Tree from Inorder and Pretorder Traversal
查看>>
[转载]Android通过Socket上传文件
查看>>
golang 中的定时器(timer),更巧妙的处理timeout
查看>>
AT2134 Zigzag MST
查看>>