Linux: FileSystem command tips
Saturday, January 23rd, 2010List the file systems
df -h
Size given folder
du -sh /path/to/folder
Sort/List largest directories/subdirectories
du /var/log/ | sort -nr | less
df -h
du -sh /path/to/folder
du /var/log/ | sort -nr | less
C:\PuTTY\pageant.exe d:\main.ppk
iptables -I INPUT 1 -s 0/0 -i eth0 -d 0/0 -p TCP --dport 443 -j ACCEPT
Here is the minimum configuration to enable SSL
….
NameVirtualHost *:443
<VirtualHost *:443>
DocumentRoot /path/to/html/
ServerName www.mysecuredomain.com
SSLEngine on
</VirtualHost>
Pre-requisites:
Tar and gzip the folder panda/ in the panda.tar.gz
tar -cvzf panda.tar.gz panda/
Untar
tar -xvzf panda.tar.gz
or (to change the base folder name)
tar -xvzf latest.tar.gz -C ./(folder name)
Source: lowfatlinux.com
tdy=`date +%Y-%m-%d-%H-%M` mkdir /var/backup/db_name/$tdy mysqldump -u db_user -p --opt db_name > /var/backup/db_name/$tdy/db_name-$tdy.sql
CSR-Generation Instructions
To generate a triple-DES encrypted key pair and a Certificate Signing Request (CSR):
Enter the following commands:
If you are requesting a Wildcard certificate, please add an asterisk (*) on the left side of the Common Name (e.g., “*.domainnamegoes.com” or “www*.domainnamegoeshere.com”). This will secure all subdomains of the Common Name.
(source: Godaddy’s help)
BTW, Godaddy has the cheapest certificates you can find (with great support).
Make sure you have the EPEL Repository installed in your yum repository, do the following:
Install Git with
> yum install git
You should get something like:
============================================================================= Package Arch Version Repository Size ============================================================================= Installing: git x86_64 1.5.5.6-2.el5 epel 3.5 M Installing for dependencies: perl-Error noarch 1:0.17010-1.el5 epel 26 k perl-Git x86_64 1.5.5.6-2.el5 epel 16 k Transaction Summary ============================================================================= Install 3 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 3.5 M Is this ok [y/N]: y
Make sure the git package comes from EPEL and not RPMForge. If it comes from RPMForge, then, install yum-priorities:
> yum install priorities
Make sure that yum-priorities is enabled by editing the /etc/yum/pluginconf.d/priorities.conf file, and ensuring that it contains the following lines:
[main] enabled=1
Add a priority=3 line in the /etc/yum.repos.d/rpmforge.repo
Add a priority=1 lines in each of the three repo sections in the /etc/yum.repos.d/elrepo.repo
Then, do the “yum install git”
Steps:
Note: remove the ..-core.. last
or in a specific directory
See Also:
First user creation (create file and first user):
Subsequent user creation