Fedora16 mysql
ServerStart
16:32:50 | category:
Linux/Unix | font size
Subscription
From Fedora16, ntsysv, chkconfig, and service are no longer recommended for Redhat, but new service management tools are recommended.Systemctl (seemingly powerful)
The comparison table uses apache/httpd as an example.
| Task |
Old commands |
New command |
| Enable a service automatically |
Chkconfig -- level 3 httpd on |
systemctl enable httpd.service
|
| Disable Automatic startup of a service |
Chkconfig -- level 3 httpd off |
systemctl disable httpd.service
|
| Check service status |
Service httpd status |
systemctl status httpd. Service (service details)Systemctl is-active httpd. service (only show whether it is Active)
|
| Show all started services |
(Who knows ?) |
systemctl list-units --type=service
|
| Start a service |
Service httpd start |
systemctl start httpd.service
|
| Stop a service |
Service httpd stop |
systemctl stop httpd.service
|
| Restart a service |
Service httpd restart |
systemctl restart httpd.service
|
Mysql installation:
Yum install mysql-server # install mysql and mysqlServerSystemctl start mysqld. service # start mysqlServerSystemctl enable mysqld. service # enable mysqlServerAutomatic RunningMysqladmin-u root password ''# Set the root password to null