Recently CentOS updated to version CentOS 7.0.1406, in order to support this version, LAMP one-click installation script has done a lot of updates and tests, and encountered a lot of problems, recorded here.
Because CentOS 7 redirects the service to Systemctl, which results in the need to rewrite the boot script, this process also takes a lot of time to test. At the same time, some of the dependencies that existed in CentOS 6 did not exist in CentOS 7, such as Libc-client-devel, which is necessary to install the php-imap extension, without which it would necessarily be wrong to compile PHP's extended IMAP, so you can only manually compile the installation imap-2007f and specifies the path to the IMAP extension.
Removed some dependencies that were not present in both old and new CentOS, such as Libmcrypt-devel, and compiled all the latest versions.
Some of the most important updates are listed below.
1, access to public network IP mode change
In CentOS 7, the default is not to install ifconfig, that is, rely on the package net-tools, so the original from ifconfig get IP changes to curl outside the chain to obtain IP.
Therefore, the installation of this script, it is important to ensure networking.
2. Install some dependent packages manually
These dependency packs include Pcre, Libiconv, Libmcrypt, MCrypt, RE2C, Libedit, IMAP.
Pcre in CentOS 5 can cause compilation of Apache to fail; MySQL to use the ReadLine function, compile and install libedit;php extended IMAP, rely on Libc-client shared library, compile installation imap-20 07f and so on.
Some of the error information on the Internet is also vague, especially in Chinese websites. So here's a list.
Error compiling PHP:
Configure:error:utf8_mime2text () has new signature, but U8t_canonical is missing. This should is not happen. Check Config.log For additional information. The
is caused by an IMAP extension that is missing a dependency pack. Compile installation imap-2007f steps:
code is as follows |
copy code |
wget ftp:// ftp.cac.washington.edu/imap/imap-2007f.tar.gz TAR-ZXF imap-2007f.tar.gz CD imap-2007f make LR5 PASSWDTYPE =STD ssltype=unix.nopwd extracflags=-fpic ip=4 rm-rf/usr/local/imap-2007f/ mkdir/usr/local/imap-2007f/ mkdir/usr/local/imap-2007f/include/ mkdir/usr/local/imap-2007f/lib/ CP c-client/*.h/usr/local/imap-2007f/ include/ CP c-client/*.c/usr/local/imap-2007f/lib/ CP c-client/c-client.a/usr/local/imap-2007f/lib/ LIBC-CLIENT.A |
Note: At 64-bit compile time the make parameter needs to be extracflags=-fpic, not required under 32 digits.
Also, when compiling the PHP IMAP extension under CentOS 7, add the following parameters:
The code is as follows |
Copy Code |
--with-imap=/usr/local/imap-2007f --with-imap-ssl
|
When compiling under CentOS 6, the parameters are as follows because the dependency pack Libc-client-devel is already installed:
The code is as follows |
Copy Code |
--with-imap --with-imap-ssl --with-kerberos |
3. Add some Judgment function
Added some judgment functions, such as whether it is 64 digits, whether it is CentOS 7.
4. Update the startup script
Apache startup scripts are/etc/init.d/httpd changed, copied to/usr/local/apache/bin/apachectl files, and can be used for/ETC/INIT.D/HTTPD status, new profiles/ Usr/local/apache/conf/extra/httpd-info.conf.
5, CentOS 7 problems that may be encountered
After installation LAMP is complete, the Web site cannot be accessed by IP. The view process also found that the httpd and Mysqld also started, the firewall appears to have been closed, ping is no problem, but is not accessible.
After some investigation, it is CentOS 7 of the latest FIREWALLD caused the problem. Then we will use the classic iptables-services to replace the FIREWALLD.
The code is as follows |
Copy Code |
Yum-y Install Iptables-services Systemctl Mask Firewalld Systemctl Enable Iptables Systemctl Stop Firewalld Systemctl start iptables
|
6. PHP Component Support
So far, I have seen the LAMP, LNMP, LANMP, such as a key installation script, the support of the PHP component is not comprehensive, there are many missing, the most typical is IMAP, LDAP.
To support these components, I have done a lot of improvement and testing. Here is a screenshot of a PHP probe that supports all components and 4 of third-party components.
Although the LAMP one-click installation script has done a lot of testing, but there will be imperfections, if you encounter problems in the use process, with the installation log lamp.log send mail to i[at]teddysun.com