CentOS :: /etc/bashrc read-only
Posted by blackonsole on November 23rd, 2012 01:56 AM | No Comment
:: How to fix /etc/bashrc read only issue on CentOS
+ error permission denied
# echo "alias ftp='/usr/bin/ftp'" >> /etc/bashrc
-bash: /etc/bashrc: Permission denied
# ls -l /etc/bashrc
-rw-r--r-- 1 root root 1708 Sep 22 2009 /etc/bashrc
+ check and change attribute file
# lsattr /etc/bashrc
----i-------- ...
chown :: Change User / Group Only
Posted by blackonsole on November 13th, 2012 04:37 AM | No Comment
:: How to change user owner only using chown
chown myuser: hello.txt hello/
:: How to change group owner only using chown
chown :mygroup hello.txt hello/
:: Link
+ Google
+ man chown
:: Sudo without password
Posted by blackonsole on May 21st, 2012 07:57 AM | No Comment
:: How to setup sudo without password prompt
visudo
add this line for setup sudoer without password
your_username ALL=(ALL) NOPASSWD: ALL
:: Links
+ Google
+ Maestic
:: Cron: Auto restart daemon if it down
Posted by blackonsole on May 7th, 2012 04:20 AM | No Comment
:: How to create script for auto restart daemon if it down
+ create auto restart daemon script (nginx)
cat > alwaysup.sh
add the script, like these:
#!/bin/bash
alwaysup=`ps aux | grep -v grep | grep -c nginx`
if
then
...
:: Upgrade MySQL on WHM/cPanel
Posted by blackonsole on April 15th, 2012 02:26 AM | No Comment
:: How to upgrade MySQL in WHM/cPanel
Cli
/usr/local/cpanel/scripts/mysqlup
WHM
Main - Software - MySQL Upgrade
:: Link
+ Google
+ cPanel
:: Setup Attachment Size Limit on Postfix
Posted by blackonsole on December 31st, 2011 02:51 AM | 2 Comments
:: What is Postfix
Postfix is a free and open-source mail transfer agent (MTA) that routes and delivers electronic mail. It is intended as a fast, easier-to-administer, and secure alternative to the widely-used Sendmail MTA. - WikiPedia
:: How to setup attachment size limit
:: CSF on WHM / cPanel
Posted by blackonsole on December 27th, 2011 12:14 PM | No Comment
:: What is csf
csf is ConfigServer Security&Firewall made by configserver
:: How to install and integrated to WHM / cPanel
+ download and install