您现在的位置是:首页 > 折腾心得折腾心得

PVE 天龙八部TLBB服务端搭建(一)--linux环境搭建

高晓波2020-02-08【折腾心得】人已围观

简介1、安装ubuntu,这里我用的ubuntu的10.04 32位版本,下载地址

2、上传至PVE,安装ubuntu,安装过程略

3、linux运行环境搭建
3.1 替换ubuntu国内镜像源,修改dns,更新apt-get
修改源

1、安装ubuntu,这里我用的ubuntu的10.04 32位版本,下载地址

2、上传至PVE,安装ubuntu,安装过程略
 
3、linux运行环境搭建
3.1 替换ubuntu国内镜像源,修改dns,更新apt-get
修改源
sudo vi /etc/apt/sources.list

添加中科大源:
deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu lucid main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu lucid-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu lucid-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu lucid-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu lucid-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu lucid main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu lucid-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu lucid-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu lucid-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu lucid-backports main restricted universe multiverse

注释掉ubuntu的源,保存。

修改DNS
sudo vi /etc/resolv.conf 

修改为阿里的dns
nameserver 223.5.5.5
nameserver 223.6.6.6

更新apt-get
​​​​​​​sudo apt-get install -y openssh-server
sudo service ssh start

3.2 安装ssh服务,启动
sudo apt-get install -y openssh-server
sudo service ssh start

3.3 安装mysql相关
#安装mysql
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient-dev
 
#安装odbc
sudo apt-get install unixodbc
sudo apt-get install unixodbc-dev
sudo apt-get install libmyodbc

修改mysql配置,将bind-address 127.0.0.1注释掉,否则远程连接不了
vi /etc/mysql/my.cnf
 
#注释掉
#bind-address           = 127.0.0.1
 
#重启mysql
service mysql restart

登录mysql,设置mysql远程访问
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456';
flush privileges;

3.4 创建对应数据库tlbbdb、web,配置odbc.ini
创建数据库tlbbdb,web
CREATE DATABASE tlbbdb  DEFAULT CHARACTER SET latin1;
CREATE DATABASE web  DEFAULT CHARACTER SET latin1;

修改odbc.ini配置
vi /etc/odbc.ini
 
[tlbbdb]
Driver          = /usr/lib/odbc/libmyodbc.so
Description     = MyODBC 3.51 Driver DSN
SERVER          = 127.0.0.1
PORT            = 3306
USER            = root
Password        = 123456
Database        = tlbbdb
OPTION          = 3
SOCKET    

odbc连接测试
isql tlbbdb -v

3.5 关闭防火墙, 修改静态ip
sudo ufw disable

此处我就不设置静态ip了,ubuntu里直接设置dhcp,从路由器端绑定ubuntu mac地址分配固定静态ip。

 

4、win环境搭建,win7,winserver都可,在此不做赘述。

Tags:网游服务端   PVE

很赞哦! ()

文章评论