libevent-2.0.22-stable.gz怎么安装

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了libevent-2.0.22-stable.gz怎么安装相关的知识,希望对你有一定的参考价值。

参考技术A 在Linux系统中进行FastDFS软件的安装配置,方法的过程中是很复杂的,所以如果不是专业的电脑高手可能是没有办法整理出来,所以为了方便网友们更好的了解这个软件的安装,一下就是详细的过程,大家一起来看看吧!第一步:安装FastDFS 1.解压 FastDFS_v4.07.tar.gz ==>FastDFS 2. cd FastDFS ==>vim make.sh 修改以下内容 TARGET_PREFIX=/usr/local/fdfs TARGET_CONF_PATH=/usr/local/fdfs/conf mkdir -p /usr/local/fdfs mkdir -p /usr/local/fdfs/conf 修改 if [ "$uname" = "Linux" ]; then if [ "$WITH_LINUX_SERVICE" = "1" ]; then if [ ! -d $TARGET_CONF_PATH ]; then mkdir -p $TARGET_CONF_PATH cp -f conf/tracker.conf $TARGET_CONF_PATH cp -f conf/storage.conf $TARGET_CONF_PATH cp -f conf/client.conf $TARGET_CONF_PATH cp -f conf/http.conf $TARGET_CONF_PATH cp -f conf/mime.types $TARGET_CONF_PATH fi cp -f init.d/fdfs_trackerd /etc/rc.d/init.d/ cp -f init.d/fdfs_storaged /etc/rc.d/init.d/ /sbin/chkconfig --add fdfs_trackerd /sbin/chkconfig --add fdfs_storaged fi fi 第二步:安装libevent-2.0.19-stable.tar.gz 1.解压 libevent-2.0.19-stable.tar.gz==>libevent-2.0.19-stable 2.进入libevent-2.0.19-stable 安装 ./configure --prefix=/usr/local/libevent make make install 3. 添加软连接 ln -s /usr/local/libevent/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5 ln -s /usr/local/libevent/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5 ln -s /usr/local/libevent/lib/libevent-2.0.so.5 /lib64/libevent-2.0.so.5 ln -s /usr/local/libevent/lib/libevent-2.0.so.5 /lib/libevent-2.0.so.5 ln -s /usr/local/libevent/lib/libevent-2.0.so.5 /usr/local/lib64/libevent-2.0.so.5 ln -s /usr/local/libevent/lib/libevent-2.0.so.5 /usr/local/lib/libevent-2.0.so.5 第三步:安装FastDFS ./make.sh C_INCLUDE_PATH=/usr/local/libevent/include LIBRARY_PATH=/usr/local/libevent/lib ./make.sh install 第四步:如果/usr/local/fastdfs/conf没有fdfs_trackerd和fdfs_storaged这两个文件,就从 /FastDFS/tracker 和FastDFS/storage/目录下复制过去 第五步:修改配置 mkdir -p /home/softinstall/data/tracker 1. 修改 tracker.conf base_path=/home/softinstall/data/tracker bind_addr=192.168.9.169 1.1 修改storage_ids.conf 100001 group1 192.168.9.169 2. 启动tracker ./fdfs_trackerd ../conf/tracker.conf 查看22122端口是否启动起来 第六步:配置storage mkdir -p /home/softinstall/data/store mkdir -p /home/softinstall/data/store/store0 mkdir -p /home/softinstall/data/store/store1 mkdir -p /home/softinstall/data/store/store2 1.修改storage.conf base_path=/home/softinstall/data/store store_path_count=3 store_path0=/home/softinstall/data/store/store0 store_path1=/home/softinstall/data/store/store1 store_path2=/home/softinstall/data/store/store2 tracker_server=192.168.9.169:22122 #限6*6=36个目录 默认256*256 subdir_count_per_path=6 2. 启动storage ./fdfs_storaged ../conf/storage.conf 查看23000端口是否启动 第七步:安装nginx+fastdfs模块 1. 安装pcre-8.32 进入pcre-8.32 ./configure make make install 安装如果有问题缺省某些包,可以执行: yum groupinstall "Development Tools" 第八步:解压fastdfs-nginx-module_v1.15.tar.gz和 nginx-1.4.2.tar.gz 1.进入 fastdfs-nginx-module_v1.15/src vim fastdfs-nginx-module_v1.15/src/config 修改成以下内容 ngx_addon_name=ngx_http_fastdfs_module HTTP_MODULES="$HTTP_MODULES ngx_http_fastdfs_module" NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_fastdfs_module.c" CORE_INCS="$CORE_INCS /usr/local/fdfs/include/fastdfs /usr/local/fdfs/include/fastcommon/" CORE_LIBS="$CORE_LIBS -L/usr/local/fdfs/lib -lfastcommon -lfdfsclient" CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='\"/usr/local/fdfs/conf/mod_fastdfs.conf\"'" 2. 安装 进入nginx-1.4.2目录 ./configure --prefix=/home/softinstall/nginx/nginx-fastdfs-install --with-pcre=/home/softinstall/nginx/pcre-8.32 --add-module=/home/softinstall/nginx/fastdfs-nginx-module/src 安装中如果有问题 可以执行安装以下包:yum -y install gcc gcc-c++ zlib-devel openssl-devel 3.配置nginx.conf 进入nginx-fastdfs-install/conf vim nginx.conf 配置以下内容 location /M00 root /home/softinstall/data/store/store0/data; ngx_fastdfs_module; location /M01 root /home/softinstall/data/store/store1/data; ngx_fastdfs_module; location /M02 root /home/softinstall/data/store/store2/data; ngx_fastdfs_module; 4.配置mod_fastdfs.conf mkdir -p /home/softinstall/data/nginx_mod 进入 /usr/local/fdfs/conf目录 vim mod_fastdfs.conf base_path=/home/softinstall/data/nginx_mod tracker_server=192.168.9.169:22122 store_path_count=3 store_path0=/home/softinstall/data/store/store0 store_path1=/home/softinstall/data/store/store1 store_path2=/home/softinstall/data/store/store2 5. 启动nginx 进入 /home/softinstall/nginx/nginx-fastdfs-install/sbin ./nginx 如果启动找不到 error while loading shared libraries: libfdfsclient.so: cannot open shared object file: No such file or directory error while loading shared libraries: libfastcommon.so: cannot open shared object file: No such file or directory 请使用以下软连接 ln -s /usr/local/fdfs/lib/libfastcommon.so /usr/lib/libfastcommon.so ln -s /usr/local/fdfs/lib/libfastcommon.so /usr/lib64/libfastcommon.so ln -s /usr/local/fdfs/lib/libfdfsclient.so /usr/lib64/libfdfsclient.so ln -s /usr/local/fdfs/lib/libfdfsclient.so /usr/lib/libfdfsclient.so ==========================fastDHT================================ 【第一步:】安装 Berkley DB 【1.】 tar -zxvf db-4.7.25.tar.gz 进入 db-4.7.25/build_unix ../dist/configure --prefix=/usr 【第二步:】安装FastDHT mkdir -p /usr/local/fdht mkdir -p /usr/local/fdht/conf 1. tar -zxvf FastDHT_v1.23.tar.gz 进入 FastDHT_v1.23 vim make.sh 修改 TARGET_PREFIX=/usr/local/fdht TARGET_CONF_PATH=/usr/local/fdht/conf if [ "$1" = "install" ]; then cd .. cp -f restart.sh $TARGET_PREFIX/bin cp -f stop.sh $TARGET_PREFIX/bin if [ "$uname" = "Linux" ]; then if [ "$WITH_LINUX_SERVICE" = "1" ]; then if [ ! -d $TARGET_CONF_PATH ]; then mkdir -p $TARGET_CONF_PATH cp -f conf/fdhtd.conf $TARGET_CONF_PATH cp -f conf/fdht_servers.conf $TARGET_CONF_PATH cp -f conf/fdht_client.conf $TARGET_CONF_PATH fi cp -f init.d/fdhtd /etc/rc.d/init.d/ /sbin/chkconfig --add fdhtd fi fi fi 【2.】 安装 ./make.sh ------------------------------------------------------------------------------ 如果出现 global.h:18:19: error: event.h: No such file or directory 进入/home/softinstall/fastdfs/libevent-2.0.19-stable然后执行 ./configure --prefix=/usr make make install --------------------------------------------------------------------------------- ./make.sh install 【3.】 配置fdht 【3.1】 vim /usr/local/fdht/conf/fdhtd.conf port=11411 bash_path=/home/softinstall/data/fastdht cache_size = 32MB store_sub_keys=true use_storage_id=true #include /usr/local/fdht/conf/fdht_servers.conf (本行前有#表示打开,如果想关闭此选项,则应该为##开头) 【3.2】 vim /usr/local/fdht/conf/fdht_server.conf group_count = 1 group0 = 192.168.9.165:11411 【3.3】 vim /usr/local/fdht/conf/fdht_client.conf keep_alive=1 (本选项关联 storaged.conf文件) base_path=/home/softinstall/data/fastdht #include /usr/local/fdht/conf/fdht_servers.conf 【3.4】 配置FastDFS 的 storaged.conf文件 vi storaged.conf (默认位置: /usr/local/fdfs/conf/storaged.conf) check_file_duplicate=1 本配置项解释: 是否检测上传文件已经存在。如果已经存在,则不存在文件内容,建立一个索引链接以节省磁盘空间 key_namespace=FastDFS 本配置项解释: 当上个参数设定为1时 , 在FastDHT中的命名空间 keep_alive=1 本配置项解释: 长连接配置选项,如果为0则为短连接 1为长连接 #include /usr/local/fdht/conf/fdht_servers.conf 本配置项解释: 可以通过 #include filename 方式来加载 FastDHT servers 的配置 【3.5】 ===========================总体启动流程====================================== 启动tracker /usr/local/fdfs/bin/fdfs_trackerd /usr/local/fdfs/conf/tracker.conf 停止tracker /usr/local/fdfs/bin/stop.sh /usr/local/fdfs/conf/tracker.conf 启动storage /usr/local/fdfs/bin/fdfs_storaged /usr/local/fdfs/conf/storage.conf 停止storage /usr/local/fdfs/bin/stop.sh /usr/local/fdfs/conf/storage.conf 启动nginx /home/softinstall/nginx/nginx-fastdfs-install/sbin/nginx 启动 /usr/local/fdht/bin/fdhtd /usr/local/fdht/conf/fdhtd.conf 停止 /usr/local/fdht/bin/stop.sh /usr/local/fdht/conf/fdhtd.conf 测试 是否有错误: /usr/local/fdht/bin/fdht_test /usr/local/fdht/conf/fdht_client.conf =================================================================

