In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Editor to share with you how to build the LAMP platform, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
First, set up httpd.
1 Edit IP address
Vim / etc/sysconfig/network-scripts/ifcfg-eth0
2 remove the software previously packaged by rpm.
Rpm-e httpd httpd-manual webalizer subversion mod_python mod_ssl mod_perl system-config-httpd php php-cli php-ldap php-common mysql dovecot-- nodeps
3 unpack httpd to / usr/src/
Tar zxf httpd-2.2.17.tar.gz-C / usr/src/
Cd / usr/src/httpd-2.2.17/
Compilation and installation
. / configure-prefix=/usr/local/httpd-enable-so-enable-rewrite-enable-charset-lite-enable-cgi
Make & & make install
Start the service
/ usr/local/httpd/bin/apachectl start
Second, set up mysql
Extract mysql to / usr/src/, if you have previously packaged it with rpm, be sure to clear it
Tar zxf mysql-5.1.55.tar.gz-C / usr/src/
Cd / usr/src/mysql-5.1.55/
Compile and install mysql
. / configure-- prefix=/usr/local/mysql-- with-charset=utf8-- with-collation=utf8_general_ci-- with-extra-charsets=gbk,gb2312 & & make & & make install
Establish a configuration file
Cp support-files/my-medium.cnf / etc/my.cnf
Initialize the database
Cd / usr/local/mysql/bin/
. / mysql_install_db-- user=mysql
Chown-R root.mysql / usr/local/mysql/
Chown-R mysql/ usr/local/mysql/var/
Optimize execution path and program path
Ln-s / usr/local/mysql/bin/* / usr/local/bin/
Ln-s / usr/local/mysql/lib/mysql/* / usr/bin/
Ln-s / usr/local/mysql/include/mysql/* / usr/include/
Add system services
Cd / usr/src/mysql-5.1.55/
Cp support-files/mysql.server / etc/rc.d/init.d/mysqld
Chmod axix / etc/rc.d/init.d/mysqld
Chkconfig-add mysqld
Open the mysql service and add the user password
/ etc/init.d/mysqld start
Mysqladmin-u root password '123456'
Third, set up PHP
1 remove the php previously packaged by rpm
Rpm-e php php-cli php-ldap php-common php-mysql-nodeps
2 install the extension tool library
Libmcrypt:
Tar zxf libmcrypt-2.5.8.tar.gz-C / usr/src/
Cd / usr/src/libmcrypt-2.5.8/
. / configure & & make & & make install
Ln-s / usr/local/lib/libmcrypt.* / usr/lib/
Mhash:
Tar zxf mhash-0.9.9.9.tar.gz-C / usr/src/
Cd / usr/src/mhash-0.9.9.9/
. / configure & & make & & make install
Ln-s / usr/local/lib/libmhash.* / usr/lib/
Mcrypt:
Tar zxf mcrypt-2.6.8.tar.gz-C / usr/src/
Cd / usr/src/mcrypt-2.6.8/
. / configure & & make & & make install
3 install php
Tar zxf php-5.3.6.tar.gz-C / usr/src/
Cd / usr/src/php-5.3.6/
. / configure-prefix=/usr/local/php5-- with-mcrypt-- with-apxs2=/usr/local/httpd/bin/apxs-- with-mysql=/usr/local/mysql/-- with-config-file-path=/usr/local/php5-- enable-mbstring & & make & & make install
4php.ini configuration adjustment, which can be copied generally without modification.
Cp / usr/src/php-5.3.6/php.ini-development / usr/local/php5/php.ini
5 configure http.conf
Vim / usr/local/httpd/conf/httpd.conf
(add AddType application/x-httpd-php .php to LoadModule php5_module modules/libphp5.so
)
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
(also add index.php to DirectoryIndex)
DirectoryIndex index.php index.html
Restart the httpd service
/ usr/local/httpd/bin/apachectl restart
6 Test the PHP page
Vim / usr/local/httpd/htdocs/test.php
7 deploy phpMyAdmin system
Tar zxf phpMyAdmin-3.3.10-all-languages.tar.gz
Mv phpMyAdmin-3.3.10-all-languages phpmyadmin
(change the name, otherwise it will be annoying to type the name on the browser)
Mv phpmyadmin / usr/local/httpd/htdocs/phpmyadmin
(copy to the directory where the web page is stored)
If you test in the page, as shown in the following figure, it means that the linked database is successful and the phpadmin deployment is successful!
These are all the contents of the article "how to build a LAMP platform". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.