中标麒麟v10sp1在飞腾2000+系统安装略
<p>一、中标麒麟v10sp1在飞腾2000+系统安装略</p><p>二、系统依赖包安装</p>
<p># yum install bzip*<br># nkvers<br>############## Kylin Linux Version #################<br>Release:<br>Kylin Linux Advanced Server release V10 (Tercel)</p>
<p>Kernel:<br>4.19.90-17.ky10.aarch64</p>
<p>Build:<br>Kylin Linux Advanced Server<br>release V10 (SP1) /(Tercel)-aarch64-Build04/20200711<br>#################################################<br> # yum install -y perl-ExtUtils-Embed<br># yum install -y flex<br>root@ft2000db opt]# yum install -y bison<br>root@ft2000db opt]# yum install -y readline-devel<br>root@ft2000db opt]# yum install -y zlib-devel<br>root@ft2000db opt]# yum install -y openssl-devel<br>root@ft2000db opt]# yum install -y pam-devel<br>root@ft2000db opt]# yum install -y libxml2-devel<br>root@ft2000db opt]# yum install -y libxslt-devel<br>root@ft2000db opt]# yum install -y openldap-devel<br>root@ft2000db opt]# yum install -y python-devel<br>root@ft2000db opt]# yum install -y gcc-c++<br>root@ft2000db opt]# yum install -y libssh2-devel</p>
<p>下载安装软件及创建安装目录<br># wget http://ftp.postgresql.org/pub/source/v13.1/postgresql-13.1.tar.bz2<br># tar xjvf postgresql-13.1.tar.bz2<br># cd postgresql-13.1/<br># mkdir -p /opt/pgsql<br># ./configure --prefix=/opt/pgsql<br>................................................................<br>configure: creating ./config.status<br>config.status: creating GNUmakefile<br>config.status: creating src/Makefile.global<br>config.status: creating src/include/pg_config.h<br>config.status: creating src/include/pg_config_ext.h<br>config.status: creating src/interfaces/ecpg/include/ecpg_config.h<br>config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s<br>config.status: linking src/backend/port/posix_sema.c to src/backend/port/pg_sema.c<br>config.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c<br>config.status: linking src/include/port/linux.h to src/include/pg_config_os.h<br>config.status: linking src/makefiles/Makefile.linux to src/Makefile.port</p>
<p><br># gmake //这里编译时间大约30分钟,如果失败一般都是系统依赖包原因,根据提示解决<br>.............................................................................................................<br>gmake: 离开目录“/opt/postgresql-13.1/src/test/isolation”<br>gmake -C test/perl all<br>gmake: 进入目录“/opt/postgresql-13.1/src/test/perl”<br>gmake: 对“all”无需做任何事。<br>gmake: 离开目录“/opt/postgresql-13.1/src/test/perl”<br>gmake: 离开目录“/opt/postgresql-13.1/src”<br>gmake -C config all<br>gmake: 进入目录“/opt/postgresql-13.1/config”<br>gmake: 对“all”无需做任何事。<br>gmake: 离开目录“/opt/postgresql-13.1/config”<br>All of PostgreSQL successfully made. Ready to install.</p>
<p>#gmake install<br>..........................................................................................<br>gmake: 离开目录“/opt/postgresql-13.1/src”<br>gmake -C config install<br>gmake: 进入目录“/opt/postgresql-13.1/config”<br>/usr/bin/mkdir -p '/opt/pgsql/lib/pgxs/config'<br>/usr/bin/install -c -m 755 ./install-sh '/opt/pgsql/lib/pgxs/config/install-sh'<br>/usr/bin/install -c -m 755 ./missing '/opt/pgsql/lib/pgxs/config/missing'<br>gmake: 离开目录“/opt/postgresql-13.1/config”<br>PostgreSQL installation complete.</p>
<p>三、检查安装的版本</p>
<p># /opt/pgsql/bin/postgres --version<br>postgres (PostgreSQL) 13.1</p>
<p>创建用户和组<br># groupadd -g 1002 postgres<br># useradd -g 1002 -u 1002 postgres<br># passwd postgres<br># chown -R postgres:postgres /opt/<br># chmod -R 775 /opt/<br>配置环境变量</p>
<p>$ cat .bash_profile<br># Source /root/.bashrc if user has one<br>[ -f ~/.bashrc ] && . ~/.bashrc</p>
<p># User specific environment and startup programs</p>
<p>PATH=$PATH:$HOME/.local/bin:$HOME/bin</p>
<p>export PATH</p>
<p>PATH=/opt/pgsql/bin:$PATH<br>export PATH<br>LD_LIBRARY_PATH=/opt/pgsql/lib<br>export LD_LIBRARY_PATH</p>
<p>初始化数据库<br>$ mkdir -p /opt/pgsql/data<br>$ initdb -D /opt/pgsql/data<br>The files belonging to this database system will be owned by user "postgres".<br>This user must also own the server process.</p>
<p>The database cluster will be initialized with locale "zh_CN.UTF-8".<br>The default database encoding has accordingly been set to "UTF8".<br>initdb: could not find suitable text search configuration for locale "zh_CN.UTF-8"<br>The default text search configuration will be set to "simple".</p>
<p>Data page checksums are disabled.</p>
<p>fixing permissions on existing directory /opt/pgsql/data ... ok<br>creating subdirectories ... ok<br>selecting dynamic shared memory implementation ... posix<br>selecting default max_connections ... 100<br>selecting default shared_buffers ... 128MB<br>selecting default time zone ... Asia/Shanghai<br>creating configuration files ... ok<br>running bootstrap script ... ok<br>performing post-bootstrap initialization ... ok<br>syncing data to disk ... ok</p>
<p>initdb: warning: enabling "trust" authentication for local connections<br>You can change this by editing pg_hba.conf or using the option -A, or<br>--auth-local and --auth-host, the next time you run initdb.</p>
<p>Success. You can now start the database server using:</p>
<p>pg_ctl -D /opt/pgsql/data -l logfile start</p>
<p>启动数据库<br>$ pg_ctl -D /opt/pgsql/data start<br>waiting for server to start....2020-11-20 16:01:05.881 CST LOG: starting PostgreSQL 13.1 on aarch64-unknown-linux-gnu, compiled by gcc (GCC) 7.3.0, 64-bit<br>2020-11-20 16:01:05.882 CST LOG: listening on IPv6 address "::1", port 5432<br>2020-11-20 16:01:05.882 CST LOG: listening on IPv4 address "127.0.0.1", port 5432<br>2020-11-20 16:01:05.882 CST LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"<br>2020-11-20 16:01:05.884 CST LOG: database system was shut down at 2020-11-20 16:00:27 CST<br>2020-11-20 16:01:05.887 CST LOG: database system is ready to accept connections<br>done<br>server started</p>
<p>登录数据库<br>$ psql -p 5432<br>psql (13.1)<br>type "help" for help.</p>
<p>postgres=#</p>
<p>到此postgresql数据库安装完毕。<br>————————————————<br>版权声明:本文为CSDN博主「中国信创服务社区」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。<br>原文链接:https://blog.csdn.net/m0_46573967/article/details/112302237</p><br><br>
来源:https://www.cnblogs.com/sunalways/p/14524843.html
頁:
[1]