Centos设置开机启动Apache和Mysql
2017-06-01 17:26
555 查看
先用chkconfig --list查询apache和mysql服务是否存在,不存在则需要手动添加
[root@centos64 vsftpd]# chkconfig --list
测试存在,只需要开启就行了
[root@centos64 vsftpd]# chkconfig httpd on
[root@centos64 vsftpd]# chkconfig mysqld on
这样就可以了
chkconfig在命令行操作时会经常用到,它可以方便地设置和查询不同运行级上的系统服务chkconfig 语法:
chkconfig [--add] [--del] [--list] [系统服务]
chkconfig [--level/levels] [等级代号] [系统服务] [on/off/reset]
等级代码为:linux系统的运行级别。linux 将操作 环境分为以下7个等级,即
0:关机
1:单用户模式(单用户、无网络)
2:无网络支持的多用户模式(多用户、无网络)
3:有网络支持的多用户模式(多用户、有网络)
4:保留,未使用
5:有网络支持有X-Window支持的多用户模式(多用户、有网络、X-Window界面)
6:重新引导系统,即重启
先用chkconfig list查询apache和mysql服务是否存在,不存在则需要手动添加。
添加apache服务项命令:
chkconfig -add httpd
添加完设置启动项:
chkconfig --level 2345 httpd on
chkconfig --level 2345 mysqld on
[root@centos64 vsftpd]# chkconfig --list
测试存在,只需要开启就行了
[root@centos64 vsftpd]# chkconfig httpd on
[root@centos64 vsftpd]# chkconfig mysqld on
这样就可以了
chkconfig在命令行操作时会经常用到,它可以方便地设置和查询不同运行级上的系统服务chkconfig 语法:
chkconfig [--add] [--del] [--list] [系统服务]
chkconfig [--level/levels] [等级代号] [系统服务] [on/off/reset]
等级代码为:linux系统的运行级别。linux 将操作 环境分为以下7个等级,即
0:关机
1:单用户模式(单用户、无网络)
2:无网络支持的多用户模式(多用户、无网络)
3:有网络支持的多用户模式(多用户、有网络)
4:保留,未使用
5:有网络支持有X-Window支持的多用户模式(多用户、有网络、X-Window界面)
6:重新引导系统,即重启
先用chkconfig list查询apache和mysql服务是否存在,不存在则需要手动添加。
添加apache服务项命令:
chkconfig -add httpd
添加完设置启动项:
chkconfig --level 2345 httpd on
chkconfig --level 2345 mysqld on
相关文章推荐
- Centos设置开机启动Apache和Mysql
- Centos设置开机启动Apache和Mysql
- Centos设置开机启动Apache和Mysql[总结]
- Centos设置开机启动Apache和Mysql[总结]
- centos设置apache、mysql及ftp服务开机自动启动的方法
- Linux中 设置apache,mysql 开机启动
- Linux(CentOS)下设置mysql开机自动启动和chkconfig管理
- centos下怎么设置Apache 开机启动!
- Linux 设置apache,mysql开机启动[转贴]
- CentOS系统如何设置APACHE和MYSQL服务开机自动运行
- linux安装mysql nginx 设置 mysql apache开机启动
- Linux 设置apache,mysql开机启动
- Linux 设置apache,mysql开机启动
- Linux 设置apache,mysql开机启动
- linux服务器通过设置mysql,apache为系统服务,实现开机启动
- Linux/CentOS 服务安装/卸载,开机启动chkconfig命令详解|如何让MySQL、Apache开机启动?
- centos开机自动启动Apache,Mysql,Samba、Svn等服务的方法
- Linux 设置apache,mysql开机启动
- Linux 设置apache,mysql开机启动[转贴]
- linux设置mysql,apache,tomcat开机启动