Linux Commands and Paths for a Plesk Server
March 4, 2010Leave a reply
This is my on-going cheat sheet of Linux commands for my Plesk server running on CentOS 5. I will keep updating this as I go on. Read more to see the list:
Restarting Firewall
- /etc/rc.d/init.d/psa-firewall stop
- /etc/rc.d/init.d/psa-firewall start
Restart Plesk
- /etc/init.d/psa stop
- /etc/init.d/psa start
Restart MySQL
- /etc/init.d/mysqld restart
Optimize all MySQL databases and tables
- mysqlcheck -Ao -u username -ppassword (Optimize all)
- mysqlcheck -Aa -u username -ppassword (Just analyze)
- mysqlcheck -Aao -auto-repair -u username -ppassword (Analyze, repair and optimize)
Run Logwatch
- logwatch –print –detail High –archives –range All
Change Ownership
- chown user:group /some/folder
- chown user:group /some/folders-and-the-files-inside/*
Copy Contents of a Folder to Another
- cp -r /some/folders-and-the-files-inside/* /some/folder
Check Sub-folder Sizes in the Current Folder
- du -sh *
Check Total Size of a Folder
- du -sh
List Partitions and Drive Space Usage
- df -k
Splunk Commands
- /opt/splunk/bin/splunk stop
