In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
#! / bin/bash
# install apache
Rpm-e httpd-- nodeps
Yum-y install apr apr-devel cyrus-sasl-devel expat-devel libdb-devel openldap-devel apr-util-devel apr-util pcre-devel pcre
Tar zxf / httpd--C / usr/src
# httpd- must be placed under /
Cd / usr/src/httpd-
. / configure-prefix=/usr/local/httpd-enable-so-enable-rewrite-enable-charset-lite-enable-cgi
Make & & make install
Ln-s / usr/local/httpd/bin/ / usr/local/bin
Echo "[Unit]" > / lib/systemd/system/httpd.service
Echo "Description=The Apache HTTP Server" > > / lib/systemd/system/httpd.service
Echo "After=network.target" > > / lib/systemd/system/httpd.service
Echo "[Service]" > > / lib/systemd/system/httpd.service
Echo "Type=forking" > > / lib/systemd/system/httpd.service
Echo "PIDFile=/usr/local/httpd/logs/httpd.pid" > > / lib/systemd/system/httpd.service
Echo "ExecStart=/usr/local/bin/apachectl $OPTIONS" > > / lib/systemd/system/httpd.service
Echo "ExecReload=/bin/kill-HUP $MAINPID" > > / lib/systemd/system/httpd.service
Echo "KillMode=process" > > / lib/systemd/system/httpd.service
Echo "Restart=on-failure" > > / lib/systemd/system/httpd.service
Echo "RestartSec=42s" > > / lib/systemd/system/httpd.service
Echo "[Install]" > > / lib/systemd/system/httpd.service
Echo "WantedBy=graphical.target" > > / lib/systemd/system/httpd.service
Systemctl enable httpd.service
Sed-I '200c ServerName www.aaa.com:80' / usr/local/httpd/conf/httpd.conf
Systemctl restart httpd.service
# install MYSQL
Yum-y install ncurses-devel
Yum-y install autoconf
Tar zxf / cmake--C /
Cd / cmake-
. / configure & & gmake & & gmake install
Cd
Groupadd mysql
Useradd-M-s / sbin/nologin/ mysql-g mysql
Tar zxf / mysql--C / usr/src
Cd / usr/src/mysql-
Cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DSYSCONFDIR=/etc/-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DWITH_EXTRA_CHARSETS=all
Make & & make install
Chown-R mysql:mysql / usr/local/mysql
Rm-rf / etc/my.cnf
Cp support-files/my-default.cnf / etc/my.cnf
/ usr/local/mysql/scripts/mysql_install_db-user=mysql-basedir=/usr/local/mysql-datadir=/usr/local/mysql/data
Echo "PATH=$PATH:/usr/local/mysql/bin" > > / etc/profile
. / etc/profile
Cp support-files/mysql.server / usr/local/mysql/bin/mysqld.sh
Chmod + x / usr/local/mysql/bin/mysqld.sh
Echo "[Unit]" > > / usr/lib/systemd/system/mysqld.service
Echo "Description=MYSQL Server" > > / usr/lib/systemd/system/mysqld.service
Echo "After=network.target" > > / usr/lib/systemd/system/mysqld.service
Echo "[Service]" > > / usr/lib/systemd/system/mysqld.service
Echo "User=mysql" > > / usr/lib/systemd/system/mysqld.service
Echo "Group=mysql" > > / usr/lib/systemd/system/mysqld.service
Echo "Type=forking" > > / usr/lib/systemd/system/mysqld.service
Echo "PIDFile=/usr/local/mysql/data/localhost.localdomain.pid" > > / usr/lib/systemd/system/mysqld.service
Echo "ExecStart=/usr/local/mysql/bin/mysqld.sh start" > > / usr/lib/systemd/system/mysqld.service
Echo "ExecStop=/usr/local/mysql/bin/mysqld.sh stop" > > / usr/lib/systemd/system/mysqld.service
Echo "[Install]" > > / usr/lib/systemd/system/mysqld.service
Echo "WantedBy=multi-user.target" > > / usr/lib/systemd/system/mysqld.service
Systemctl daemon-reload
Systemctl start mysqld
Systemctl enable mysqld
. / etc/profile
# install PHP
Rpm-e php php-cli php-ldap php-common php-mysql-- nodeps
Yum-y install zlib-devel libxml2-devel
Tar zxf / libmcrypt-C / usr/src
Cd / usr/src/libmcrypt
. / configure
Make & & make install
Ln-s / usr/local/lib/libmcrypt. / usr/lib
Cd
Tar zxf / mhash--C / usr/src
Cd / usr/src/mhash-
. / configure
Make & & make install
Ln-s / usr/local/lib/libmhash / usr/lib
Cd
Tar zxf / mcrypt--C / usr/src
Cd / usr/src/mcrypt-
Export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
. / configure
Make & & make install
Cd
Tar zxf / php--C / usr/src
Cd / usr/src/php-
/ configure-- prefix=/usr/local/php5-- 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/php5-- enable-mbstring
Make & & make install
Cp / usr/src/php-/php.ini-development / usr/local/php5/php.ini
Sed-I '680c default_charset = "utf-8" / usr/local/php5/php.ini
Sed-I 's/short_open_tag = Off/short_open_tag = On/' / usr/local/php5/php.ini
Sed-I '873c extension=php_mysqli.dll' / usr/local/php5/php.ini
Tar zxf / zend-loader-php-C / usr/src
Cd / usr/src/zend-loader-php
Cp ZendGuardLoader.so / usr/local/php5/lib/php
Sed-I '340a zend_extension=/usr/local/php5/lib/php/ZendGuardLoader.so' / usr/local/php5/php.ini
Sed-I '341a zend_loader.enable=1' / usr/local/php5/php.ini
Sed-I '259c DirectoryIndex index.html index.php' / usr/local/httpd/conf/httpd.conf
Sed-I '396a AddType application/x-httpd-php .php' / usr/local/httpd/conf/httpd.conf
/ usr/local/httpd/bin/apachectl restart
Echo "> > / usr/local/httpd/htdocs/test1.php
Echo "
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.