最近服務器的CentOS版本升級到了CentOS7.0,新的版本怎么好用還沒有體驗到,但是使用yum安裝Percona mysql5.6后發現跟之前不一樣了。CentOS6,使用yum安裝完Percona mysql5.6后,在/etc/init.d會自動添加mysqld的啟動項,所以啟動項的東西我們自己不用管,但是CentOS沒有了。
在網上沖了會浪,原來是CentOS7.0的新東西,systemd把SysV頂替了。
什么是SysV?http://www.ibm.com/developerworks/cn/linux/1407_liuming_init1/
什么是systemd?https://blog.linuxeye.com/400.html
好吧,兩個哥們還4b了很久:http://www.zhihu.com/question/25873473
好了,自己添加啟動項,step by step如下:
列出 systemd 服務,請執行 'systemctl list-unit-files'systemctl list-unit-files|grep mysql
chkconfig mysqld on 或者 systemctl enable mysqld.service
剩下的就是修改/etc/my.cnf mysql的加載順序沒有變的,搞定。
接下來隨便把我的tomcat redis-server 和memcached一起搞定吧。
redis:
看下redis的配置是不是我們想要的:
需要的話修改下配置文件吧
memcached:
配置文件
接下來就是去修改參數啦