Installation on Fedora : step-by-step
Permalink
Hi
We recently migrated a dev website to final host, and the client wanted a step-by-step cheat sheet because they could not succeed. Our admin Dmitri wrote it. So here it is, as it might help someone. We were starting with a brand new Fedora 13 install on slicehost.com
Update all software
Install LAMP
After installation, the services must be configured to start automatically.
Secure Apache
Open the file /etc/httpd/conf/httpd.conf and alter the directives:
Secure PHP
Open /etc/php.ini and alter the following values:
All PHP errors will be stored in file /var/log/phperror.log. The following lines create it and set the permissions:
Restart Apache to make changes to take effect:
Secure MySQL
Run from shell:
Secure phpMyAdmin
Open file nano /etc/httpd/conf.d/phpMyAdmin.conf and add before the line:
Restart httpd
Open in browser for testing the url, exemplehttp://yourhost.tld/phpmyadmin/...
Install ConfigServer Security & Firewall
Configure service to start automatically
Disable testing mode for CSF. In file /etc/csf/csf.conf modify the line:
with
Save the file and start CSF
Migrate Concrete 5 CMS
Create MySQL database user and password for concrete CMS
Using phpmyadmin and created credentials, upload the database
Tune PHP (otherwise C5 will not work). Open /etc/php.ini and set:
Move all files to the document root of virtual host. Before that, you will have disabled cache in C5 admin, emptied it and disabled pretty URLs. If you forget to empty cache, you can do it at a later stage by emptying /files/cache etc.
Open the file config/site.php and look for the lines to match these:
Configure mod_rewrite
To enable mod_rewrite. Open vhost config file and replace:
with
In Concrete5 document root fit .htaccess with following contents to allow clean urls:
Make sure /files/cache and /files/ are writable by server (with ownership) if not CHMOD them 777 recursively.
Open in browser to test.
We recently migrated a dev website to final host, and the client wanted a step-by-step cheat sheet because they could not succeed. Our admin Dmitri wrote it. So here it is, as it might help someone. We were starting with a brand new Fedora 13 install on slicehost.com
Update all software
yum update
Install LAMP
After installation, the services must be configured to start automatically.
chkconfig httpd on chkconfig mysqld on
Secure Apache
Open the file /etc/httpd/conf/httpd.conf and alter the directives:
ServerTokens Prod ServerSignature Off TraceEnable Off
Secure PHP
Open /etc/php.ini and alter the following values:
safe_mode = Off register_globals = Off expose_php = Off allow_url_fopen = Off allow_url_include = Off enable_dl = Off disable_functions="popen,exec,system,passthru,proc_open,shell_exec,show_source,phpinfo,eval" session.use_only_cookies = 1 log_errors = On display_errors = Off error_log = /var/log/phperror.log memory_limit = 128M post_max_size = 8M upload_max_filesize = 2M max_execution_time = 30
Viewing 15 lines of 16 lines. View entire code block.
All PHP errors will be stored in file /var/log/phperror.log. The following lines create it and set the permissions:
Restart Apache to make changes to take effect:
/etc/init.d/httpd restart
Secure MySQL
Run from shell:
mysql_secure_installation Set root password? [Y/n] y Remove anonymous users? [Y/n] y Disallow root login remotely? [Y/n] y Remove test database and access to it? [Y/n] y Reload privilege tables now? [Y/n] y
Secure phpMyAdmin
Open file nano /etc/httpd/conf.d/phpMyAdmin.conf and add before the line:
Allow from 127.0.0.1 add the IP of your allowed host(s): Allow from ip.address
Restart httpd
/etc/init.d/httpd restart
Open in browser for testing the url, exemplehttp://yourhost.tld/phpmyadmin/...
Install ConfigServer Security & Firewall
yum install perl-libwww-perl wget http://www.configserver.com/free/csf.tgz tar xvf csf.tgz cd csf sh install.sh cd ..; rm -rf csf*
Configure service to start automatically
chkconfig csf on
Disable testing mode for CSF. In file /etc/csf/csf.conf modify the line:
TESTING = "1"
with
TESTING = "0"
Save the file and start CSF
/etc/init.d/csf start
Migrate Concrete 5 CMS
Create MySQL database user and password for concrete CMS
Using phpmyadmin and created credentials, upload the database
Tune PHP (otherwise C5 will not work). Open /etc/php.ini and set:
short_open_tag = On
Move all files to the document root of virtual host. Before that, you will have disabled cache in C5 admin, emptied it and disabled pretty URLs. If you forget to empty cache, you can do it at a later stage by emptying /files/cache etc.
Open the file config/site.php and look for the lines to match these:
Configure mod_rewrite
To enable mod_rewrite. Open vhost config file and replace:
AllowOverride None
with
AllowOverride All
In Concrete5 document root fit .htaccess with following contents to allow clean urls:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>
Make sure /files/cache and /files/ are writable by server (with ownership) if not CHMOD them 777 recursively.
Open in browser to test.
http://www.concrete5.org/documentation/how-tos/...