当前位置: 首页 > news >正文

抓好网站建设工作产品宣传

抓好网站建设工作,产品宣传,什么信息发布型网站,做彩票网站会被判死刑脚本 新建一个/opt/onekey-build-og.sh文件,存入以下内容 #!/bin/bash # 环境 centos 7.9 4C 8G (配置越高编译越快,4G内存编译不了,磁盘大概需要14GB) # 安装一些依赖 (libaio-devel如果不卸载重装,可能会找不到io_c…

脚本

  • 新建一个/opt/onekey-build-og.sh文件,存入以下内容

    #!/bin/bash
    # 环境 centos 7.9 4C 8G  (配置越高编译越快,4G内存编译不了,磁盘大概需要14GB)
    # 安装一些依赖 (libaio-devel如果不卸载重装,可能会找不到io_context_t)
    yum remove libaio-devel libaio -y
    yum install -y git gmp  gmp-devel  mpfr  mpfr-devel  libmpc  libmpc-devel libaio libaio-devel flex bison ncurese-devel glibc-devel patch rehat-lsb-core readline-devel perl gcc gcc-c++# 新建一个用户
    useradd omm500# 创建目录
    mkdir /opt/omm500
    chown omm500 /opt/omm500 -R# 切换用户执行编译及安装
    chown omm500 install.sh
    chmod 777 install.sh
    su - omm500 -c "cd /opt && bash install.sh"
    
  • 新建一个/opt/install.sh文件,存入以下内容

    #!/bin/bash
    # 创建数据目录
    cd /opt/omm500
    mkdir data# 下载编译好的三方库并解压(这里下载的是Centos7.6_x86_64的版本,在7.6和7.9都能用)
    wget https://opengauss.obs.cn-south-1.myhuaweicloud.com/5.0.0/binarylibs/openGauss-third_party_binarylibs_Centos7.6_x86_64.tar.gz
    tar -xvf openGauss-third_party_binarylibs_Centos7.6_x86_64.tar.gz# 克隆数据库源码仓
    git clone https://gitee.com/opengauss/openGauss-server -b 5.0.0# 配置环境变量(这里最核心的一点就是把gcc的默认路径改了,操作系统默认的版本太低)
    echo "export CODE_BASE=/opt/omm500/openGauss-server     # Path of the openGauss-server file " >> ~/.bash_profile
    echo "export BINARYLIBS=/opt/omm500/openGauss-third_party_binarylibs_Centos7.6_x86_64    # Path of the binarylibs file " >> ~/.bash_profile
    echo "export GAUSSHOME=\$CODE_BASE/dest/ " >> ~/.bash_profile
    echo "export GCC_PATH=\$BINARYLIBS/buildtools/gcc7.3/ " >> ~/.bash_profile
    echo "export CC=\$GCC_PATH/gcc/bin/gcc " >> ~/.bash_profile
    echo "export CXX=\$GCC_PATH/gcc/bin/g++ " >> ~/.bash_profile
    echo "export LD_LIBRARY_PATH=\$GAUSSHOME/lib:\$GCC_PATH/gcc/lib64:\$GCC_PATH/isl/lib:\$GCC_PATH/mpc/lib/:\$GCC_PATH/mpfr/lib/:\$GCC_PATH/gmp/lib/:\$LD_LIBRARY_PATH " >> ~/.bash_profile
    echo "export PATH=\$GAUSSHOME/bin:\$GCC_PATH/gcc/bin:\$PATH " >> ~/.bash_profile
    echo "export PGDATA=/opt/omm500/data" >> ~/.bash_profile
    echo "export PGPORT=5432" >> ~/.bash_profile
    echo "export PGDATABASE=postgres" >> ~/.bash_profile# 加载环境变量
    source ~/.bash_profile# 进入源码目录
    cd $CODE_BASE# 编译server (这里就是openGauss提供的一键式编译脚本)
    sh build.sh -m release -3rd $BINARYLIBS# 文件夹改名 (原文档说会生成dest目录,但实际上是生成到了mppdb_temp_install,所以改个名)
    mv mppdb_temp_install dest # 克隆插件仓,并复制到server源码目录内(必须单独编译,因为如果先放到server源码内,server都会编译不成功)
    git clone https://gitee.com/opengauss/Plugin -b 5.0.0
    cp Plugin/contrib/*  $CODE_BASE/contrib/ -r# 编译dolphin插件
    cd contrib/dolphin
    make install# 复制插件到编译好的server目录
    cp *.so $GAUSSHOME/lib/postgresql/ 
    cp *.control $GAUSSHOME/share/postgresql/extension/ 
    cp *.sql $GAUSSHOME/share/postgresql/extension/ # 初始化数据库
    gs_initdb --nodename=primary --pwpasswd=Sinvie@123# 配置一些数据库参数
    echo "port=$PGPORT" >> $PGDATA/postgresql.conf
    echo "listen_addresses = '0.0.0.0'" >> $PGDATA/postgresql.conf
    echo "password_encryption_type = 0" >> $PGDATA/postgresql.conf
    echo "log_directory = 'pg_log'" >> $PGDATA/postgresql.conf
    echo "remote_read_mode=non_authentication" >> $PGDATA/postgresql.conf
    echo "host all all 0.0.0.0/0 md5" >> $PGDATA/pg_hba.conf# 启动数据库
    gs_ctl start # 连接数据库并创建一个B库
    gsql -c "create database sioc_3_3 dbcompatibility='B'";# 开启一些mysql特性
    gsql -c "alter database sioc_3_3 set enable_set_variable_b_format = on;";
    gsql -c "alter database sioc_3_3 set dolphin.lower_case_table_names = 0;";
    gsql -c "alter database sioc_3_3 set dolphin.B_COMPATIBILITY_MODE = on;";
    # gsql -c "alter database sioc_3_3 set dolphin.sql_mode = '';";
    gsql -c "alter system set  enable_dolphin_proto= on;";
    # gsql -c "alter system set  default_database_name=sioc_3_3;";
    gsql -c "alter system set  dolphin_server_port=3306;";gs_ctl restart
    
  • 对onekey-build-og.sh 授权可执行

    chmod 777 onekey-build-og.sh
    
  • 然后执行这个sh文件(4C 8G 100M宽带 大约30分钟)

    ./onekey-build-og.sh
    

连接数据库

su - omm500
gsql -r -d sioc_3_3 -h 127.0.0.1 -U omm500 -W Sinvie@123
  • 表名大小写敏感及反引号

    create table Test_123 (`a` int, `B` int ,"Ab" int);
    \d+ "Test_123"
    select * from Test_123;--不会报错
    select * from test_123;--会报错
    
  • mysql客户端连接
    如果机器上没有安装mysql客户端,则先安装一下

    yum -y install http://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm
    yum search mysql
    yum install -y mysql-community-client.x86_64
    

创建一个新的数据库用户,授为管理员

su - omm500
gsql -c "create user emt password 'Sinvie@123';"
alter user emt sysadmin;
ALTER DATABASE "sioc_3_3" OWNER TO emt;CREATE SCHEMA public AUTHORIZATION emt;ALTER SCHEMA "public" OWNER TO "emt";

navicat连接

使用emt,密码:Sinvie@123,端口号5432,postgresql协议

环境清理命令

su - omm500
gs_ctl stop
exituserdel omm500
rm -rf /opt/omm500
rm -rf /home/omm500

本文参考:https://www.darkathena.top/archives/one-key-build-opengauss-and-dolphin

http://www.ds6.com.cn/news/121791.html

相关文章:

  • 车公庙做网站世界十大搜索引擎排名
  • 又拍云 wordpress使用兰州seo网站建设
  • 做网站老板嫌弃太丑谁的锅活动软文怎么写
  • 厦门网站改版网站搭建源码
  • 自己做的网站怎么赚钱吗上海公司排名
  • 贵阳网站建站建设定制google官方入口
  • 郑州有哪些搞网站开发的公司微信广告
  • 网络营销工程师是做什么的全专业优化公司
  • 一家专门做直销的网站制作网站的步骤是什么
  • 网站SEM优化如何做拼多多关键词优化步骤
  • 黑龙江省建设教育协会网站首页seo渠道
  • 网站建设的特点东莞网站建设推广哪家好
  • 想要个免费网站国产长尾关键词拘挖掘
  • 百度速页建站电脑培训班一般要学多久
  • 上海闵行区租房价格厦门百度关键词优化
  • 找事做的网站策划公司一般怎么收费
  • 宜城做网站服务营销7p理论
  • 投诉做单骗子网站全网营销有哪些平台
  • wordpress go跳转成都纯手工seo
  • 简洁大气的公司网站哪个推广网站好
  • 电子商务网站预算北京度seo排名
  • 海口专业网站搭建批发推广引流平台
  • 普陀网站建设公司百度搜索推广流程
  • 怎么才能在百度上做网站推广奉节县关键词seo排名优化
  • 男女做爰网站19福建seo外包
  • 网页制作dw怎么制作特效网站为什么要做seo
  • 太原网站建设-中国互联吴中seo网站优化软件
  • 网页设计网站架构今天的新闻大事10条
  • 怎样通过阿里巴巴网站开发客户网站的收录情况怎么查
  • 如何给网站做第三方流量监测怎么创造自己的网站