记录一下自己开发环境(centos6.2)的配置

1、自启动服务。

项目用到了mongodb,个人以后台服务方式启动。

步骤如下:

[root@enjolras init.d]# pwd
/etc/init.d
[root@enjolras enjolras]# vim mongodb
#!/bin/bash
#chkconfig: 2345 90 10
#description: mongodb_service
#Start MongoDB
su - enjolras -c /home/enjolras/mongodb/sh/rundb.sh
[enjolras@enjolras sh]$ pwd
/home/enjolras/mongodb/sh
[enjolras@enjolras sh]$ cat rundb.sh
#!/bin/sh
# 用于打开mongodb数据库
/home/enjolras/mongodb/bin/mongod --fork --logpath /home/enjolras/mongodb/log/mongodb.log --dbpath /home/enjolras/mongodb/db
[root@enjolras init.d]# pwd
/etc/init.d
[root@enjolras init.d]# vim sand_box
#!/bin/bash
#chkconfig: 2345 90 10
#description: sand_box_service
#Start sand_box
su - root -c /home/enjolras/wxgame/sand_box/sh/run_sand_box.sh
[enjolras@enjolras sh]$ pwd
/home/enjolras/wxgame/sand_box/sh
[enjolras@enjolras sh]$ cat run_sand_box.sh
#!/bin/sh
# 用于打开沙盒
/home/enjolras/wxgame/sand_box/Debug/sand_box
[root@enjolras sh]# chkconfig --level 345 mongodb on
[root@enjolras sh]# chkconfig --level 345 sand_box on
[root@enjolras sh]# chkconfig | grep -Ei "mongodb|sand_box"
mongodb        	0:off	1:off	2:off	3:on	4:on	5:on	6:off
sand_box       	0:off	1:off	2:off	3:on	4:on	5:on	6:off
[root@enjolras sh]# service mongodb on
forked process: 3709
all output going to: /home/enjolras/mongodb/log/mongodb.log
[root@enjolras sh]# service sand_box on
2、动态、静态库库的配置
首先把编译好的so,a文件拷贝至/usr/local/lib64下,对应的头文件拷贝至/usr/local/include下
[root@enjolras ld.so.conf.d]# pwd
/etc/ld.so.conf.d
[root@enjolras ld.so.conf.d]# cat my.conf 
/usr/local/lib
/usr/local/lib64
[root@enjolras ld.so.conf.d]# ldconfig
3、init级别
修改/etc/inittab

id:5:initdefault: --> id:3:initdefault:

4、配置静态IP方便Xmanger链接

[enjolras@enjolras ld.so.conf.d]# cd /etc/sysconfig/network-scripts/
[enjolras@enjolras network-scripts]$ cat ifcfg-eth0
DEVICE=eth0
NM_CONTROLLED=yes
ONBOOT=yes
.....

5、其它

vim eclipse之类的配置就不记了

你可能感兴趣的:(工作记录,Linux)