how_to
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| how_to [2016/08/18 15:52] – [Creating patch for rpm] k2patel | how_to [2020/08/10 02:35] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 21: | Line 21: | ||
| To drop all the table in the mysql database - use the following command. | To drop all the table in the mysql database - use the following command. | ||
| + | <WRAP prewrap> | ||
| <code mysql> | <code mysql> | ||
| mysqldump -u[USERNAME] -p[PASSWORD] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[USERNAME] -p[PASSWORD] [DATABASE] | mysqldump -u[USERNAME] -p[PASSWORD] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[USERNAME] -p[PASSWORD] [DATABASE] | ||
| </ | </ | ||
| + | </ | ||
| ==== How to list pear using php ==== | ==== How to list pear using php ==== | ||
| Line 201: | Line 201: | ||
| If you need to run cron with your own php.ini and send result to mail use following. | If you need to run cron with your own php.ini and send result to mail use following. | ||
| + | <WRAP prewrap> | ||
| <code bash> | <code bash> | ||
| */1 */2 * * * / | */1 */2 * * * / | ||
| </ | </ | ||
| + | </ | ||
| ==== Exit Codes ==== | ==== Exit Codes ==== | ||
| At some point you feel like there is no exit code documentation and you want find you what should it return.\\ | At some point you feel like there is no exit code documentation and you want find you what should it return.\\ | ||
| Line 323: | Line 323: | ||
| **Step 2** : Create Raid Drive. ( this command will create "/ | **Step 2** : Create Raid Drive. ( this command will create "/ | ||
| + | <WRAP prewrap> | ||
| <code bash> | <code bash> | ||
| mdadm --create --level=10 --raid-devices=4 --spare-devices=0 --chunk=128 --layout=f2 /dev/md10 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 | mdadm --create --level=10 --raid-devices=4 --spare-devices=0 --chunk=128 --layout=f2 /dev/md10 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 | ||
| </ | </ | ||
| + | </ | ||
| **Step 3**: Format Drive ( I am formatting for XFS ) | **Step 3**: Format Drive ( I am formatting for XFS ) | ||
| Line 424: | Line 426: | ||
| ==== Creating patch for rpm ==== | ==== Creating patch for rpm ==== | ||
| + | this can be used as ' | ||
| <code bash> | <code bash> | ||
| diff -ru hdf-4.2.12-orig hdf-4.2.12-diff >| ../ | diff -ru hdf-4.2.12-orig hdf-4.2.12-diff >| ../ | ||
| Line 431: | Line 434: | ||
| replace amaya with your application etc...\\ | replace amaya with your application etc...\\ | ||
| This is usefull while compiling sources for systems | This is usefull while compiling sources for systems | ||
| + | <WRAP prewrap> | ||
| <code bash> | <code bash> | ||
| ../ | ../ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== Run single command parallel' | ||
| + | <WRAP prewrap> | ||
| + | <code bash> | ||
| + | (echo " | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== Print yum variable value ==== | ||
| + | <code python> | ||
| + | import yum | ||
| + | import pprint | ||
| + | |||
| + | yvar = yum.YumBase() | ||
| + | pprint.pprint(yvar.conf.yumvar, | ||
| + | </ | ||
| + | |||
| + | ==== Disable Predictable interface name in RHEL / CentOS ==== | ||
| + | Pass following during boot kernel command line. | ||
| + | <code bash> | ||
| + | net.ifnames=0 | ||
| </ | </ | ||
how_to.1471535574.txt.gz · Last modified: 2020/08/10 02:30 (external edit)