What are the Unix shell commands for handling user administration?
Here’s a quick cheat-sheet for Unix user administration from the command line terminal. Make sure you are logged in as “root” user for these, or enter “sudo -i” for root user access.
Here’s a quick cheat-sheet for Unix user administration from the command line terminal. Make sure you are logged in as “root” user for these, or enter “sudo -i” for root user access.
I’m mostly posting this one because I constantly forget and don’t wanna waste another 10 minutes finding it in some 947-page technical pdf, know what I mean?
You can do this from either your remote server OR your local machine. It’s alot faster to do it from your remote server, but if you want or need to run these commands from your local machine, for example, to backup the latest version/revision to your local machine, to update your local working copy, and probably most commonly because you’re usually already working with your local “working” copy, so it’s easier just to run these commands from there - a few less clicks never hurt anybody, and more time for coffee re-heating.
# This one is pretty simple - we’re just using common Unix commands.
# I find this one helpful when I don’t want to generate a rails site skeleton on the server.
# create web application skeletal structures
cd ~/public_html
# domain 1
mkdir -p mydomain1.com/{backup,cgi-bin,log,private,public}
mkdir -p mydomain1.com/{config,releases,shared,tmp}
mkdir -p mydomain1.com/tmp/pids
# create symlinks for a capistrano site here
ln -s /home/super/public_html/mydomain1.com /home/super/public_html/mydomain1.com/current
ln -s /home/super/public_html/mydomain1.com/log /home/super/public_html/mydomain1.com/shared/log# domain 2 (optional)
mkdir -p mydomain2.net/{backup,cgi-bin,log,private,public}
mkdir -p mydomain2.net/{config,releases,shared,tmp}
mkdir -p mydomain2.net/tmp/pids
# create symlink for capistrano site here
ln -s /home/super/public_html/mydomain2.net /home/super/public_html/mydomain2.net/current
ln -s /home/super/public_html/mydomain2.net/log /home/super/public_html/mydomain2.net/shared/log# domain 3 (optional)
mkdir -p mydomain3.ws/{backup,cgi-bin,log,private,public}
mkdir -p mydomain3.ws/{config,releases,shared,tmp}
mkdir -p mydomain3.ws/tmp/pids
# create symlink for capistrano site here
ln -s /home/super/public_html/mydomain3.ws /home/super/public_html/mydomain3.ws/current
ln -s /home/super/public_html/mydomain3.ws/log /home/super/public_html/mydomain3.ws/shared/log
# to see what was created in the above code, use “ls -la” command (optional)
ls -la ~/public_html/
ls -la ~/public_html/mydomain1.com
ls -la ~/public_html/mydomain2.net
ls -la ~/public_html/mydomain3.ws
# enable (turn on) website applications in apache
sudo a2ensite mydomain1.com
sudo a2ensite mydomain2.net
sudo a2ensite mydomain3.ws# disable (turn off) website applications in apache
#sudo a2dissite mydomain1.com
#sudo a2dissite mydomain2.net
#sudo a2dissite mydomain3.ws
# (re)start apache server
sudo /etc/init.d/apache2 start
# or
sudo /etc/init.d/apache2 reload
# visit your sites in a web browser
http://mydomain1.com
http://mydomain2.net
http://mydomain3.ws
# secure versions (self-signed)
https://mydomain1.com
https://mydomain2.net
https://mydomain3.ws
Done!
MessageDigest5 (MD5) checksums provide a way for you to confirm the integrity of files you download or copy. The MD5 algorithm takes a file as input and outputs a highly unique fingerprint message digest. To confirm file integrity, use an MD5 utility on your computer to calculate your own MD5 message digest for files downloaded from a web site or copied from a directory on a computer. If your calculated MD5 checksum matches the original, you can be assured your file is intact and probably not “corrupt”. MD5 utilities are available for Windows and Linux and Mac. Most Linux installations provide an md5sum command for calculating MD5 message digests. Here are the simple steps on a Mac system: