How to manually install the configuration Lighttpd+php+mysql website under CentOS7?

Source: Internet
Author: User
Tags fpm install php vps vps server

We in the General VPS Server set up the site environment to use the Nginx, Apache more, in fact, there are many, including lighttpd a lot of commonly used or some users like the Web server architecture software. LIGHTTPD as an open-source web server software, the use of low-resource, flexible compatibility, and a wealth of module functions or a lot of users.

A VPS environment that requires simple PHP functionality, even a database is not needed, and mentions whether you can install the LIGHTTPD Web environment, because there are articles that were used in the LIGHTTPD environment based on the Debian distribution, This time with CentOS7 release and install LIGHTTPD latest 1.4 stable version First, install the necessary packages1, installation Epelyum install EPEL-RELEASE2, upgrade the system environment package Yum Update-y Second, install lighttpd1, automatic installation of Yum install Lighttpd-y2, manual installation Here we can go to the LIGHTTPD official website to manually install the latest LIGHTTPD version. wget HTTP://DOWNLOAD.LIGHTTPD.NET/LIGHTTPD/RELEASES-1.4.X/LIGHTTPD-1.4.39.TAR.GZTAR-ZXVF LIGHTTPD-1.4.39.TAR.GZCD Lighttpd-1.4.39./configuremake && Make Install currently lighttpd The latest stable version is 1.4, just manually install a little trouble, if we just a simple environment, direct Yum is also on the line. Third, configuration lighttpdIf we need to further configure the LIGHTTPD Web server, we can change the default profile for the file in/etc/lighttpd/lighttpd.conf. Because the default configuration is not modified here, and we want to check for errors in the configuration file, we need to run the following command. Lighttpd-t-f/etc/lighttpd/lighttpd.conf1, creating directory mkdir-p/srv/www/htdocs/cp-r/var/www/lighttpd/*/srv/www/htdocs/ This is based on our own custom, we can put the site directory in/srv/www/htdocs/, we create one, and then copy the default/var/www/lighttpd/file. 2. Start Lighttpdsystemctl start Lighttpdsystemctl enable LIGHTTPD3, turn on firewall firewall-cmd--permanent--add-service= Httpfirewall-cmd--reload This time we enter the IP address directly in the browser, we can see the successful interface. IV. Installing PHP1. Install PHP5 module yum install php php-cgi php-fpm php-mysql php-curl php-gd php-intl php-pecl-imagick php-mcrypt php-memcache php- Pear Lighttpd-fastcgi2, configure Lighttpd/etc/php.ini Modify the above file will cgi.fix_pathinfo=1 a line of settings available, remove the previous comment symbol. /etc/php-fpm.d/www.conf edit this file and add two lines. user = Lighttpdgroup = lighttpd is added to the end. /etc/lighttpd/modules.conf edit this file and save the # "conf.d/fastcgi.conf" in front of it. /etc/lighttpd/conf.d/fastcgi.conf set this file. /etc/lighttpd/conf.d/fastcgi.conf Add the last Fastcgi.server + = (". php" = ("host" = "127.0.0.1", "port" = "9000", " Broken-scriptfilename "=" and "Enable"))) the final execution systemctl force-reload lighttpd restart takes effect. Fifth, the detection of PHPWe add a php.info file to the root directory, and the probe can detect whether it is in effect. Install MySQL because here the old left does not need to install MySQL, if we need to install MySQL also simple, run the command directly. Yum install MySQL mysql-server follow the prompts to set it. After the mysql_secure_installation is installed, you need to execute the command to handle the MySQL security settings. To summarize, we can install the LIGHTTPD, PHP environment in the VPS server in such a simple way, but this type is not suitable for our regular station use, because the supporting components and some convenient settings are not enough to meet some of the site's operation, such as some components are not many. This article can only be considered as a simple record lighttpd process, online has a lot of personal sharing of a key package installed LIGHTTPD site environment. To do the most comprehensive Hong Kong resources, independent IP space, VPS Cloud Server, standalone server, multi-IP station group server, Hong Kong high-defense, Hong Kong hen, IP Wholesale, hosting leasing business, contact qq:2881064159

How to manually install the configuration Lighttpd+php+mysql website under CentOS7?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.