安装宝塔
yum install -y wget && wget -O install.sh https://download.bt.cn/install/install_6.0.sh && sh install.sh
宝塔安装psql管理器 安装psql9.6
解压服务端
ln -s /www/server/pgsql/bin/psql /bin/psql
ln -s /www/server/pgsql/bin/pg_dump /bin/pg_dump
ln -s /www/server/pgsql/bin/pg_dumpall /bin/pg_dumpall
修改数据库密码
sudo -u postgres psql postgres -p 5432
ALTER USER postgres WITH PASSWORD ‘123456’;
导入数据库
psql -U postgres -W -f /root/bak.sql
安装rinetd
wget https://github.com/samhocevar/rinetd/releases/download/v0.70/rinetd-0.70.tar.gz
tar -zxvf rinetd-0.70.tar.gz
cd rinetd-0.70
./configure
make && make install
vim /etc/rinetd.conf
添加内容
下面的10.0.12.17改内网ip 101.43.88.105改外网ip
10.0.12.17 5567 101.43.88.105 5567
10.0.12.17 20060 127.0.0.1 20060
10.0.12.17 10320 101.43.88.105 10320
10.0.12.17 10021 101.43.88.105 10021
启动rinetd
结束pkill rinetd
sudo vim /etc/yum.repos.d/nux-misc.repo
添加内容
[nux-misc]
name=Nux Misc
baseurl=http://li.nux.ro/download/nux/misc/el7/x86_64/
enabled=0
gpgcheck=1
gpgkey=http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo yum –enablerepo=nux-misc install tunctl
tunctl -t eth1 -u root
101.43.88.105改外网ip
ifconfig eth1 101.43.88.105 netmask 255.255.255.0 promisc
评论(0)