oracle 怎样查询某用户下的所有表的表名

select * from all_tab_comments -- 查询所有用户的表,视图等。

select * from user_tab_comments -- 查询本用户的表,视图等。

select * from all_col_comments  --查询所有用户的表的列名和注释。

select * from user_col_comments -- 查询本用户的表的列名和注释。

select * from all_tab_columns --查询所有用户的表的列名等信息。

select * from user_tab_columns --查询本用户的表的列名等信息。


扩展资料

ORACLE下有三个视图

DBA_TABLES  拥有DBA角色的用户可以查看系统中的所有表

USER_TABLES 登录数据库的当前用户拥有的所有表

ALL_TABLES 登录数据库的当前用户有权限查看的所有表

参考资料:百度百科-Oracle

参考技术A

如果是用该用户登录使用以下语句:

SELECT *

FROM USER_TABLES;

如果是用其他用户(在dba权限下):

SELECT *

FROM ALL_TABLES WHERE OWNER='USER_NAME' 

扩展资料:

1、查询“c001”课程比“c002”课程成绩高的所有学生的学号;

select * from sc a
where a.cno='c001'
and  exists(select * from sc b where b.cno='c002' and a.score>b.score
and a.sno = b.sno)

2、查询平均成绩大于60 分的同学的学号和平均成绩;

