Web Server Installation on CentOS 6 » History » Revision 16
Revision 15 (Sargis Dallakyan, 08/28/2013 12:30 PM) → Revision 16/24 (Sargis Dallakyan, 08/28/2013 12:31 PM)
h1. Web Server Installation on CentOS 6 Before you start, make sure you have CentOS 6 installed on your computer. Note that upgrading from CentOS 5 to CentOS 6 might damage existing filesystems and operating systems as described in "CentOS Migration Guide":http://wiki.centos.org/HowTos/MigrationGuide. That's why we recommend starting with a fresh install of CentOS 6. The following links provide excellent step by step guide on how to install CentOS 6 Linux from scratch on a new machine: * http://linuxmoz.com/how-to-install-centos-6-linux-for-servers-desktops * http://www.if-not-true-then-false.com/2011/centos-6-netinstall-network-installation In the package selection step switch from Minimal to Web Server. !http://linuxmoz.com/images/c6i/install-centos-6-minimal-install.png! h4. Disable SELinux and Firewall To disable "SELinux":http://wiki.centos.org/HowTos/SELinux: # Edit file "/etc/selinux/config" # Change "SELINUX=enforcing" to "SELINUX=disabled" # Save the file # Restart your computer To disable firewall run _system-config-firewall-tui_ command and use Space key to unchecked the checkbox next to Enabled. h3. Install Extra Packages for Enterprise Linux (EPEL) <pre> rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm </pre> Note that release version (6-8) is the current release at the time of this writing. Please visit http://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F for more up-to-date information on how to install the packages from the EPEL software repository. <pre> yum install php-gd gcc libssh2-devel php-pecl-ssh2 mod_ssl php-mysql php-devel php fftw3-devel python-imaging python-devel mod_python scipy easy_install fs PyFFTW3 </pre> h3. [[Configure php.ini]] Edit /etc/php.ini and change line ~229 to <pre> short_open_tag = On </pre> Note that short_open_tag appears twice in /etc/php.ini and you need to set "short_open_tag = On":http://www.apachefriends.org/f/viewtopic.php?p=155513 at around line 229 for it to take effect. h3. Start Apache HTTP Server <pre> service httpd start chkconfig httpd on </pre> See also: "How to start Apache at Startup on Centos or Red Hat Enterprise Linux using chkconfig":http://thevagabondgeek.com/12-how-to-start-apache-at-startup-on-centos-or-red-hat-enterprise-linux-using-chkconfig. If you have a file server that stores Appion and Leginon session, start and enable nfs services as well: <pre> service nfs start chkconfig nfs on </pre> See "How to Set Up an NFS Mount on CentOS 6":https://www.digitalocean.com/community/articles/how-to-set-up-an-nfs-mount-on-centos-6 h3. [[Configure php.ini]] Edit /etc/php.ini and change line ~229 to <pre> short_open_tag = On </pre> Note that short_open_tag appears twice in /etc/php.ini and you need to set "short_open_tag = On":http://www.apachefriends.org/f/viewtopic.php?p=155513 at around line 229 for it to take effect. h3. [[Download Appion Files|Download Appion and Leginon Files]] <pre> svn co http://emg.nysbc.org/svn/myami/trunk myami/ </pre> Also available for centos6 is the myami-2.2-redux branch. This has the same features as the 2.2 release, but the portions of myami that were incompatible with Centos5 have been replaced with what we call Redux. <pre> svn co http://emg.nysbc.org/svn/myami/branches/myami-2.2-redux myami/ </pre> h3. Install and Start Redux <pre> cd myami ./pysetup.sh install mkdir /tmp/redux /etc/init.d/reduxd start </pre> h3. [[Install the Web Interface]] <pre> cp -r myamiweb/ /var/www/html/ </pre> Visit http://localhost/myamiweb/setup and follow instructions in Web Tools Setup Wizard. See also [[Install the Web Interface Advanced]].