Archive for February, 2010

Creating a new Centos 5 server

Step by Step Guide to Installing on Centos 5.2 64bit
Last modified by kevin.connor on Mon, December 7, 2009 15:16
Source|Old Revisions

How to install Centos 5.2, PHP 5.2x, Mysql 5.1x and Magento 1.2.x Assuming that this is a server behind a firewall

Install Centos 5.2 (64bit) with correct IP settings and no packages selected except “base” restart and login

Update the system and download kernel headers in case they are needed for future software

yum update
yum install kernel*
reboot

Set the hosts file and disable ip6

nano /etc/hosts
Add IP and a hostname
nano /etc/modprobe.conf
Add 'alias ipv6 off'
Add 'net-pf-10 off'
Reboot

Disable un-needed services (look them up if you are interested)

chkconfig NetworkManager off
chkconfig NetworkManagerDispatcher off
chkconfig anacron off
chkconfig atd off
chkconfig bluetooth off
chkconfig cpuspeed off
chkconfig cups off
chkconfig gpm off
chkconfig hidd off
chkconfig ip6tables off
chkconfig iptables off
chkconfig irda off
chkconfig mdmonitor off
chkconfig mdmpd off
chkconfig pcscd off
chkconfig portmap off
chkconfig yum-updatesd off
chkconfig smartd off
service smartd stop
service NetworkManager stop
service NetworkManagerDispatcher stop
service anacron stop
service atd stop
service bluetooth stop
service cpuspeed stop
service cups stop
service gpm stop
service hidd stop
service ip6tables stop
service iptables stop
service irda stop
service mdmonitor stop
service mdmpd stop
service pcscd stop
service portmap stop
service yum-updatesd stop

Install Apache and OpenSSL

yum install httpd
yum install openssl
yum install httpd

Install the remi repositories for updated versions of PHP and MySQL not offered by Centos

wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
wget http://rpms.famillecollet.com/el5.i386/remi-release-5-7.el5.remi.noarch.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

Install php and required php extensions for Magento

yum --enablerepo=remi install php-common
yum --enablerepo=remi install php
yum install gd gd-devel
yum --enablerepo=remi install php-mcrypt php-xml php-xml php-devel php-imap php-soap php-mbstring php-mysql
yum --enablerepo=remi install php-mhash php-simplexml php-dom php-gd

(php-mhash extension no longer required as of php5.3(which is what you’ll get following these commands)-replaced by HASH Message Digest Framework in php core)

Install/Configure newest Mysql and Php extensions and enable in php.ini

yum --enablerepo=remi install mysql mysql-server
yum --enablerepo=remi install php-mysql php-pdo
nano /etc/php.ini
Add 'extension=pdo.so'
Add 'extension=pdo_mysql.so'
mysql_install_db
mysqladmin -u root password SOMEPASSWORD

Installing Server Certificates (IIS 6.0)

After you have obtained a server certificate, you can install it. When you use the Server Certificate Wizard to install a server certificate, the process is referred to as assigning a server certificate.

Important

You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName “mmc %systemroot%\system32\inetsrv\iis.msc”.

Procedures

To install a server certificate using the Web Server Certificate Wizard

1. In IIS Manager, expand the local computer, and then expand the Web Sites folder.
2. Right-click the Web site or file that you want, and then click Properties.
3. On the Directory Security or File Security tab, under Secure communications, click Server Certificate.
4. In the Web Server Certificate Wizard, click Assign an existing certificate.
5. Follow the Web Server Certificate Wizard, which will guide you through the process of installing a server certificate.

Note

When you use the Web Server Certificate Wizard to assign a certificate, you must specify a password before the certificate can be assigned to your Web server.

Related Information

For information about obtaining server certificates, see Obtaining Server Certificates.
For general information about certificates, see SSL and Certificates.

Obtaining a Server Certificate from a Third-party CA (IIS 6.0)

Important

You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName “mmc %systemroot%\system32\inetsrv\iis.msc”.

Procedures

To obtain a server certificate from a third-party certification authority

1. In IIS Manager, double-click the local computer, and then double-click the Web Sites folder.
2. Right-click the Web site or file for which you want to request a certificate, and then click Properties.
3. On the Directory Security or File Security tab, under Secure communications, click Server Certificate.
4. In the Web Server Certificate Wizard, on the Delayed or Immediate Request page, click Prepare the request now, but send it later. By default, the certificate request file is saved as C:\Certreq.txt, but the wizard allows you to specify a different location.
5. Complete the rest of the steps in the Web Server Certificate Wizard and then click Finish.
6. Send the request to the certification authority. The CA will process the request and then send you the certificate.

Related Information

For information about other ways to obtain server certificates, see Obtaining Server Certificates.
For information about installing server certificates, see Installing Server Certificates.
For general information about certificates, see SSL and Certificates.