Installing Lighttpd With PHP5 And MySQL Support On CentOS 6.0
|
Submitted by CSch (Contact Author) (Forums) on Mon, 2011-12-12 18:07. :: CentOS | Web Server | Lighttpd
Installing Lighttpd With PHP5 And MySQL Support On CentOS 6.0Version 1.0 Lighttpd is a secure, fast, standards-compliant web server designed for speed-critical environments. This tutorial shows how you can install Lighttpd on a CentOS 6.0 server with PHP5 support (through FastCGI) and MySQL support. I do not issue any guarantee that this will work for you!
1 Preliminary NoteIn this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.
2 Installing MySQL 5.0First we install MySQL 5.0 like this: yum install mysql mysql-server Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server: chkconfig --levels 235 mysqld on Set passwords for the MySQL root account: mysql_secure_installation [root@server1 ~]# mysql_secure_installation
3 Installing LighttpdLighttpd is not available from the official CentOS 6.0 repositories, but from the RPMforge repositories (see http://dag.wieers.com/rpm/FAQ.php#B2 for instructions). We install the RPMforge package for RHEL 6 which works for CentOS 6.0 as well: If you are on an x86_64 system: wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm If you are on an i386 system: wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i386.rpm Afterwards, we can install Lighttpd like this: yum install lighttpd Then we create the system startup links for Lighttpd (so that Lighttpd starts automatically whenever the system boots) and start it: chkconfig --levels 235 lighttpd on If Lighttpd fails to start with the following error message... (network.c.203) socket failed: Address family not supported by protocol ... open /etc/lighttpd/lighttpd.conf... vi /etc/lighttpd/lighttpd.conf ... and change server.use-ipv6 from enable to disable:
Then try to start Lighttpd again - it should now work without any problem: /etc/init.d/lighttpd start Now direct your browser to http://192.168.0.100, and you should see the following page: Lighttpd's default document root is /srv/www/lighttpd on CentOS 6.0 (there's no index file in that directory like index.html, that's why you get a 404 Not Found error), and the configuration file is /etc/lighttpd/lighttpd.conf.
4 Installing PHP5We can make PHP5 work in Lighttpd through FastCGI. Therefore we install the packages lighttpd-fastcgi and php-cli: yum install lighttpd-fastcgi php-cli
|




Recent comments
1 day 6 hours ago
1 day 11 hours ago
1 day 13 hours ago
1 day 14 hours ago
1 day 15 hours ago
1 day 20 hours ago
1 day 21 hours ago
1 day 23 hours ago
2 days 12 hours ago
2 days 13 hours ago