Linux Collection

Error 500 Internal server error hosting

Đổi permission

chown -R ateamdes:ateamdes iwp
+++++
Tim Error log file CentOS CWP
tail -f /var/log/suphp.log

CWP Login Logs /var/log/cwp_login.log
Apache server Logs location: /usr/local/apache/logs/
suPHP Log /var/log/suphp.log
PHP Rebuild Log (PHP Switcher) /var/log/php-rebuild.log

[[email protected] logs]# grep ErrorLog /usr/local/apache/conf/httpd.conf
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a
ErrorLog “logs/error_log”
+++++
Tìm members thuộc group
Xem group mà user đang login thuộc vào
groups
id -Gn

Xem user nào đó thuộc group gì
groups userName
id -Gn userName

Xem tất cả users thuộc 1 group
lid -g psacln

++++++
Import file SQL vô DB xài Command line

mysql -u root -p ateamdes_iwp < kmaaolox_iwp.sql
++++++++
Mysql backup và restore

http://webcheatsheet.com/sql/mysql_backup_restore.php

mysqldump -u [uname] -p[pass] [dbname] | gzip -9 > [backupfile.sql.gz]

gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname]

+++++++++
Zip thư mục
zip -r ogn20150306.zip * .htaccess -x bk.zip
-x: exclude
++++++++
Unzip file .zip
unzip -o file.zip
-o: overwrite
++++++++

admin has written 114 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>