ptlib libevent

来源:互联网 发布:公司取名软件 编辑:程序博客网 时间:2024/05/16 15:58


part A: Building PTLib
------------------------
1. extract ptlib.zip to /root/

2, cd /root/ptlib/

3, ./configure --disable-sasl --disable-sdl --disable-odbc(如果要用到ODBC连接数据库需要加这个选项)

4, vi ./make/ptbuildopts.mak, move cursoe to line 22

5, remove a library:

       ENDLDLIBS += .........         //  remove -lz

6, make optnoshared && make install

Result: 

ls ./lib_linux_x86/

libpt_s.a   //these is a library file we expected.

=====================================================

Part B: Building LibEvent
--------------------------

1, cd /root/
2, tar -xzvf libevent-1.4.8-stable.tar.gz
3, cd libevent-1.4.8-stable
4, ./configure
5, make && make install
6, ls -a .libs/

Part C: mysql

1. 安装mysql-5.0.22服务端:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> tar -xvzf mysql-5.0.22.tar.gz
shell> cd mysql-5.0.22
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> make clean //这是清除产生的一些临时文件

shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root . //设置权限
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
其它设设置:
# cp share/mysql/mysql.server /etc/rc.d/init.d/mysqld //开机自动启动 mysql。
# chmod 755 /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld
#添加LIB PATH
echo "/usr/local/mysql/lib" >> /etc/ld.so.conf && ldconfig
vi /etc/my.cnf
修改 MySQL 配置,增加部分优化参数,如下:
[mysqld]
ft_min_word_len=2
运行以下命令即可启动 MySQL 服务器:
# /etc/rc.d/init.d/mysqld start //启动 MySQL
# bin/mysqladmin -u root password "password_for_root" //修改mysql root帐户的密码
# service mysqld stop //关闭 MySQL