Linux 服务器环境启动
2016-01-25 13:56
519 查看
1、PHP
关闭php
killall php-fpm
php重启
/usr/local/php/sbin/php-fpm &
或者
/usr/local/php/sbin/php-fpm {start|stop|quit|restart|reload|logrotate}
--start 启动php的fastcgi进程
--stop 强制终止php的fastcgi进程
--quit 平滑终止php的fastcgi进程
--restart 重启php的fastcgi进程
--reload 重新平滑加载php的php.ini
--logrotate 重新启用log文件
注:/usr/local/php/sbin/php-fpm还有其他参数,包括:start|stop|quit|restart|reload|logrotate。
# /etc/init.d/php-fpm restart
# /etc/init.d/php-fpm restart
# /etc/init.d/php-fpm restart
2、Nginx
关闭nginx
/usr/local/nginx/sbin/nginx -s stop //关闭服务器
启动nginx
/usr/local/nginx/sbin/nginx 开启服务器
重启nginx
/usr/local/nginx/sbin/nginx -s reload 重启服务器
3、MySQL
1、查看mysql版本
方法一:status;
方法二:select version();
2、Mysql启动、停止、重启常用命令
a、启动方式
1、使用 service 启动:
[root@localhost /]# service mysqld start (5.0版本是mysqld)
[root@szxdb etc]# service mysql start (5.5.7版本是mysql)
2、使用 mysqld 脚本启动:
/etc/inint.d/mysqld start
3、使用 safe_mysqld 启动:
safe_mysqld&
b、停止
1、使用 service 启动:
service mysqld stop
2、使用 mysqld 脚本启动:
/etc/inint.d/mysqld stop
3、mysqladmin shutdown
c、重启
1、使用 service 启动:
service mysqld restart
service mysql restart (5.5.7版本命令)
2、使用 mysqld 脚本启动:
/etc/init.d/mysqld restart
4、SVN
svnserve -d -r /home/svnroot (/home/svnroot svn安装目录)
5、Apache
基本的操作方法:
本文假设你的apahce安装目录为/usr/local/apache2,这些方法适合任何情况
apahce启动命令:
推荐/usr/local/apache2/bin/apachectl start apaceh启动
apache停止命令
/usr/local/apache2/bin/apachectl stop 停止
apache重新启动命令:
/usr/local/apache2/bin/apachectl restart 重启
要在重启 Apache 服务器时不中断当前的连接,则应运行:
/usr/local/sbin/apachectl graceful
如果apache安装成为linux的服务的话,可以用以下命令操作:
service httpd start 启动
service httpd restart 重新启动
service httpd stop 停止服务
关闭php
killall php-fpm
php重启
/usr/local/php/sbin/php-fpm &
或者
/usr/local/php/sbin/php-fpm {start|stop|quit|restart|reload|logrotate}
--start 启动php的fastcgi进程
--stop 强制终止php的fastcgi进程
--quit 平滑终止php的fastcgi进程
--restart 重启php的fastcgi进程
--reload 重新平滑加载php的php.ini
--logrotate 重新启用log文件
注:/usr/local/php/sbin/php-fpm还有其他参数,包括:start|stop|quit|restart|reload|logrotate。
# /etc/init.d/php-fpm restart
# /etc/init.d/php-fpm restart
# /etc/init.d/php-fpm restart
2、Nginx
关闭nginx
/usr/local/nginx/sbin/nginx -s stop //关闭服务器
启动nginx
/usr/local/nginx/sbin/nginx 开启服务器
重启nginx
/usr/local/nginx/sbin/nginx -s reload 重启服务器
3、MySQL
1、查看mysql版本
方法一:status;
方法二:select version();
2、Mysql启动、停止、重启常用命令
a、启动方式
1、使用 service 启动:
[root@localhost /]# service mysqld start (5.0版本是mysqld)
[root@szxdb etc]# service mysql start (5.5.7版本是mysql)
2、使用 mysqld 脚本启动:
/etc/inint.d/mysqld start
3、使用 safe_mysqld 启动:
safe_mysqld&
b、停止
1、使用 service 启动:
service mysqld stop
2、使用 mysqld 脚本启动:
/etc/inint.d/mysqld stop
3、mysqladmin shutdown
c、重启
1、使用 service 启动:
service mysqld restart
service mysql restart (5.5.7版本命令)
2、使用 mysqld 脚本启动:
/etc/init.d/mysqld restart
4、SVN
svnserve -d -r /home/svnroot (/home/svnroot svn安装目录)
5、Apache
基本的操作方法:
本文假设你的apahce安装目录为/usr/local/apache2,这些方法适合任何情况
apahce启动命令:
推荐/usr/local/apache2/bin/apachectl start apaceh启动
apache停止命令
/usr/local/apache2/bin/apachectl stop 停止
apache重新启动命令:
/usr/local/apache2/bin/apachectl restart 重启
要在重启 Apache 服务器时不中断当前的连接,则应运行:
/usr/local/sbin/apachectl graceful
如果apache安装成为linux的服务的话,可以用以下命令操作:
service httpd start 启动
service httpd restart 重新启动
service httpd stop 停止服务
相关文章推荐
- CentOS下开启mysql远程连接,远程管理数据库
- linux运维管理之Puppet
- 【Linux】Android Studio在ubuntu14.04中的配置
- 理解 Linux 的硬链接与软链接
- Centos配置国内yum源
- Linux曲径通幽:用户管理
- Linux多线程实践(三)线程的基本属性设置API
- 使用ettercap实现中间人攻击
- 【Linux】ubuntu14.04使用过程中的一些常用设置
- linux for循环
- Linux下磁盘保留空间的调整,解决df看到的空间和实际磁盘大小不一致的问题
- linux 添加自定义环境变量
- linux常用命令—— 磁盘管理(十二)
- 升级Linux内核
- Linux中的文件压缩命令tar与rar的用法总结
- Linux slab 分配器剖析
- Centos6部署LNMP平台
- linux
- 用 Python 脚本实现对 Linux 服务器的监控
- Linux中控制文件权限修改的chgrp和umask命令用法