Archive for category note
Restarting apache httpd in centos
o restart:
/sbin/service httpd restart
to start:
/sbin/service httpd start
to stop:
/sbin/service httpd stop
Linux / Unix ln command link on ssh
About ln
Creates a link to a file.
ln [-f] [-n] [-s] existingfile newname
| -f | Link files without questioning the user, even if the mode of target forbids writing. This is the default if the standard input is not a terminal. |
| -n | Does not overwrite existing files. |
| -s | Makes it so that it does not create a symbolic link (not on System V.) existingfile – The file that you want to create a new link. |
| existingfile | Specifies file(s) that you want to create a link to. |
| newname | The new name of the file. |
| directory | The directory were you want the new link. |
ln public_html/myfile.txt
Would create a hard link to myfile.txt in the current directory assuming that it is not public_html. Note: A link cannot be created to a file if currently in the directory where the file exists.
ln -s file1 file2
Creates a symbolic link to file1 with the name of the file2.
Install or update PHP 5 on Centos
I tried compiling PHP 5.2 on CentOS but after so many tries I gave up. I was getting struck at compiling PHP with gd. And without gd it was useless. So I decided to yum and install the same.
By default if you use yum install php it will be install only php 4 series and not 5. In order to install version 5 I had to enable repo centosplus.
yum install php –enablerepo=centosplus
or
yum update php –enablerepo=centosplus