select sno,avg(score) from sc  group by sno having avg(score)>60;

3、查询所有同学的学号、姓名、选课数、总成绩;

select a.*,s.sname from (select sno,sum(score),count(cno) from sc group by sno) a ,student s where a.sno=s.sno

4、查询姓“刘”的老师的个数;

select count(*) from teacher where tname like '刘%';

参考技术B

ORACLE下有三个视图

select table_name from user_tables; //当前用户拥有的表

select table_name from all_tables; //所有用户的表

select table_name from dba_tables; //包括系统表

select table_name from dba_tables where owner='用户名'

类似的,除了表,还有视图、存储过程、同义词等等对象,使用[DBA|USER|ALL]_TABLES可以查看到你想要的对象

扩展资料:

当创建视图后,ORACLE将会验证视图的有效性,如修改了基本表,则会导致视图的无效状态.可查询数据字典user_objects的status.

1、创建表T,包含ID和NAME两列;

2、使用该表创建一个视图t_view,查看该表所有信息;

3、使用该表创建一个视图t_view2,查看该表的ID和NAME列

4、查看该视图状态;

5、在表T上增加一列性别sex,重新查看视图t_view的状态.

6、在表T上删除列NAME,重新查看视图t_view2的状态.

注:VALID表示正常状态,invalid表示非正常状态

参考资料:Oracle视图-百度百科

参考技术C

ORACLE下有三个视图

    DBA_TABLES  拥有DBA角色的用户可以查看系统中的所有表

    USER_TABLES 登录数据库的当前用户拥有的所有表

    ALL_TABLES 登录数据库的当前用户有权限查看的所有表

类似的,除了表,还有视图、存储过程、同义词等等对象,使用[DBA|USER|ALL]_TABLES可以查看到你想要的对象

本回答被提问者和网友采纳
参考技术D -- connect xx/xx 切换到这个用户
select * from tab;

以上是关于libevent-2.0.22-stable.gz怎么安装的主要内容,如果未能解决你的问题,请参考以下文章