##源码包下载
yum install gcc
yum install gcc-c++
yum install wget
yum install zip bzip2
yum install unzip
yum install libxml2 libxml2-devel zlib zlib-devel
wget https://www.apache.org/dist/apr/apr-1.6.3.tar.gz
wget https://www.apache.org/dist/apr/apr-util-1.6.1.tar.bz2
wget https://ftp.pcre.org/pub/pcre/pcre-8.41.tar.gz
wget https://www.apache.org/dist/httpd/httpd-2.4.34.tar.gz
wget http://101.96.10.64/jp2.php.net/distributions/php-7.2.8.tar.gz
wget https://nchc.dl.sourceforge.net/project/re2c/old/re2c-0.13.5-bin.zip
##locate install
yum install mlocate
cd /var/lib/
whereis locate
sudo chgrp mlocate /usr/bin/mlocate
sudo chmod g+s /usr/bin/mlocate
updatedb
##nkf install
wget ftp://ftp.pbone.net/mirror/www.startcom.org/AS-5.0.1/os/x86_64/StartCom/RPMS/nkf-2.07-1.1.SEL5.x86_64.rpm
rpm -ivh nkf-2.07-1.1.SEL5.x86_64.rpm
nkf --version
##mysql install
yum -y install ncurses-devel
yum install cmake 2.8.10.2
wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.12.tar.gz
wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-boost-8.0.12.tar.gz
cd mysql-8.0.12
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DSYSCONFDIR=/etc -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWTH_READLINE=1 -DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_BOOST=/usr/local/mysql-boost -DMYSQL_USER=mysql
chown -R mysql.mysql /usr/local/mysql/data/
初始化:
cd /usr/local/mysql/bin
./mysqld --initialize --user=mysql --datadir=/usr/local/mysql/data/
./mysql_ssl_rsa_setup
开机启动
cd /usr/local/mysql/
cp support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
SET GLOBAL sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
##apache install
tar -xzvf apr-1.6.3.tar.gz
cd apr-1.6.3
./configure --prefix=/usr/local/apr
make && make install
tar -xzvf pcre-8.41.tar.gz
cd pcre-8.42
./configure --prefix=/usr/local/pcre
make && make install
tar -xzvf apr-util-1.6.1.tar.gz
cd apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
致命的エラー: expat.h: そのようなファイルやディレクトリはありません
yum install expat-devel
make && make install
tar -xzvf httpd-2.4.34.tar.gz
./configure --prefix=/usr/local/apache --enable-so --enable-cgi --enable-ssl --enable-rewrite --with-pcre=/usr/local/pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modules=most --enable-mpms-shared=all --with-mpm=event --disable-userdir --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static=support
checking for OpenSSL version >= 0.9.8a... FAILED
configure: WARNING: OpenSSL version is too old
yum install openssl-devel
yum update openssl
make && make install
/etc/init.d/httpd status
/etc/init.d/httpd: 行 97: lynx: コマンドが見つかりません
yum install lynx
chkconfig --list
chkconfig --add httpd
chkconfig httpd on
chkconfig --list
##php install
curl install
wget https://curl.haxx.se/download/curl-7.61.1.tar.gz
tar -xzvf curl-7.61.1.tar.gz
cd curl-7.61.1
./configure --prefix=/usr/local/curl --with-ssl
make && make install
/usr/local/curl/bin/curl --version
curl 7.61.1 (x86_64-pc-linux-gnu) libcurl/7.61.1 zlib/1.2.7
Release-Date: 2018-09-05
yum install libpng libpng-devel libjpeg-turbo libjpeg-turbo-devel freetype freetype-devel gd
tar -xzvf php-7.2.8.tar.gz
cd php-7.2.8
yum install libpng libpng-devel libjpeg-turbo libjpeg-turbo-devel freetype freetype-devel gd
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --enable-mbstring=all --enable-mbregex --enable-shared --with-curl=/usr/local/curl --with-gd --with-freetype-dir --with-jpeg-dir -–with-png-dir
https local lisence create:
openssl req -new -key /usr/local/apache/conf/server.key -out /usr/local/apache/conf/server.csr