天龙八部linux环境配置详细教程
# 进入安装目录
cd /opt
# 数据库安装
yum -y remove mysql-libs
tar zxvf MySQL.tar.gz
rpm -ivh mysql-client.rpm
rpm -ivh mysql-server.rpm
#云主机安装
rpm -ivh mysql-client.rpm –nodeps –force
rpm -ivh mysql-server.rpm –nodeps –force
# 数据库权限相关操作
mysql -e “grant all privileges on *.* to ‘root’@’%’ identified by ‘root’ with grant option;”;
mysql -e “create database tlbbdb;”;
mysql -e “create database tlbb;”;
mysql -uroot tlbbdb < tlbbdb.sql
mysql -uroot tlbb < tlbb.sql
mysql -e “use mysql;update user set password=password(‘root’) where user=’root’;”;
mysql -e “flush privileges;”;
# 安装ODBC与ODBC相关依赖组件
tar zxvf lib.tar.gz
rpm -ivh unixODBC-libs.rpm
rpm -ivh unixODBC-2.2.11.rpm
rpm -ivh libtool-ltdl.rpm
rpm -ivh unixODBC-devel.rpm –nodeps –force
# 安装MYSQL ODBC驱动
tar zxvf ODBC.tar.gz
ln -s /usr/lib64/libz.so.1 /usr/lib/lib
rpm -ivh mysql-odbc.rpm –nodeps
# ODBC配置
tar zvxf Config.tar.gz -C /etc
chmod 644 /etc/my.cnf
sed -i “s/^\(Password = \).*/\1root/” /etc/odbc.ini
# 解压ODBC支持库到use/lib目录
tar zvxf odbc.tar.gz -C /usr/lib
虚拟内存设置
#创建虚拟内存
dd if=/dev/zero of=/wwwlongm2cn bs=1024 count=4096000
mkswap /wwwlongm2cn
mkswap -f /wwwlongm2cn
swapon /wwwlongm2cn
#设置开机启动
vi /etc/fstab
/wwwlongm2cn swap defaults 00
#启动
swapon /wwwlongm2cn
#关闭
swapoff /wwwlongm2cn