"ERROR - Show plugins"
cookie issue faced during the wamp server 2.0 mysql.
2.What is logrotate
- logrotate is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large.
it runs as daily cron job.
"/var/log/httpd/access.log" /var/log/httpd/error.log {
rotate 5
mail www@my.org
size=100k
sharedscripts
postrotate
/sbin/killall -HUP httpd
endscript
}
3.On linux ntsysv command is used to show the run startup programs.
4.Host file on linux is "/etc/hosts"
- you can mention the domain name here and this domain then will be used to virtual host in httpd.conf file
5. The ^M character is identified by vi -b filename
6. linux svn export command
svn export --force --username=suchitb --password=cybag_4321 https://permuto.svn.cvsdude.com/permuto/trunk/tools /home/test/tools
7.exporting the enviroment variable
export DEV_HOME=/home/test
8.copy file to test box
scp -i .ssh/id_rsa
9.ssh -i .ssh/id_rsa cybage@test.pulsemgr.com
10.tar command on linux
tar -cvzf permuto_admin_app.tar.gz permuto
11. Assign permissions to the apache
chown apache permuto
12. execute sql on command console
execute mysql -uroot < permuto_admin.sql
13. yum install php-mysql
14. /etc/init.d/httpd start
15./etc/httpd/conf/httpd.conf
16.mysqldump -uroot -ppassword permuto > permuto_09Apr09.sql
17.chmod a+w permuto
18.top command is used to show the running services on linux .
19.error regarding "Permissions 0655 for '/root/.ssh/id_rsa' are too open."
-solution is "chmod 0600 .id_rsa" ssh stopped complaining and I could ssh w/o entering a password. Happy ending.
MYSQL:
20.To get the mysql database size use
select SUM(data_length)/1024 from information_schema.tables where table_schema = 'permuto';
MYSQL:
21
1.mysqldump -h DBSERVER -u DBUSER -p DBNAME > DBNAME.sql
22. mysql dump exclude tables from database.
2.mysqldump -uroot --databases permuto --ignore-table=permuto.ad_templates --ignore-table=permuto.tab_menu >v.sql
23. for multiple rows in one record
SELECT city,
-> GROUP_CONCAT(DISTINCT first_name
-> ORDER BY city DESC SEPARATOR ' ')
-> FROM employee
-> GROUP BY city;
SELECT city,
-> GROUP_CONCAT(first_name)
-> FROM employee
-> GROUP BY city;
24. To change the db location to other drive
create db in mysql
move the /var/lib/mysql dbname to another location
change the permission to 755
change the owner ship to mysql:mysql (chown -R mysql:mysql permuto)
25 LInux:
df -h >>>>gives file system used space
du -h >> current folders size
26. Command to find large files on linux box
COMMAND -> find / -type f -size +1000000k -exec ls -lh {} \; | awk '{ print$NF ": " $5 }'
will give list of files like -> /usr/local/mysql/data/ibdata1: 23G