Install LAMP on CentOS 5

=== Install LAMP (Linux Apache MySQL and PHP) === yum install httpd php php-mysql mysql mysql-server chkconfig httpd on chkconfig mysqld on /etc/init.d/httpd restart /etc/init.d/mysqld restart === set MySQL root password === mysqladmin -u root -p password newpassword mysqladmin -u root -p reload === change MySQL root password (just in case) === mysqladmin -u root -p’oldpass’ […]

Read More…

Additional Repositories for Centos 5

Here we add a few additional repositories to Centos 5. === install yum priorities === First, install the Yum Priority package, which protect the base Centos 5 components from being overwritten. yum install yum-priorities Edit the /etc/yum.repos.d/CentOS-Base.repo file, add priority=1 to each of the sections [base], [addons], [updates], [extras] vi /etc/yum.repos.d/CentOS-Base.repo Update the system and […]

Read More…

ssh using keys (avoid password)

use public keys to authenticate 2 servers ”’Server1”’ and ”’Server2”’ === on Server1 === generate keys * do not input a password * this will generate 2 files: ”id_rsa” (p[rivate key) and ”id_rsa.pub” (public key) cd $HOME/.ssh ssh-keygen -t rsa add the public key to remote server ssh-copy-id -i id_rsa.pub username@server2.local === on Server2 === […]

Read More…

Setup Putty for Linux

Software used: Putty 0.60 (from http://www.chiark.greenend.org.uk/~sgtatham/putty) CentOS 5.2 Here is how I setup Putty to connect to CentOS, fix the problem of full screen tools (such as system-admin-network). start Putty Terminal > Keyboard > The Function keys and keypad : select Linux Windows : set lines of scrollback to 2000 (or more) Windows > Translation : […]

Read More…

Install FreeNX on Centos 5.2

Software Used Server: CentOS 5.2 i386 Client: NoMachine NX Client for Windows 3.2.0-13 On the linux box, install X Windows and Gnome first (if not installed yet) su – yum groupinstall “X Window System” “GNOME Desktop Environment” and then issue these commands to install freenx yum install nx freenx nxsetup –install –setup-nomachine-key On the client, download […]

Read More…

Linux filesystem hierarchy

As a Linux beginner, it is always hard to understand what all these directory names means. Here is a list of the directory hierarchy of CentOS 5. / the root of everything /bin common linux commands. such as ls, cp, gzip, etc /boot boot codes of Linux – not to touch it unless you are […]

Read More…

Linux commands – chmod

chmod is used to change permissions on files and directories on a linux system. An example file listing ls -l -rw-r–r– 1 derek managers    0 Oct 10 19:11 myfile drwxr-xr-x 2 derek managers 4096 Oct 10 19:11 myfolder -rw-r–r– 1 derek managers    0 Oct 10 19:11 myprogram The permissions are indicated in the first […]

Read More…

Install Webmin on Centos 5

Webmin is a powerful and popular web-based interface for system administration for Unix/Linux/BSD. Using any web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit configuration files and let you manage a system from the console or remotely. Software Used CentOS 5.2 i386 Webmin […]

Read More…