Set up ftp
http://youtu.be/YJBlyvLtTfs
Linux, Windows, Software Tips, Articles and Hacks
Set up ftp
http://youtu.be/YJBlyvLtTfs
How to add an IP to access the plesk panel and ssh
Open flle /etc/sysconfig/iptables:
# nano /etc/sysconfig/iptables -A INPUT -s 72.177.xxx.xxx/32 -p tcp -m tcp --dport 8443 -j ACCEPT -A INPUT -s 66.226.xx.xx/32 -p tcp -m tcp --dport 10222 -j ACCEPT
Save and restart iptables
service iptables restart
Make an archive of a plesk httpdocs directory
tar -cvzf domain.com_backup_7.17.14.tar.gz /var/www/vhosts/domain.com/httpdocs/
Result
-rw-r--r-- 1 root root 14482441 Jul 17 14:09 domain.com_backup_7.17.14.tar.gz
Extract the same file
tar -xf domain.com_backup_7.17.14.tar.gz
Export a database mysql
# mysqldump -u -p username database_name > dbname.sql
Plesk Server
# mysqldump -u admin -p`cat /etc/psa/.psa.shadow` wordpress_database > domain_backup_7.16.14.sql
To export a single table from your database you would use the following command:
# mysqldump -p --user=username database_name tableName > tableName.sql
Import a database or table
# mysql -p -u username database_name < file.sql [/bash] For Plesk server [bash] # mysql -u admin -p`cat /etc/psa/.psa.shadow` database < /tmp/database.sql [/bash] To import a single table into an existing database you would use the following command: [bash] #mysql -u username -p -D database_name < tableName.sql [/bash]
To check disk IO:
dd bs=1M count=512 if=/dev/zero of=test conv=fdatasync 512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 5.57475 s, 96.3 MB/s
There’s a test available at http://cbl.abuseat.org/helocheck.html that will show you how the server is actually HELOing.
For Qmail: # cat /var/qmail/control/me mail.fromthepavilion.org
Check you cron job. Make sure the path are okay.
This is likely due to Plesk using a chrooted environment. The user that is executing the script doesn’t have access to PHP. You have a few options:
1. Add PHP to the user’s chroot – http://kb.sp.parallels.com/en/115842
2. Disable the chrooted environment entirely – http://blog.blums.eu/2013/01/25/parallels-plesk-panel-11-non-chrooted-cronjobs
3. Run the script as root because root does have access to PHP (not recommended but if the script is trusted it might be ok).
Find file owned by a group
find directory-location -group {group-name} -name {file-name}
directory-location : directory path.
-group {group-name} : group-name.
-name {file-name} : The file name or a search pattern
Issue: Plesk server will not allow updating plugins and the site is running as fastcgi – which uses the ftp user as the root user ( coldriverw:psacln) is the user:group for this account.
In this example, locate or find all files belongs to a group called “apache” in the /var/www/vhosts/coldriverdata.com/httpdocs/ directory:
[root@austin plugins]# find /var/www/vhosts/domain.com/httpdocs/ -group apache /var/www/vhosts/domain.com/httpdocs/.htaccess /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/enhanced-tooltipglossary /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/enhanced-tooltipglossary/readme.txt
Change the files to the correct user:
[root@austin plugins]# chown -R domain:psacln /var/www/vhosts/domain.com/httpdocs/wp-content
Retry the wordpress upload
Update Plugin Downloading update from https://downloads.wordpress.org/plugin/enhanced-tooltipglossary.zip… Unpacking the update… Installing the latest version… Removing the old version of the plugin… Plugin updated successfully.
More information:
http://www.cyberciti.biz/faq/how-do-i-find-all-the-files-owned-by-a-particular-user-or-group/
Source:
http://www.how2centos.com/centos-6-puppet-install/
Install the Puppet Repository
# rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-7.noarch.rpm
Install the EPEL x86_64 YUM Repository
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Install the Puppet Master packages
# yum install puppet-server
Install the Puppet Client packages
# yum install puppet
See more – HERE
See Puppet install
http://docs.puppetlabs.com/guides/install_puppet/install_el.html
Check the logs
/var/log/messages, which stores logs from many native CentOS services, such as the kernel logger, the network manager, and many other services that don’t have their own log files. This log file tells you if there are kernel problems (kernel panic messages) or kernel limits violations, such as the number of currently open files, which can cause system problems. You can fix kernel misconfigurations by editing the file /etc/sysctl.conf and changing the value for the corresponding error.
/var/log/dmesg, which contains information about hardware found by the kernel drivers. It can help you troubleshoot hardware problems and missing drivers. You can also use the command /bin/dmesg for similar purposes. /bin/dmesg provides more detailed information in real time, while the log file keeps less information for historical purposes.
/var/log/audit/audit.log, which is the file in which the Linux Auditing System (auditd) writes its logs, including all SELinux information. If auditd is disabled, SELinux sends its logs to /var/log/messages. SELinux is a common suspect for any strange behavior and problems in CentOS. It is enabled by default in CentOS 6 and should not be frivolously disabled, as it is important for security. You can check its status with the command sestatus. A Wazi article about Linux server hardening covers the basics of SELinux, including how to adjust its policies in order to avoid problems.
Service- and application-specific logs – Many applications create logs in other places, and have options that control where and what to log. By default in CentOS the Apache web server logs in the directory /var/log/httpd/, mail servers log in /var/log/maillog, and MySQL logs in /var/log/mysqld.log. However, not all logs are located in the logs directory. Some applications, such as user-space programs, may not have privileges to write there. Others prefer to log inside their own root directory. You may need to consult an application’s manual to learn where it writes its logs.
If it’s gone down without logging anything, it might be power related so it’s not had the chance to log anything.