parent
5e1df6c47b
commit
5e40522e62
@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 黄海反复试验了几次,发现在设置之前关闭防火墙才是最安全的办法,否则会发生连接不上的问题
|
||||
service iptables stop
|
||||
|
||||
iptables -F
|
||||
iptables -X
|
||||
iptables -Z
|
||||
|
||||
# 据说这两句话是必不可缺少的
|
||||
iptables -I INPUT -i lo -j ACCEPT
|
||||
iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
|
||||
# 开放80端口
|
||||
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
|
||||
|
||||
#信任IP
|
||||
iptables -A INPUT -s 10.10.21.20 -j ACCEPT
|
||||
|
||||
#关闭其它人员进入
|
||||
iptables -P INPUT DROP
|
||||
|
||||
|
||||
# 保存iptbales规则
|
||||
service iptables save
|
||||
|
||||
# 重新启动
|
||||
service iptables restart
|
@ -1,54 +0,0 @@
|
||||
# 操作系统 openEuler-22.03-LTS-SP1
|
||||
|
||||
https://mirrors.nju.edu.cn/openeuler/openEuler-22.03-LTS-SP1/ISO/x86_64/openEuler-22.03-LTS-SP1-x86_64-dvd.iso
|
||||
|
||||
|
||||
用户名: root
|
||||
密码: DsideaL4r5t6y7u
|
||||
|
||||
# 修改IP
|
||||
cd /etc/sysconfig/network-scripts/
|
||||
vi ifcfg-ens33
|
||||
|
||||
TYPE=Ethernet
|
||||
PROXY_METHOD=none
|
||||
BROWSER_ONLY=no
|
||||
BOOTPROTO=static
|
||||
DEFROUTE=yes
|
||||
IPV4_FAILURE_FATAL=no
|
||||
IPV6INIT=yes
|
||||
IPV6_AUTOCONF=yes
|
||||
IPV6_DEFROUTE=yes
|
||||
IPV6_FAILURE_FATAL=no
|
||||
NAME=ens33
|
||||
UUID=31809ca1-cb2a-4136-9572-06e5c99394b8
|
||||
DEVICE=ens33
|
||||
ONBOOT=yes
|
||||
IPADDR=10.10.14.14
|
||||
NETMASK=255.255.255.0
|
||||
GATEWAY=10.10.14.1
|
||||
DNS1=219.149.194.55
|
||||
DNS2=219.149.194.56
|
||||
|
||||
|
||||
#重启network 服务
|
||||
yum install net-tools.x86_64 -y
|
||||
systemctl restart NetworkManager
|
||||
|
||||
|
||||
#关闭防火墙服务
|
||||
systemctl stop firewalld.service
|
||||
|
||||
#关闭防火墙开机自启
|
||||
systemctl disable firewalld.service
|
||||
|
||||
|
||||
#关闭 SELinux
|
||||
setenforce 0 && sed -i s#SELINUX=enforcing#SELINUX=disabled# /etc/selinux/config
|
||||
|
||||
#增大允许打开的文件数——修改系统配置文件
|
||||
echo "* soft nofile 65535" >> /etc/security/limits.conf
|
||||
echo "* hard nofile 65535" >> /etc/security/limits.conf
|
||||
|
||||
重启生效
|
||||
reboot
|
@ -1,52 +0,0 @@
|
||||
#安装依赖
|
||||
yum install -y libaio-devel flex bison ncurses-devel glibc-devel patch readline-devel libnsl net-tools ntpdate expect tar gcc make gcc-c++ openssl-devel
|
||||
pip3 install psutil netifaces cffi pycparser cryptography pynacl bcrypt paramiko -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
# 安装步骤
|
||||
mkdir /usr/local/openGauss
|
||||
cd /usr/local/software/
|
||||
wget https://opengauss.obs.cn-south-1.myhuaweicloud.com/5.0.0/x86_openEuler_2203/openGauss-Lite-5.0.0-openEuler-x86_64.tar.gz
|
||||
tar zxvf openGauss-Lite-5.0.0-openEuler-x86_64.tar.gz -C /usr/local/openGauss
|
||||
|
||||
groupadd dbgrp
|
||||
useradd -g dbgrp -m omm
|
||||
echo omm | passwd --stdin omm
|
||||
|
||||
chmod -R 777 /usr/local/openGauss
|
||||
|
||||
su - omm
|
||||
cd /usr/local/openGauss
|
||||
./install.sh --mode single -D /usr/local/openGauss/data -R /usr/local/openGauss/install --start
|
||||
source /home/omm/.bashrc
|
||||
|
||||
vi /usr/local/openGauss/data/postgresql.conf
|
||||
listen_addresses = '*'
|
||||
password_encryption_type = 0
|
||||
|
||||
vi /usr/local/openGauss/data/pg_hba.conf
|
||||
|
||||
替换为下面的内容:
|
||||
|
||||
# "local" is for Unix domain socket connections only
|
||||
local all all trust
|
||||
# IPv4 local connections:
|
||||
host all all 127.0.0.1/32 trust
|
||||
host all all 0.0.0.0/0 md5
|
||||
# IPv6 local connections:
|
||||
host all all ::1/128 trust
|
||||
# Allow replication connections from localhost, by a user with the
|
||||
# replication privilege.
|
||||
#local replication gsdb trust
|
||||
#host replication gsdb 127.0.0.1/32 trust
|
||||
#host replication gsdb ::1/128 trust
|
||||
|
||||
|
||||
gs_ctl restart -D /usr/local/openGauss/data
|
||||
|
||||
gsql -d postgres
|
||||
CREATE USER postgres WITH PASSWORD 'DsideaL147258369';
|
||||
ALTER USER postgres sysadmin;
|
||||
|
||||
# 自动启动
|
||||
echo "su omm -c 'gs_ctl restart -D /usr/local/openGauss/data'" >> /etc/rc.local
|
||||
chmod +x /etc/rc.d/rc.local
|
Binary file not shown.
@ -1,32 +0,0 @@
|
||||
mkdir /usr/local/redis/
|
||||
wget https://download.redis.io/releases/redis-7.0.9.tar.gz
|
||||
tar -xf redis-7.0.9.tar.gz
|
||||
cd redis-7.0.9
|
||||
make PREFIX=/usr/local/redis install -j4
|
||||
|
||||
cp redis.conf /usr/local/redis/bin/
|
||||
|
||||
# 不管有用没用,先一下再说
|
||||
cd /usr/local/redis/bin && rm -rf dump.rdb
|
||||
|
||||
sed -i 's#6379#18890#g' /usr/local/redis/bin/redis.conf
|
||||
sed -i 's#bind 127.0.0.1 -::1#bind 0.0.0.0#g' /usr/local/redis/bin/redis.conf
|
||||
sed -i 's#daemonize no#daemonize yes#g' /usr/local/redis/bin/redis.conf
|
||||
sed -i 's#protected-mode yes#protected-mode no#g' /usr/local/redis/bin/redis.conf
|
||||
sed -i 's/# save "/save "/g' /usr/local/redis/bin/redis.conf
|
||||
|
||||
# 杀进程
|
||||
ps -ef |grep redis |awk '{print $2}'|xargs kill -9
|
||||
|
||||
|
||||
# 启动
|
||||
cd /usr/local/redis/bin/ && ./redis-server redis.conf
|
||||
|
||||
# 添加到启动
|
||||
echo "cd /usr/local/redis/bin/ && ./redis-server redis.conf " >> /etc/rc.local
|
||||
chmod +x /etc/rc.d/rc.local
|
||||
|
||||
# 验证启动
|
||||
netstat -lntup |grep redis
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
10.10.14.91
|
||||
10.10.14.93
|
||||
10.10.14.95
|
||||
DsideaL4r5t6y7u!@#
|
||||
|
Loading…
Reference in new issue