在centos里安装postgres
./configure --with-libraries=/usr/local/lib --with-includes=/usr/local/include
.....
configure: error: readline library not found
If you have readline already installed, see config.log for details on the
failure. It is possible the compiler isn't looking in the proper directory.
Use --without-readline to disable readline support.
要安装 readline , readline-dev 开发包,要么使用 --without-readline 选项关闭 readline 功能。
yum install readline;
yum install readline-dev;
readline 也就是命令行编辑,关闭的话,你直接用psql 就不能编辑命令行,如果输错指令,不能回滚命令历史记录,只能手工重新输入。
./configure --with-libraries=/usr/local/lib --with-includes=/usr/local/include
.....
configure: error: zlib library not found
If you have zlib already installed, see config.log for details on the
failure. It is possible the compiler isn't looking in the proper directory.
Use --without-zlib to disable zlib support.
解决方法
yum install zlib-devel;
make
make install
chown -R postgres.postgres /usr/local/pgsql
vi /etc/passwd 更改postgres的home 为/usr/local/pgsql
su -postgres
mkdir data
export PATH=$PATH:$HOME/bin
export PGDATA=$PATH:$HOME/data
initdb 初始化数据库
postgres -D /usr/local/pgsql/data 或者pg_ctl -D /usr/local/pgsql/data -l logfile start 启动数据库
启动后,可以用pg_ctl stop/start 进行控制
/usr/local/pgsql/data/postgresql.conf 可以更改listener和port,
pg_hda.conf 更改允许连接的机器
建立数据库
$createdb mydb
PostgreSQL 会返回 “ CREATED DATABASE”的信息,表明数据库建立完成。
$psql mydb
进入交互 psql 工具,建立表:
CREATE TABLE mytable (
id varchar(20),
name varchar(30));
建立完成后,会得到一条 “CREATED” 的信息,表示建立成功。现在插入一条数据:
INSERT INTO mytable values('1', 'abc');
psql 返回 INSERT 18732 1,查询插入是否成功:
SELECT * FROM MYTABLE;
退出 psql ,用 \q 命令。
分享到:
相关推荐
3. 错误:`configure: error: Please reinstall readline – I cannot find readline.h` 解决:执行 `yum -y install readline-devel` 安装readline开发库。 4. 错误:`configure: error: Cannot find pspell` ...
* 错误信息:configure: error: readline headers/libs are not available 解决方法:安装readline-devel包。 * 错误信息:configure: error: X11 headers/libs are not available 解决方法:安装xorg-dev包。 本文...
- **解决方法**:安装`readline`和`readline-devel`。 ```bash yum install readline readline-devel ``` 3. **问题3:** - **错误信息**:`configure:error:zliblibrarynotfound.` - **解决方法**:安装`...
如编译报错提示:configure:3414: error: no acceptable C compiler found in $PATH yum -y install gcc ./configure && make && make install 安装完成后 [root@localhost rlwrap-0.42]# which rlwrap /usr/local/...
log-error=/usr/local/mysql/mysql_error.log pid-file=/usr/local/mysql/mysql.pid ``` 注意这里修改了`datadir`的路径。 6. **启动MySQL服务**: ```bash /etc/init.d/mysql.server start ``` 7. **检查...
- 如果出现类似 `checking for /usr/include/readline.h configure:error:` 的错误,可能是因为 SQLite 配置时未能正确检测到所需库的存在。此时可以尝试手动指定相关路径或使用特定的配置选项来解决。 通过以上...
log-error=/data/mysql/log/error/mysql_error.log slow_query_log_file=/data/mysql/log/slow/mysql_slow.log general_log_file=/data/mysql/log/general/mysql_general.log relay_log=/data/mysql/log/relay...
- `configure error: zlib-headers and/or libs where not found`: 当出现这个错误时,需要安装`zlib-devel`。 - `yum -y install zlib-*` - `configure error: bzip2-headers and/or libs where not found`: ...
./configure --prefix=/usr/local/webserver/mysql/ --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --...
1. **错误:configure: error: no acceptable C compiler found in $PATH** 缺少GCC编译环境。安装GCC即可: ```bash yum install -y gcc ``` 2. **错误:zipimport.ZipImportError: can't decompress data*...
如果在安装过程中遇到`RuntimeError: Compression requires the (missing) zlib module`的错误,你需要安装`zlib-devel`包,然后重新编译安装Python 3.6: ```bash sudo yum install zlib-devel cd ../Python-3.6.1...
-DWITH_READLINE=1 \ -DMYSQL_UNIX_ADDR=/tmp/mysql/mysql.sock \ -DMYSQL_TCP_PORT=3306 \ -DENABLED_LOCAL_INFILE=1 \ -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DEXTRA_CHARSETS=all \ -DDEFAULT_CHARSET=utf...
首先,安装Python 3.6需要安装一系列依赖包,这些依赖包包括但不限于openssl-devel、bzip2-devel、expat-devel、gdbm-devel、readline-devel和sqlite-devel。这些依赖包是通过yum工具安装的。 安装依赖完成后,需要...
./configure --prefix=/usr/local/webserver/mysql/ --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --...
readline readline-devel \ libxslt libxslt-devel \ libmcrypt libmcrypt-devel \ mhash mhash-devel \ systemd-devel openjpeg-devel 安装完编译工具和依赖后,我们需要为 FPM 分配一个运行用户和用户组...
* look for ncurses and termcap in configure (in combination with readline). * make lots of internal functions and variables static. * fix 0 vs NULL in many places. fix ansi c style (void). * avoid ...
[root@2f60c4bcddfa /]# yum install make automake autoconf libtool gcc gcc-c++ libuuid-devel zlib-devel mysql-devel readline-devel gperftools-devel.x86_64 -y Libraries have been installed in: /usr/...