, set crontab timing execution/etc/crontab #在最后一行中加入: 00 3 * * * root /usr/sbin/bakmysql.sh#表示每天3点00分执行备份
Note: The crontab configuration file format is as follows:Time-sharing Weekly command
5. Restart Crontab/etc/rc.d/init.d/crond restart That's it. Scheduled backups and cleanup of backup data for the first 7 daysSynchronizing to other serversThis uses the Linux Sync File tool rsync+inotify to synchronize the files.RsyncRsync is a da
pdo_dblib of the PHP extension PDO#cd/USR/LOCAL/SRC/ONEINSTACK/SRC#tar ZXVF php-5.6.28.tar.gz#cd php-5.6.28#cd/ext/pdo_dblibUsing Phpize to add extensions to PHP dynamically under Linux#/usr/local/php/bin/phpize#./configure--with-php-config=/usr/local/php/bin/php-config--with-pdo-dblib=/usr/local/freetds/# Make make installAdded in php.ini file :extension= "pdo_dblib.so"4. increase the MSSQL extension#cd/usr/local/src/oneinstack/src/php-5.6.28/ext/m
/dev/null. In layman's words, all standard output and standard errors are thrown into the trash, where the means that the command executes in the background.
)3. Add Execute permissions for scripts# chmod +x/usr/sbin/bakmysql.sh4, set crontab timing executionVi/etc/crontab# added in the last line: 3 * * * root/usr/sbin/bakmysql.sh# to perform a backup daily 3:00
Note: The crontab configuration file format is as follows: Time-
sharing weekly command
5. Restart Crontab/etc/r
C Language Learning-Implementation of TCP servers and clients in Linux
The client code is as follows:
# Include
# Include
# Include
# Include
# Include
# Include
# Include
# Include
# Define portnumber 3333
Int main (int argc, char * argv []){Int sockfd;Char buffer [1024];Struc
NagiosThe process of monitoring a Linux server is as follows:
Client Configuration:
User Creation:
Useradd nagios can modify the shell of this account in/etc/password to/sbin/nologin)
Passwd nagios
Install plug-ins:
tarzxvfnagios-plugins-1.4.11.tar.gz
cdnagios-plugins-1.4.11
./configure--prefix=/usr/local/nagios--enable-redhat-pthread-workaround
makeall
makeinstall
Modify permissions:
Chown nagios: nagios/usr/local/nagio
In Red Hat Enterprise Linux 5.0 server, if NFS fails, you can check the problem from the following aspects.
1.1 troubleshooting ideas
(1) Whether the NFS client and server load is too high, and whether the network between the server and the client is normal.
(2) Correctness of the/etc/exports file.
(3) restart the NFS or portmap service if necessary.
Run the following command to restart portmap and NFS:
Service portmap restart
Disable and enable ping on Linux servers
Modify/proc/sys/net/ipv4/icmp_echo_ignore_all to 1. Disable ping from 0.
Sysctl-w net. ipv4.icmp _ echo_ignore_all = 1.
Another method is iptables-based ping.
Iptables-a input-p icmp -- icmp-type 8-s 0/0-j DROP
The ping Command sends an ICMP request packet to the destination IP address, and then the destination IP address returns an ICMP packet. The precedin
Take the two linux servers rootA and rootB as examples to compile and install the latest openSSH version (recommended). The default setting of openSSH is to allow root users to directly log in. (PermitRootLogin yes). For the moment, we will first consider how to use SSH to directly log on from rootA to rootB without a password. Let's take the root user as an example to describe how to use the root user to l
, catalina_home with catalina_home2, replace, and upload and replace;
4. Finally, set the server under tomcat2/CONF. XML open modify close port (8005) and start port (8009), and access port, the default is 8080, if the default configuration of the First tomcat is not modified, at startup, the ports are used by the First tomcat. Therefore, when starting the second tomcat, to avoid port conflicts, you can change these ports to ports not 8009, or. In this way, two or more Tomcat
Today, we found that the linux machine cannot be connected through ssh and cannot be pinged on the machine. Later, we checked the number of TIME_WAIT connections through the netstat-anp | grep TIME_WAIT | wc-l command, let's take a look at the solutions to a large number of TIME_WAIT problems.
Symptom:
1. External machines cannot connect to SSH normally
2. The internal and external domain names cannot be properly pinged or resolved.
Troubleshooting:
R
account, you can specify the UID, Example: Useradd–u user3 2, use the passwd command to set a password for the new user Example: passwd user1 Note: Users who do not have a password set cannot use it. Example: change user user1 's login name to U1, Usermod–l U1 user1 Example: Adding user user1 to the Users group, Usermod–g users user1 Example: change user user1 directory to/users/us1Usermod–d/users/us1 user14. Use the command Userdel to delete the user accountExample: Deleting a us
Recently, a Web server (with a MySQL server locally) has been running for some time to discover that the server is occasionally inaccessible.Both mysql,ftp and SSH are not responsive, but SSH is not affected by the connection, and when viewing the system log,There was no discovery. After thinking of Ulimit, see found under ordinary users max user processes is 1024,The other machines are root, this value is unlimited, so in/etc/security/limits.d/90-nrpoc.confCancellation of the normal login user
-keygen-b 1024-t RSAOn server BThe first step is to enter/HOME/LINUXIDC CD/HOME/LINUXIDC (because we are using LINUXIDC user, if we use other users, we need to go to other user's directory, such as Cd/home/weblogic)The second section, create the. SSH directory, mkdir. SSHPart III, enter the. SSH directory, CD. SSHFourth, create a new file Authorized_keys, Touch Authorized_keysOn server AFifth step, execute scp-p. ssh/id_rsa.pub [Email Protected]:/home/linuxidc/.ssh/authorized_keys/authorized_key
accesses the shared folder with the root user, the root user is mapped to an anonymous userThe root user is not mapped when the No_root_squash client accesses the shared folder with rootAll_squash mapped to anonymous users when any user on the client access the shared directoryAnonuid A user who maps a user on a client to a specified local user IDAnongid maps the user on the client to the specified local user group IDSync data synchronously written to memory and hard diskAsync data is staged in
Heartbeat IntroductionThe Heartbeat project is an integral part of the LINUX-HA project, which implements a highly available cluster system. Heartbeat service and cluster communication are two key components of a highly available cluster, and in the Heartbeat project, these two functions are implemented by the Heartbeat module.Heartbeat structure Diagram650) this.width=650; "Src=" http://img.blog.csdn.net/20170731120145362?watermark/2/text/ ahr0cdovl2
, it is important to note that here is more easily confused.Whether the copy command is scp-r dir111 [email protected]:/tmp or scp-r/tmp/dir111 [email protected]:/tmp, the directory structure generated on the remote server is the same, I have tested it myself.[Email protected]_test_server tmp]# scp-r/tmp/dir111 [email protected]:/tmp[email protected] ' s password:file111 100% 0.0kb/s 00:00Remote server 192.168.1.112 The above content[Email protected]:/tmp# lsdir111 Test Vmware-root[Email protect
/auto.masterAdd a /home/text-autonfs/etc/auto.nfs/home/autofs-test does not need to exist for this directory to be automatically created after mounting.3. Edit Auto.nfs (not originally present, automatically created when editing)Vi/etc/auto.nfsAdd one: dong-rw 192.168.1.3:/home/dong4. Restart the AutoFS serviceServeice autofs Restart650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/82/EA/wKioL1dk-UTQ__zxAAAkLoR7EsE733.jpg-wh_500x0-wm_3 -wmp_4-s_2064229193.jpg "title=" 6.1.jpg "alt=" Wki
server format is different, here just need a password, I wasted a few hours in this tosssudo chmod 600/etc/rsync.passwdsudo vim/usr/bin/rsync.sh#!/bin/Bashhost=192.168.0.2User=rsync_usersrc=/var/www/des=Web/usr/bin/inotifywait-mrq--timefmt'%d/%m/%y%h:%m'--format'%T%w%f%e'-E Modify,delete,create,attrib $src | whileRead Files Do/usr/bin/rsync-avz--delete--password-file=/etc/rsync.passwd$SRC [email protected] $host:: $des >>/var/log/rsync.log2>1 Donesrc=/var/spool/cron/des=Cron/usr/bin/inotifywait
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.