Skip to main content

Posts

Showing posts with the label unix

Webmin on CentOS

We use CentOS for our web servers, and favor Webmin as a way to administer our servers. To install Webmin via yum on CentOS, follow these steps as root or sudo, from the command line (via SSH or at the console). These steps will also work for RedHat servers. Configure the Webmin repository and instal l Webmin is not available via yum in the default CentOS repository. Follow these steps to add the Webmin repository (repo) from Webmin.com. Create and edit the repository file # nano /etc/yum.repos.d/webmin.repo Add the [Webmin] section (listed below) to the new repository file Save the new file Import the public key: # rpm --import http://www.webmin.com/jcameron-key.asc Install webmin: # yum install webmin Open the Firewall If your server is protected by a firewall, you won't be able to access Webmin until you open port 10000. Use these steps on CentOS Backup the current firewall settings: # cp /etc/sysconfig/iptables /etc/sysconfig/iptables.bak Inst...

Damn Small Linux (DSL)

I'm trying to help my friend fix his Dell OptiPlex GX400 , which is running Windows XP Home, and is probably owned. It only has 128 MB of RAM, and it turns out this particular model uses expensive 128MB PC-800 Rambus RIMM for Dell RAM Memory . So, it doesn't make sense to buy a chip, really, and none of my spares will probably fit. Instead of throwing hardware at the problem, I looked at Damn Small Linux ( DSL information ) To burn a CD of Damn Small Linux, Download the ISO and then burin it to a CD, in Windows, with InfraRecorder (GPL). DSL is based on Knoppix , but is stripped down to a bare bones set of Debian packages . As promised, booting DS from the CD transformed the slow, almost unusable computer into a speed demon. Plus, DSL shows system resource use right on the desktop , and we could see that it was hardly using any RAM -- less than 20% of 128 MB. Now all we have to do is figure out a way to save the configuration, and configure networking.

Perl & PHP Shell Scripts

Writing scripts in bash is lame. I'm not the only one who thinks so: Shell Script Language – Use Perl, Not Bash | LinDesk From the post: Advantages of using a Shell Language Its supported in even the tinest linux distros – even in embedded systems. Its the method preferred by the majority – I hope this will change soon. Command calls look more natural in a shell language. Advantages of using a High Level Language Better Code Easy to maintain Faster development Libraries provide a lot of functionality Easier to port to different platforms. PHP Shell Scripting Want to get busy slinging code? Start here: An Introduction to Linux Shell Scripting: How to Use Bash, Perl, PHP or Python in a Linux Script | Suite101.com An Alternative to Perl: Shell Scripting With PHP Using PHP As A Shell Scripting Language PHPDeveloper.org: PHPHacks.com: Shell Scripting with PHP CLI

Ubuntu 7.10 (Gutsy Gibbon) Download

Although I successfully upgraded my Feisty Fawn 7.04 installation to Gutsy Gibbon (7.10), I'm having some problems with desktop effects. Basically, none of the window manager elements appear. I've decided to do a clean install, so I'm downloading the CD image, but it's taking forever... The torrent files are listed at the bottom of the Gutsy Gibbon download page , but it turns out the that the torrent files take some time to download, too. In fact, the HTTP download from Columbia's servers is coming through at 140 KB/sec, or higher, whereas Bittorrent has topped out at, well, just about 130 KB/sec. Hardly much of a difference, but then I get spikes on the HTTP download up to 320 KB/sec. It looks like the issue is the torrent file in question. When I downloaded the AMD 64 bit torrent, I'm getting speeds of over 1000 KB/sec.

Custom Bash Prompt How-To

I want to put a current time stamp on my prompt, so I can see when I run a job. From Custom Bash Prompt How-To This How-To is to change the display of your bash prompt permanently. It will give you a list of different strings you can include into your bash prompt such as, the time of day, the date, and many other options. My prompt is already customized in ~/.bash_prompt

Bash Shell Keyboard Shortcuts For Linux Users

Since the keyboard commands for bash are the same no matter what platform you run your bsh shell on (Mac, Windows, Linux, etc.) it pays to learn a few choice command. Here's a great reference: The default shell on most Linux operating systems is called Bash. There are a couple of important hotkeys that you should get familiar with if you plan to spend a lot of time at the command line. These shortcuts will save you a ton of time if you learn them. Here is the List of Bash Shell Keyboard Shortcuts For Linux Users Ctrl + A - Go to the beginning of the line you are currently typing on Ctrl + E - Go to the end of the line you are currently typing on Ctrl + L - Clears the Screen, similar to the clear command Ctrl + U - Clears the line before the cursor position. If you are at the end of the line, clears the entire line. Ctrl + H - Same as backspace Ctrl + R - Let’s you search through previously used commands more , including Alt keys ... Read the rest of the listing at Bash Shell Keyboa...

Installing a private certificate server

Installing a private certificate server, Linux version: Edit /etc/httpd/conf/httpd.conf and change "<VirtualHost _default_:443>" to "<VirtualHost 192.168.10.200:443>" [root@dts conf]# cd /etc/httpd/conf/ssl.key [root@dts ssl.key]# openssl genrsa -out server.key 1024 [root@dts ssl.key]# cd ../ssl.crt [root@dts ssl.crt]# openssl req -new -key ../ssl.key/server.key -x509 -out server.crt Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:New York Locality Name (eg, city) []:New York Organization Name (eg, company) [Internet Widgits Pty Ltd]:Grb-internal Organizational Unit Name (eg, section) []:. Common Name (eg, your name or your server's hostname) []:192.168.10.200 Email Address []: larnd@grb.xxxxx.org [root@dts ssl.crt]# service httpd restart From What Keeps You Off of Windows?

Notable tar Usages

From the gnu.org site: For example, here is how you might copy a directory's contents from one disk to another, while preserving the dates, modes, owners and link-structure of all the files therein. In this case, the transfer medium is a pipe , which is one a Unix redirection mechanism: $ cd sourcedir; tar -cf - . | (cd targetdir; tar -xf -) Here's a sample: sudo tar cvzf /media/MyBook500-ext3/Volume/home-2007-10-20.tgz /home/