Centos 系统折腾
来源:互联网 发布:统计局报表怎么填数据 编辑:程序博客网 时间:2024/06/03 12:54
安装ftp:
主要借鉴:http://jingyan.baidu.com/album/425e69e6db71a7be15fc16e9.html?picindex=1
可能碰到问题有:
可以登录但是获取目录列表失败:https://www.olinux.org.cn/linux/1000.html
登陆和获取列表都是OK但是还是上传不上去:
设置开机启动ftp: allow_ftpd_access 为 on
[root@shepherd ~]# getsebool -a|grep ftp...allow_ftpd_full_access -->off...[root@shepherd ~]# setsebool -P allow_ftpd_full_access on
安装mysql:
主要借鉴http://www.cnblogs.com/sybblogs/p/5633956.html
其中第七步可以省略掉
mysql开机启动:
cp /etc/my.cnf /etc/mysql.cnf // 开机启动 cp support-files/mysql.server /etc/init.d/mysql chmod +x /etc/init.d/mysqlchkconfig --add mysqlservice mysql start chkconfig --level 35 mysql on
mysql数据库主从同步设置:
主库:192.168.0.117
配置my.cnf
[mysqld]#每个server_id是唯一的server_id=117#设置同步二进制文件名称log-bin=mysql-bin#要同步的mstest数据库binlog-do-db=test#这个参数一定要加上,否则不会给更新的记录些到二进制文件 里log-slave-updates=1#要忽略的数据库#binlog-ignore-db=mysql
然后重启mysql服务,查看主库同步设置:
SHOW MASTER STATUS;
注意:图片中file和position这两列在设置同步的时候很重要
从库:192.168.0.127
配置my.cnf
[mysqld]#每个server_id是唯一的server_id=127#设置同步二进制文件名称log-bin=mysql-bin#要同步的mstest数据库replication-do-db=test
重启从库mysql服务,然后进入mysql运行一下脚本:
mysql> change master to -> master_host='192.168.0.127', -> master_user='root', -> master_password='root', -> master_log_file='mysql-bin.000003', -> master_log_pos=1324;mysql> start slave;Query OK, 0 rows affected (0.00 sec)mysql> show slave status\G;*************************** 1. row ***************************Slave_IO_State: Waiting for master to send eventMaster_Host: 192.168.0.127Master_User: rootMaster_Port: 3306Connect_Retry: 60Master_Log_File: mysql-bin.000003Read_Master_Log_Pos: 1324Relay_Log_File: mysqld-relay-bin.000004Relay_Log_Pos: 1324Relay_Master_Log_File: mysql-bin.000001Slave_IO_Running: YesSlave_SQL_Running: YesReplicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table:
注意:从库上面运行的命令master_log_file对应的是主库的file值,master_log_pos对应的是主库的position值;
好了重要的就是这个了,基本上mysql主从同步就ok了!
0 0
- Centos 系统折腾
- CentOS折腾第一天
- CentOS折腾第二天
- CentOS 7 折腾小记
- CentOS 折腾记事
- centos git 折腾
- CentOS折腾codeblocks
- 在CentOS上折腾flash
- 9.19 搭服务器折腾centos
- 折腾了一天系统
- PogoPlug折腾全过程--Debian系统
- 折腾树莓派:1 系统安装
- 【折腾】centos mini安装后安装lnmp~
- 折腾
- 折腾
- 折腾...
- 折腾
- 折腾...
- Hessian和Java反序列化问题小结
- TCP UDP详解
- 阿里巴巴Druid数据源及使用
- 【bzoj2336】[HNOI2011]任务调度
- 【IDE-Visual Studio】如何在使用vs调试如何才能不显示反汇编?
- Centos 系统折腾
- strtus2学习(7)自定义类型转换器
- LCT模板题
- Java transient关键字使用小记
- pg学习_数据更新
- 灰度直方图及直方图均衡化
- 单例模式的八种写法比较
- Dlib 实现人脸的68点检测
- 老哥稳,如何优雅的解决SSD的写入放大问题