NOTE: This is a basic guide to setup LAMP on Localhost We will start off by installing mySql Server first sudo yum install mysql-server Now we will need to start the mySql Server sudo service mysqld start We set a password for mySql sudo mysqladmin -u root password ENTER_YOUR_PASSWORD_HERE The next step will be to install phpMyAdmin, when we install phpMyAdmin, the yum...
How to install Flash Player in Fedora Core 15 32bit so that the Flash Plugin will work in your Browser
Switch to root
su
Add the neccesary software sources to the yum repository
rpm -ivh
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
Update all yum packages
yum update
Install the Flash Plugin
yum install flash-plugin
Restart Firefox or your default browser and the Flash Player should now work on Fedora Core 15 32bit
How to create an ISO image from a data CD/DVD in Linux
Open a new Terminal Window
Type in the following command
dd if=/dev/sr0 of=myISO.iso
Explanation
dd = covert and copy a file
if = read from FILE instrad of stdin
/dev/sr0 = This is your cd-rom device, please remember to replace this with your device
of = write to FILE instead of stdout
myISO.iso = The location and filename where you want the ISO file saved
How to unzip a ZIP file in Linux on the Command Line to a folder
unzip zipFile.zip -d directory
unzip – list, test and extract compressed files in a ZIP archive
-d = An optional directory to which to extract files.
directory = The directory where to extract the files to
zipFile.zip = Your ZIP file
How to list all USB devices in Linux
Open a new Terminal Window
Type in the lsusb command
lsusb
lsusb is a utility for displaying information about all USB buses in the system and all devices connected to them.
How to install wkhtmktopdf on a Linux 32bit Operating System
Open a new Terminal Window
Download the wkhtmltopdf library
Extract the library
tar xvjf libwkhtmltox-0.11.0_rc1-i386.tar.bz2
Move the library to the /usr/local/bin/wkhtmltopdf directory
mv wkhtmltopdf-i386 /usr/local/bin/wkhtmltopdf
Make the /usr/local/bin/wkhtmltopdf executable
chmod +x /usr/local/bin/wkhtmltopdf
Try it
wkhtmltopdf /home/roland/Desktop/google.pdf
How to change the Timezone in CentOS 6
The timezone that’s active on your system is stored in the file /etc/localtime First make a backup of the existing localtime file mv /etc/localtime /etc/locatime.backup Now we create a link so that the timezone auto updates when updates come through ln -s /usr/share/zoneinfo/Africa/Johannesburg /etc/localtime In the above change Africa/Johannesburg to the appropriate timezone you need to...
How to change the welcome message after SSH login
Login as root via SSH
Add a message to /etc/motd using vim eg.
vim /etc/motd
Add your message to this file eg.
###Please think before you type###
Logout
Login via SSH and then after successful login the message will appear
How to install gtk-recordmydesktop on Fedora Core 15
Open a new Terminal Window
Type in the following command to install
sudo yum install gtk-recordmydesktop
This will install gtk-recordmydesktop
gtk-recordmydesktop can be located under Applications->Sound & Video->gtk-recordMyDesktop
PHP Fatal error: Call to undefined function mb_detect_encoding()
How to fix this error PHP Fatal error: Call to undefined function mb_detect_encoding() when trying to use the mb_detect_encoding PHP function This means that the php-mbstring extention needs to be installed To install this on a Centos server run the following command from the command line yum install php-mbstring and then restart the Apache web server by using this command as root...
How to add a printer using the command line in Linux
Open a new command line window and type in the following command as root
sudo system-config-printer
Now a window should Pop-Up where you are able to add a new Printer
How to set Firefox as your default browser in Fedora Core 15
How to set Firefox as your default browser in Fedora Core 15? Or any other Browser.
Go to System Settings
Click on System Info
Select Default Applications
And next to Web select the Browser that you wish to make your Default Web Browser
How to extract a tar.gz file in Linux
Execute the following command
tar -zxvf archive.tar.gz
This command will extract the contents of the archive.tar.gz file in the current directory
The options -zxvf mean the following
-z = filter the archive through gzip
-x = extract files from an archive
-v = verbose
-f = use archive file or device ARCHIVE
How to install NTFS support in Centos 6.2
Download the rpmforge for Centos 6
wget
Install the rpmforge for Centos 6
rmp -Uvh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Now install the ntfs-3g package
yum install fuse-ntfs-3g
Now try mounting your NTFS drive and it should work
Paused – “/usr/lib/cups/backend/hp failed”
You need to resume the Printer via Cups
Login to the CUPS Control Panel eg. or replace IP Address with your IP
Click on Administration
Click on Manage Printers
Select your Printer
In the Maintenance Drop down box select Resume Printer
How to update ClamAV in Linux
Open a new Terminal Window and run the following command
freshclam
freshclam is a Virus Database update tool for ClamAV
How to resume CUPS printer in Linux via the Command Line
Find the printer to resume lpstat -p After entering the command above you should see a similar message as below printer HP_LaserJet_P2015 disabled since Wed 25 Sep 2013 09:35:59 AM SAST - /usr/lib/cups/backend/hp failed printer HP_LaserJet_P2015_Series is idle. enabled since Wed 05 Dec 2012 08:16:07 PM SAST Enable the printer, replace printer name with your printer cupsenable...
Downloading Files and Directories recursively using Linux Centos 6.3
Install ncftp using yum sudo yum install ncftp Execute the following command, just replace details with the relevant ones ncftpget –R –v –u ftpusername ftpserver /copying/to/directory /copying/from/directory -R = Recursive mode; copy whole directory trees -v = Use progress meters -u = FTP username -ftpusername = Replace with your FTP username -ftpserver = Add your server in here ...
Search and Replace all instances using VIM Editor
Use the following command
:%s/searchphrase/replacephrase/g