大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
sudo docker pull ubuntu:16.04
公司主营业务:成都网站设计、网站制作、移动网站开发等业务。帮助企业客户真正实现互联网宣传,提高企业的竞争能力。创新互联建站是一支青春激扬、勤奋敬业、活力青春激扬、勤奋敬业、活力澎湃、和谐高效的团队。公司秉承以“开放、自由、严谨、自律”为核心的企业文化,感谢他们对我们的高要求,感谢他们从不同领域给我们带来的挑战,让我们激情的团队有机会用头脑与智慧不断的给客户带来惊喜。创新互联建站推出随县免费做网站回馈大家。
sudo docker run -d --name ubuntu -p 80:80 ubuntu:16.04
apt update
apt-get install vim
apt-get install net-tools
apt-get install iputils-ping
apt-get install openssh-server
apt-get install openssh-client
apt-get install lrzsz
apt-get install gcc
apt-get install libpcre3 libpcre3-dev
apt-get install make
apt-get install openssl libssl-dev
apt-get install libxml2 libxml2-dev
apt-get install zip unzip
apt-get install libexpat1-dev
apt-get install libnghttp2-dev
mkdir /etc/apache2
mkdir /etc/apache2/src
cd /etc/apache2/src
如果路径失效,需要去官网下载相应的安装包
wget http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz
wget http://apache.mirrors.lucidnetworks.net//httpd/httpd-2.4.27.tar.gz
wget http://cn2.php.net/distributions/php-7.1.8.tar.gz
tar -xvf apr-1.5.2.tar.gz
tar -xvf apr-util-1.5.4.tar.gz
tar -xvf httpd-2.4.27.tar.gz
tar -xvf php-7.1.8.tar.gz
mv -f apr-1.5.2 httpd-2.4.27/srclib/apr
mv -f apr-util-1.5.4 httpd-2.4.27/srclib/apr-util
直接安装
sudo apt-get install libpcre3 libpcre3-dev
编译安装
在 http://jaist.dl.sourceforge.net/project/pcre/pcre/ 下载
得到文件: pcre-8.32.tar.gz
解压:tar -zxvf pcre-8.32.tar.gz
编译:
cd /home/tnuser/hunter/installers/pcre-8.32
/configure --prefix=/home/tnuser/pcre/
直接安装
apt-get install openssl openssl-devel
下载源码编译安装
cd /etc/apache2/src
wget https://www.openssl.org/source/openssl-1.0.2h.tar.gz
tar zxf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h
./config shared zlib
如果提示 because of configuration changes, you MUST do the following before*** building:
则需要在build之前做make depend
make depend
make
make install
mv /usr/bin/openssl /usr/bin/openssl.bak
mv /usr/include/openssl /usr/include/openssl.bak
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
echo “/usr/local/ssl/lib” >> /etc/ld.so.conf
ldconfig –v
检测安装是否成功
openssl version –a
openssl version -a
mkdir server_root
cd src/httpd-2.4.27 ./configure --prefix=/etc/apache2/server_root --with-included-apr --with-mpm=worker --enable-so --enable-nonportable-atomics=yes --enable-ssl --enable-include --enable-cgi --enable-expires --enable-status --enable-info --enable-rewrite --enable-speling
make
make install
mkdir /etc/apache2/php7
cd /etc/apache2/src/php-7.1.8
./configure --with-apxs2=/etc/apache2/server_root/bin/apxs --prefix=/etc/apache2/php7
make
make test
make install
修改httpd.conf文件
vim /etc/apache2/server_root/conf/httpd.conf
在httpd.conf文件中添加:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
去掉httpd.conf里ServerName前面的注释:
重启apache服务
cd /etc/apache2/server_root/bin
./apachectl start
server-status是Apache查看状态的一个功能模块,在Apache 1.3.2及以后的版本提供
vi /etc/apache2/server_root/conf/httpd.conf
去掉LoadModule status_module modules/mod_status.so的注释
修改Include 路径 为 /etc/apache2/server_root/conf/extra/httpd-info.conf
修改配置如下
vi /etc/apache2/server_root/conf/extra/httpd-info.conf
SetHandler server-status
Order deny,allow
Allow from all
Allow from 10.20.7.15
去掉ExtendedStatus On 注释
vi /etc/apache2/src/httpd-2.4.33
./configure --enable-module=so --enable-info
重启apache
cd /etc/apache2/server_root/bin
./apachectl restart
Docker pull registry.cn-hangzhou.aliyuncs.com/zhufc/apache-status:zhu
docker run -d --name apache -p 80:80 registry.cn-hangzhou.aliyuncs.com/zhufc/apache-status:zhu
docker exec -it da6a434c99e6 bash
cd /etc/apache2/server_root/bin
./apachectl start
Ctrl+alt+q+p
Ctrl+alt+q+p
http://10.20.7.15/server-status
http://10.20.7.15/server-status/phpmyadmin