Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说
linux keepalive配置_docker 挂载硬盘,希望能够帮助你!!!。
[root@ other]#wget –N http://downloads.sourceforge.net/openh323gk/gnugk-2.2.7-linux-x86.tar.gz?modtime=&big_mirror=0; tar zxf gnugk-2.2.7-linux-x86.tar.gz;cd gnugk-*; cp bin/gnugk /usr/sbin; mkdir -p /var/log/gk;touch /var/log/gk/cdr.log; cp gk.initd.redhat /etc/rc.d/init.d/gnugk;chmod 755 /etc/rc.d/init.d/gnugk; (備份資料庫)
[root@other]# vi /etc/rc.d/init.d/gnugk
LOGFILE=/var/log/gk/gk.log 更改成: LOGFILE=/var/log/gk/cdr.log (21行)
NDate=`date '+%Y%m%d-%k%M%S'` (取得系统当前日期,23行增加)
[ -f $LOGFILE ] && mv -f $LOGFILE $LOGFILE.bak 更改成: [ -f $LOGFILE ] && mv -f $LOGFILE $LOGFILE.$NDate.bak (40行)
[root@other]# mysqldump -u root -p mysql >/etc/gatekeeper/mysql_bak
[root@other]# rpm -e --nodeps (刪除rpm -qa |grep -i "mysql"列出的所有套件); rm -r -f /var/lib/mysql; rm -r -f /usr/lib/mysql; rm -r -f /usr/lib/mysql3; yum install mysql-* php-mysql libdbi-dbd-mysql MySQL-python mod_auth_mysql freeradius-mysql; service mysqld start; mysqladmin -u root password '****'; mysqladmin -u root -p create gk;
[root@other]# mysqladmin version -p
[root@other]# mysql -u root -p;
mysql> USE mysql; DELETE FROM user WHERE User = '';UPDATE user SET password=password('****') WHERE user='root'; INSERT INTO `user` VALUES ('localhost','root', password('****'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0); INSERT INTO `user` VALUES ('localhost','gkdba', password('****'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0); UPDATE user SET Show_db_priv='Y' WHERE user='gkdba'; FLUSH PRIVILEGES; ( 密碼是****)
mysql> DROP TABLE IF EXISTS `AliasData`;
CREATE TABLE `AliasData` (
`IDAlias` varchar(30) NOT NULL default '',
`IPAddr` varchar(30) NOT NULL default '',
`kind` tinyint(3) unsigned default NULL,
PRIMARY KEY (`IDAlias`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40000 ALTER TABLE `AliasData` DISABLE KEYS */;
LOCK TABLES `AliasData` WRITE;
INSERT INTO `AliasData` VALUES ('a','sigip:192.168.1.17:1720',0),('b','sigip:192.168.2.42:1720',0),('c','sigip:192.168.2.44:1720',0),('d','sigip:192.168.7.2:1720',0),('e','sigip:192.168.8.12:1720',0),('f','sigip:192.168.11.10:1720',0),('g','sigip:192.168.12.10:1720',0),('h','sigip:192.168.13.10:1720',0),('i','sigip:192.168.21.6:1720',0),('j','sigip:192.168.25.6:1720',0),('k','sigip:192.168.31.21:1720',0),('m','sigip:192.168.36.10:1720',0),('n','sigip:192.168.41.25:1720',0),('o','sigip:192.168.41.27:1720',0),('p','sigip:192.168.55.25:1720',0),('q','sigip:192.168.88.7:1720',0),('r','sigip:192.168.130.14:1720',0),('s','sigip:192.168.130.53:1720');
UNLOCK TABLES;
/*!40000 ALTER TABLE `AliasData` ENABLE KEYS */;
DROP TABLE IF EXISTS `IPNData`;
CREATE TABLE `IPNData` (
`IPN` varchar(20) NOT NULL default '',
`Password` varchar(20) NOT NULL default '',
`IPAddr` varchar(20) NOT NULL default '',
`kind` tinyint(3) unsigned default NULL,
PRIMARY KEY (`IPN`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40000 ALTER TABLE `IPNData` DISABLE KEYS */;
LOCK TABLES `IPNData
今天的分享到此就结束了,感谢您的阅读,如果确实帮到您,您可以动动手指转发给其他人。
上一篇
已是最后文章
下一篇
已是最新文章