Want to know command to restart linux server from putty? we have a huge selection of command to restart linux server from putty information on alibabacloud.com
service, and execute two AP
Ache Restart command, can be modified as needed. echo $ (date) "Apache restart" >>/var/log/apachemonitor.log # Write log Sleep 30 # wait 30 seconds after reboot completes, and then try again if! Curlit; Then # If you still cannot access, then: Echo $ (date) failed! Now Reboot computer! ">>/var/log/apachemonitor.log # writes to Apache
No matter what system, the normal operation of the time to try not to restart, restart only a few cases:You may need to restart the server only after it has been hit by a flood, upgraded and updated, and the software is recompiled. And also1. Unable to remotely2, the application needs to
Nginx reboot Command
The code is as follows
Copy Code
Sudo/etc/init.d/nginx Usage:/etc/init.d/nginx {Start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}
With root permissions
The code is as follows
Copy Code
#killall Nginx#nginx
Attention:
Source code inst
Linux server ACPID service restart every day-Linux general technology-Linux technology and application information, the following is a detailed description. # Cat/var/log/boot. log
Shown as follows:
May 18 04:02:09 Host1 acpid: acpid startup succeeded
May 18 04:02:09 Host
How to start/stop/restart MySQLFirst, the starting mode1. Start with service: Service mysqld start2. Start with mysqld script:/etc/inint.d/mysqld start3. Use Safe_mysqld to start:safe_mysqldSecond, stop1. Start with service: Service mysqld stop2. Start with mysqld script:/etc/inint.d/mysqld stop3, mysqladmin shutdownThird, restart1. Start with service: Service mysqld restart2. Start with mysqld script:/etc/inint.d/mysqld restartSee if MySQL starts the
Table 4 will be corrected by W (RITE)
Command (M for help): nCommand actionE extendedP primary partition (1-4)PPartition Number (1-4): 1First cylinder (1-28197, default 1 ):Using default value 1Last cylinder or + size or + sizem or + sizek (1-28197, default 28197 ):Using default value 28197
Command (M for help): WThe partition table has been altered!
Calling IOCTL () to re-read partition table.Syncing disk
There is a system method inside PHP that can invoke the command.
First create a script (metaphor/root/reboot_server.sh), re-enable.
Copy CodeThe code is as follows:
#!/bin/bash
Reboot
Give him permission again. 4755
Chown root:root/root/reboot_server.sh
chmod 4755/root/reboot_server.sh
chmod 4777/sbin/reboot
In PHP again, try to make the following call
Copy CodeThe code is as follows:
System ("/root/reboot_server.sh");
?>
The other functions a
There is a system method inside PHP that can invoke the command.
First create a script (metaphor/root/reboot_server.sh), re-enable.
Copy the Code code as follows:
#!/bin/bash
Reboot
Give him permission again. 4755
Chown root:root/root/reboot_server.sh
chmod 4755/root/reboot_server.sh
chmod 4777/sbin/reboot
In PHP again, try to make the following call
Copy the Code code as follows:
System ("/root/reboot_server.sh");
?>
The other functions a
There is a system method inside PHP that can invoke the systems command.
First create a script (metaphorically/root/reboot_server.sh), and re-enable it.
Copy Code code as follows:
#!/bin/bash
Reboot
and give him permission 4755.
Chown root:root/root/reboot_server.sh
chmod 4755/root/reboot_server.sh
chmod 4777/sbin/reboot
Again in PHP, try to do the following call
Copy Code code as follows:
System ("/root/reboot_server.sh");
WordPress University in the last few days the server environment is not very stable, CPU occupancy is always 100%, toss several times did not find the reason, had to consider the reconfiguration of the environment, considering the configuration and optimize the environment need a few hours, the total can not stop the site, so will be the University of WordPress The website temporarily migrates to another server
The interface-friendliness, graphics performance, and attachment tools of the Linux desktop environment have evolved dramatically, but the Linux server has yet to reach this step. As a system administrator, you must be proficient in Linux commands. There are many Linux comma
: chmod u+rwx file1chmod g = rwx file1 file1 file group has permission for rwx, this sentence can also be changed to: chmod g+rwx file1chmod o = rwx file1 file1 file Other user rights are rwx, this sentence can also be changed to: chmod o+rwx file1chmod u-x Filex Delete file1 file owner's x permissionchmod UG=RW File1 also set the File1 file owner and group permissions to RWXchmod ug+x file also increases the X-rights of file1 files owners and groups----------------------------------------------
The installation of the CentOS notebook without mouse operation is not convenient, two notebooks are placed on the desktop operation is also very inconvenient, so windows with SSH Landing server operation is very necessary. Download a putty, the software is very small, green software, directly open can be used. CentOS uses ifconfig to query the IP address, Windows with
/nfs#重启后自动挂载echo "192.168.1.210:/shaohuilin/mnt/nfs NFS defaults 0 0" >>/etc/fstab write at last: 1, after WINDOWS NFS service creation starts, Discovery Repair automatically adds a port open in the firewall, without shutting down the firewall, to implement NFS mounts in the Linux server. 2, the Port of NFS is generally 111 and 2049, reference: http://blog.csdn.net/fhqsse220/article/details/45668057 because
Most of the IO statistics tools under Linux, such as Iostat, Nmon, and so on, are only counted to the Per Device's read and write situations, and if you want to know how each process uses IO, it's a bit cumbersome.If you can systemtap, or blktrace these things difficult to everyone, but no special tools are always not very comfortable. Fortunately, the Linux 2.6.20 kernel provides an IO accounting feature b
During project development, it is often necessary to upload downloaded files from windows to a Linux server. Here's a quick introduction to how to upload a download file.Download install putty software: Https://pan.baidu.com/s/1bpagyyrCMD into the Putty installation directory:Make sure there are files:pscp.exeUpload:PS
It is easy to log in to another Linux server from Linux under SSH--provided that you have a user account on the remote server. Open the shell terminal and execute the following commandSSH-L login_name hostnameReplace the login_name with the real user account and replace the hostname with the
Linux Server management is not as convenient as Windows Server Management, of course, Linux can also be visualized visual operation, I am accustomed to use the SSH command management operations, often encounter the site to generate a large number of garbage files distress, d
WordPress University in the last few days the server environment is not very stable, CPU occupancy is always 100%, toss several times did not find the reason, had to consider the reconfiguration of the environment, considering the configuration and optimize the environment need a few hours, the total can not stop the site, so will be the University of WordPress The website temporarily migrates to another server
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.