These are the simple steps to Install and do basic configuration Apache 2.2.3, MySQL 5.0.22 and PHP on a base install CentOS 5.1 x86_64.
Required Pack
Install the required package using yum;
yum install gettext httpd mysql mysql-server perl
yum install php php-mysql php-xml php-imap php-mbstring php-mcrypt php-pecl-Fileinfo php-pecl-memcache php-pear-DB php-pear-File php-pear-Log php-pear-Mail-Mime php-pear-Auth-SASL php-pear-Date php-pear-HTTP-Request php-pear-Mail php-pear-Net-Sieve php-pear-Net-Socket php-pear-Net-SMTP
yum install openssl perl-Net-SSLeay
yum install php-devel gcc
Start the Service
Start Apache and MySQL daemon, and add them to startup script so it will survive reboot.
service httpd restart
chkconfig httpd on
service mysqld restart
chkconfig mysqld on
Standard MySQL First Step After Install
Run the mysql_secure script to do basic securing MySQL and give root password to your MySQL databases;
mysql_secure_installation
Apache and Basic Virtual Host Configuration
Edit the apache configuration file to fit your requirement.
vi /etc/httpd/conf/httpd.conf
###Modify
Listen vvv.xxx.yyy.zzz:80 <--Put your IP Address here
###Add
<Directory “/path/to/rootwwwdir/public_html”>
Options Indexes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
AllowOverride None
</Directory>
<Directory “/path/to/rootwwwdir/public_html”>
Options Indexes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
AllowOverride None
</Directory>
Virtual Host Configuration
NameVirtualHost vvv.xxx.yyy.zzz:80
<VirtualHost vvv.xxx.yyy.zzz:80>
ServerAdmin hostmaster@magnet-id.com
DocumentRoot /path/to/rootwwwdir/public_html
ServerName virt1.magnet-id.com
ErrorLog logs/virt1.magnet-id.com-error_log
CustomLog logs/virt1.magnet-id.com-access_log common
</VirtualHost>
<VirtualHost vvv.xxx.yyy.zzz:80>
ServerAdmin hostmaster@magnet-id.com
DocumentRoot /path/to/rootwwwdir/public_html
ServerName virt2.magnet-id.com
ErrorLog logs/virt2.magnet-id.com-error_log
CustomLog logs/virt2.magnet-id.com-access_log common
</VirtualHost>
###Empty the file
/etc/httpd/conf.d/welcome.conf
Installation and Basic Configuration Apache, MySQL and PHP on CentOS 5.1 (64 bit)
These are the simple steps to Install and do basic configuration Apache 2.2.3, MySQL 5.0.22 and PHP on a base install CentOS 5.1 x86_64.
Required Pack
Install the required package using yum;
Start the Service
Start Apache and MySQL daemon, and add them to startup script so it will survive reboot.
Standard MySQL First Step After Install
Run the mysql_secure script to do basic securing MySQL and give root password to your MySQL databases;
Apache and Basic Virtual Host Configuration
Edit the apache configuration file to fit your requirement.