In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Install the Apache service
For an overview of the detailed configuration and principle of installing Apache, please refer to: CentOS 7.4.Building Apache website service
[root@centos01 ~] # mount / dev/cdrom / mnt/ [root@centos01 ~] # cp / mnt/* / usr/src/ [root@centos01] # mount / dev/cdrom / mnt/ [root@centos01 ~] # rm-rf / etc/yum.repos.d/CentOS-* [root@centos01 ~] # tar zxvf / usr/src/httpd-2.2.17.tar.gz-C / usr/src/ [root@centos01 ~ ] # cd / usr/src/httpd-2.2.17/ [root@centos01 httpd-2.2.17] # / configure-- prefix=/usr/local/httpd-- enable-so-- enable-rewrite-- enable-charset-lite-- enable-cgi [root@centos01 httpd-2.2.17] # make & & make install [root@centos01] # ln-s / usr/local/httpd/bin/* / usr/local/bin/ [root@centos01 ~] # cp / usr/local/httpd/bin/apachectl / etc/init.d/httpd [root@centos01 ~] # chmod + x / etc/init.d/httpd [root@centos01 ~] # vim / etc/init.d/httpd # chkconfig:35 80 # description:apache [root@centos01 ~] # chkconfig-add httpd [root@centos01 ~] # chkconfig-level 35 httpd on [root@centos01] # vim / usr/local/ Httpd/conf/httpd.conf 98 ServerName 192.168.100.10 systemctl start httpd 80 [root@centos01] # systemctl start httpd [root@centos01] # netstat-anptu | grep 80 tcp6 00: 80: * LISTEN 53682/httpd II. Install the MySQL database
Install MySQL detailed configuration and MySQL principle overview, please refer to: Centos install MySQL database
[root@centos01] # groupadd mysql [root@centos01] # useradd-M-s / sbin/nologin-g mysql mysql [root@centos01] # yum-y install ncurses-devel [root@centos01] # tar zxvf / usr/src/cmake-2.8.6.tar.gz-C / usr/src/ [root@centos01] # cd / usr/src/cmake-2.8.6/ [root@centos01 cmake-2.8.6] #. / configure & & gmake & & gmake install [root@centos01 ~] # tar zxvf / usr/src/mysql-5.5.22.tar.gz-C / usr/src/ [root@centos01] # cd / usr/src/mysql-5.5.22/ [root@centos01 mysql-5.5.22] # cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DWITH_EXTRA_CHARSETS=all-DSYSCONFDIR=/etc [root@centos01 mysql -5.5.22] # make & & make install [root@centos01 mysql-5.5.22] # cp support-files/my-medium.cnf / etc/my.cnf cp: is "/ etc/my.cnf" overwritten? Y [root@centos01 mysql-5.5.22] # cp support-files/mysql.server / etc/init.d/mysqld [root@centos01 ~] # chmod + x / etc/init.d/mysqld [root@centos01 ~] # chkconfig-- add mysqld [root@centos01 ~] # chkconfig-level 35 mysqld on [root@centos01 ~] # vim / etc/profile [root@centos01] # source / etc/profile [root@centos01 ~] # / usr/local/mysql/scripts/mysql_install_db-- user=mysql-- basedir=/usr/local/mysql-- datadir=/usr/local/mysql/data [root@centos01 ~] # chown-R mysql:mysql / usr/local/mysql/ [root@centos01 ~] # systemctl start mysqld [root@centos01 ~] # mysqladmin-uroot password New password: Confirm new password: [root@centos01 ~] # mysql-uroot-ppwd@123 III. Install PHP
For detailed configuration and principle overview of installing PHP, please refer to: Centos 7 to build LNMP architecture and deploy Discuz forum.
[root@centos01 ~] # yum-y install zlib-devel libxml2-devel [root@centos01 ~] # tar zxvf / usr/src/libmcrypt-2.5.8.tar.gz-C / usr/src/ [root@centos01 ~] # cd / usr/src/libmcrypt-2.5.8/ [root@centos01 libmcrypt-2.5.8] #. / configure & & make & & make install [root @ centos01 libmcrypt-2.5.8] # ln-s / usr/local/lib/libmcrypt.* / usr/lib/ [root@centos01 ~] # tar zxvf / usr/src/mhash-0.9.9.9.tar.gz-C / usr/src [root@centos01 ~] # cd / usr/src/mhash-0.9.9.9/ [root@centos01 mhash-0.9.9.9] #. / configure & & make & & make install [root @ centos01 mhash-0.9.9.9] # ln-s / usr/local/lib/libmhash.* / usr/lib/ [root@centos01 ~] # tar zxvf / mnt/mcrypt-2.6.8.tar.gz-C / usr/src/ [root@centos01 ~] # cd / usr/src/mcrypt-2.6.8/ [root@centos01 mcrypt-2.6.8] #. / configure [root@centos01 mcrypt-2.6.8] # export LD_LIBRARY_PATH=/usr/local/lib [root@centos01 mcrypt-2.6.8] #. / configure [root@centos01 mcrypt-2.6.8] # make & & make install [root@centos01 ~] # tar zxvf / usr/src/php-5.3.28.tar.gz-C / usr/src/ [root@centos01 ~] # cd / usr/src/php-5.3.28/ [root@centos01 php- 5.3.28] #. / configure-prefix=/usr/local/php-- with-mcrypt-- with-apxs2=/usr/local/httpd/bin/apxs-- with-mysql=/usr/local/mysql/-- with-mysqli=/usr/local/mysql/bin/mysql_config-- with-config-file-path=/usr/local/php-- enable-mbstring [root@centos01 php-5.3.28] # make & & make install [root@centos01 php-5.3 .28] # cp php.ini-production / usr/local/php/php.ini [root@centos01 ~] # tar zxvf / usr/src/zendguardloader-php-5.3-linux-glibc23-i386.tar.gz-C / usr/src/ [root@centos01 ~] # cd / usr/src/ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ [root@centos01 php-5.3.x] # lsZendGuardLoader.so [root @ centos01 php-5.3.x] # cp ZendGuardLoader.so / usr/local/php/lib/php/ [root@centos01 php-5.3.x] # vim / usr/local/php/php.ini [PHP] zend_extension=/usr/local/php/lib/php/ZendGuardLoader.sozend_loader.enable=1 [root@centos01 ~] # vim / usr/local/httpd/conf/httpd.conf 99 ServerName 192.168.100.10 ServerName 80 168 DirectoryIndex index.html index.php311 AddType application/x-httpd-php .php [root@centos01 ~] # systemctl restart httpd [root@centos01 ~] # vim / usr/local/httpd/htdocs/index.php IV. Deploy phpMyadmin system [root@centos01 ~] # tar zxvf / usr/src/phpmyadmin-3.3.10-all-languages.tar.gz-C / usr/src/ [root@centos01 ~] # mv / usr/src/phpMyAdmin-3.3.10-all-languages//usr/local/httpd/htdocs/phpMyAdmin [root@centos01 ~] # cp / usr/local/httpd/htdocs/phpMyAdmin/config.sample.inc.php / usr/local/httpd/htdocs/phpMyAdmin/config.inc.php1, Users access phpmyadmin system
5. Install DNS
For detailed configuration and principle overview of installing DNS, please refer to: CentOS7 simple build DNS service
[root@centos01 ~] # yum-y install bind bind-chroot bind-utils [root@centos01 ~] # cp / etc/named.conf / etc/named.conf.bak [root@centos01 ~] # echo "" > / etc/named.conf [root@centos01 ~] # vim / etc/named.confoptions {listen-on port 53 {any;}; directory "/ var/named";}; zone "benet.com" IN {type master File "benet.com.zone"; allow-transfer {any;};}; [root@centos01 ~] # named-checkconf-z / etc/named.conf [root@centos01 ~] # vim / var/named/benet.com.zone$TTL 86400 @ SOA benet.com. Root.benet.com (2020020710 1H 15M 1W 1D) @ NS centos01.benet.com.centos01 A 192.168.100.10www A 192.168.100.10 [root@centos01] # named-checkzone benet.com / var/named/benet.com.zone [root@centos01] # chmod 755 / var/named/benet.com.zone [root@centos01 ~] # chown named:named / var/ Named/benet.com.zone [root@centos01 ~] # systemctl start named [root@centos01 ~] # systemctl enable named1, Use domain name to access phpmyadmin system
-this is the end of this article. Thank you for reading-
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.