In Linux, Apache starts cpusrlocalapachebinapachectletcrc. dinit. dapachedchmod + xetcrc. dinit. dap at random.
In Linux, Apache randomly starts cp/usr/local/apache/bin/apachectl/etc/rc. d/init. d/apached chmod + x/etc/rc. d/init. d/ap
Apache originated from the NCSAhttpd server and has been modified many times to become one of the most popular Web server software in the world. Apache is taken from the pronunciation of "a patchy server", which means a server full of patches, because it is a free software, so there are people who constantly develop new functions, new features, and modify the original defects for it. Apache is simple, fast, and stable, and can be used as a proxy server.
Apache random startup in Linux
Cp/usr/local/apache/bin/apachectl/etc/rc. d/init. d/apached
Chmod + x/etc/rc. d/init. d/apached
Ln-s/etc/rc. d/init. d/apached/etc/rc3.d/S100apache
Ln-s/etc/rc. d/init. d/apached/etc/rc0.d/K100apache
Mysql random start
Default Configuration
Cp/usr/local/mysql/support-files/mysql. server/etc/rc. d/init. d/mysql
Chmod + x/etc/rc. d/init. d/mysql
Ln-s/etc/rc. d/init. d/mysql/etc/rc3.d/S100mysql
Ln-s/etc/rc. d/init. d/mysql/etc/rc0.d/K100mysql
Non-default installation. For example, create the Startup File/opt/mysql_server/start. sh in/opt/mysql_server.
#! /Bin/sh
Rundir = "/opt/mysql_server ";
Echo $ rundir;
/Usr/local/mysql/bin/mysqld_safe -- defaults-file = "$ rundir"/my. cnf -- pid-file = "$ rundir"/mysql. pid -- datadir = "$ rundir"/data -- socket = "$ rundir"/mysql. sock -- user = mysql -- log-error = "$ rundir"/error. log -- log-slow-queries = "$ rundir"/slow_query.log &
Create a stop file/opt/mysql_server/stop. sh
#! /Bin/sh
Rundir = "/opt/mysql_server ";
Echo $ rundir;
/Usr/local/mysql/bin/mysqladmin-uroot-pctech -- socket = "$ rundir"/mysql. sock shutdown
Create the configuration file my. cnf
[Mysqld]
Port = 8211
Skip-locking
Skip-innodb
Skip-name-resolve
Set-variable = back_log = 600
Set-variable = key_buffer = 4 M
Set-variable = max_allowed_packet = 2 M
Set-variable = table_cache = 512
Set-variable = sort_buffer = 16 M