烟台做网站排名云南医疗seo整站优化

当前位置: 首页 > news >正文

烟台做网站排名,云南医疗seo整站优化,wordpress文件缺失,网站 盈利模式源码部署lamt架构 lamt由apache#xff0c;mysql#xff0c;tomcat三者组成 文章目录 源码部署lamt架构1.准备工作1.1.配置yum源#xff0c;关闭防火墙和selinux1.2.拉取相应源码包 2.安装apache3.安装mariadb4.安装tomcat 1.准备工作 1.1.配置yum源#xff0c;关闭防火墙…源码部署lamt架构 lamt由apachemysqltomcat三者组成 文章目录 源码部署lamt架构1.准备工作1.1.配置yum源关闭防火墙和selinux1.2.拉取相应源码包 2.安装apache3.安装mariadb4.安装tomcat 1.准备工作 1.1.配置yum源关闭防火墙和selinux [roottomcat ~]# rm -rf /etc/yum.repos.d/* [roottomcat ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed 100 2495 100 2495 0 0 2231 0 0:00:01 0:00:01 –:–:– 2231 [roottomcat ~]# cat /etc/yum.repos.d/server.repo eof[Everything]nameeverythingbaseurlhttps://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/enabled1gpgcheck0[good]namegoodbaseurlhttp://rpms.remirepo.net/enterprise/8/remi/x86_64/enabled1gpgcheck0eof [roottomcat ~]# yum clean all Updating Subscription Management repositories. Unable to read consumer identity This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. 12 files removed [roottomcat ~]# yum makecache//关闭防火墙和selinux [rootnote1 ~]# systemctl disable –now firewalld.service Removed /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [rootnote1 ~]# setenforce 01.2.拉取相应源码包 [roottomcat ~]# yum -y install wget vim 省略 … [roottomcat ~]# wget https://downloads.apache.org/apr/apr-1.7.4.tar.gz [roottomcat ~]# wget https://downloads.apache.org/apr/apr-util-1.6.3.tar.gz [roottomcat ~]# wget https://downloads.apache.org/httpd/httpd-2.4.57.tar.gz [roottomcat ~]# ls anaconda-ks.cfg apache-tomcat-9.0.80.tar.gz apr-1.7.4.tar.gz apr-util-1.6.3.tar.gz httpd-2.4.57.tar.gz2.安装apache //安装依赖包 [roottomcat ~]# yum -y install gcc gcc-c make pcre-devel openssl openssl-devel libtool expat-devel bzip2 省略 … //安装开发工具包 [roottomcat ~]# yum groups mark install Development Tools//创建apache服务的用户和组 [roottomcat ~]# groupadd -r apache [roottomcat ~]# useradd -r -M -s /sbin/nologin -g apache apache//解压源码包 [roottomcat ~]# tar xf apr-1.7.4.tar.gz -C /usr/local/ [roottomcat ~]# tar xf apr-util-1.6.3.tar.gz -C /usr/local/ [roottomcat ~]# tar xf httpd-2.4.57.tar.gz -C /usr/local/ [roottomcat ~]# cd /usr/local/ ls apr-1.7.4 apr-util-1.6.3 bin etc games httpd-2.4.57 include lib lib64 libexec sbin share src//进入apr的源码包目录在configure定制组件中修改相关信息 [roottomcat local]# cd apr-1.7.4/ [roottomcat apr-1.7.4]# ls apr-config.in atomic config.layout file_io LICENSE network_io README.cmake time apr.dep build configure helpers locks NOTICE shmem tools apr.dsp build.conf configure.in include Makefile.in NWGNUmakefile strings user apr.dsw buildconf docs libapr.dep Makefile.win passwd support apr.mak build-outputs.mk dso libapr.dsp memory poll tables apr.pc.in CHANGES emacs-mode libapr.mak misc random test apr.spec CMakeLists.txt encoding libapr.rc mmap README threadproc [roottomcat apr-1.7.4]# sed -i /\(RM \)cfgfile/ # \(RM \)cfgfile/g configure sed: -e expression #1, char 18: comments dont accept any addresses [roottomcat apr-1.7.4]# sed -i s/\(RM \)cfgfile/ # \(RM \)cfgfile/g configure [roottomcat apr-1.7.4]# grep -C2 # \(RM \)cfgfile configurecfgfile\({ofile}Ttrap \)RM $cfgfile\; exit 1 1 2 15# \(RM \)cfgfilecat _LT_EOF \(cfgfile [roottomcat apr-1.7.4]#//编译安装apr-1.7.4、apr-util-1.6.3、httpd-2.4.57 [roottomcat apr-1.7.4]# ./configure --prefix/usr/local/apr [roottomcat apr-1.7.4]# make make install[roottomcat apr-1.7.4]# cd ../apr-util-1.6.3/ [roottomcat apr-util-1.6.3]# ./configure --prefix/usr/local/apr-util --with-apr/usr/local/apr [roottomcat apr-util-1.6.3]# make make install[roottomcat apr-util-1.6.3]# cd ../httpd-2.4.57/ [roottomcat httpd-2.4.57]# ./configure --prefix/usr/local/apache \--enable-so \--enable-ssl \--enable-cgi \--enable-rewrite \--with-zlib \--with-pcre \--with-apr/usr/local/apr \--with-apr-util/usr/local/apr-util/ \--enable-modulesmost \--enable-mpms-sharedall \--with-mpmprefork [roottomcat httpd-2.4.57]# make make install//安装后配置 [roottomcat httpd-2.4.57]# echo export PATH/usr/local/apache/bin:\)PATH /etc/profile.d/apache.sh [roottomcat httpd-2.4.57]# source /etc/profile.d/apache.sh [roottomcat httpd-2.4.57]# ln -s /usr/local/apache/include/ /usr/include/httpd [roottomcat httpd-2.4.57]# echo MANPATH /usr/local/apache/man /etc/man.config//取消ServerName前面的注释 [roottomcat httpd-2.4.57]# sed -i /#ServerName/s/#//g /usr/local/apache/conf/httpd.conf//启动httpd服务 [roottomcat httpd-2.4.57]# apachectl start [roottomcat httpd-2.4.57]# ss -antl State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 128 *:80 *:访问apache页面
3.安装mariadb 使用yum命令安装mariadb [roottomcat ~]# yum -y install mariadb mariadb-server [roottomcat ~]# systemctl enable –now mariadb Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service. Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service. Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service. [rootnote1 ~]# mysql -e set password password(12345678);//查看端口 [roottomcat ~]# ss -antl State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 0.0.0.0:22 0.0.0.0:

LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 80 *:3306 :
LISTEN 0 128 *:80 *:4.安装tomcat //安装依赖包 [roottomcat ~]# dnf -y install java-17-openjdk java-17-openjdk-devel//查看安装的版本能够查看到版本则说明安装成功 [roottomcat ~]# java –version openjdk 17.0.1 2021-10-19 LTS OpenJDK Runtime Environment 21.9 (build 17.0.112-LTS) OpenJDK 64-Bit Server VM 21.9 (build 17.0.112-LTS, mixed mode, sharing)//解压源码包至指定目录 [roottomcat ~]# tar xf apache-tomcat-9.0.80.tar.gz -C /usr/local/ [roottomcat ~]# cd /usr/local/ ls apache apr apr-util bin games include lib64 sbin src apache-tomcat-9.0.80 apr-1.7.4 apr-util-1.6.3 etc httpd-2.4.57 lib libexec share//设置tomcat软链接方便后续如果更换tomcat版本后也能直接使用 [roottomcat local]# ln -s apache-tomcat-9.0.80 tomcat [roottomcat local]# ll total 12 drwxr-xr-x. 14 root root 164 Oct 10 23:52 apache drwxr-xr-x. 9 root root 220 Oct 11 00:07 apache-tomcat-9.0.80 drwxr-xr-x. 6 root root 58 Oct 10 23:45 apr drwxr-xr-x. 29 501 games 4096 Oct 10 23:45 apr-1.7.4 drwxr-xr-x. 5 root root 43 Oct 10 23:46 apr-util drwxr-xr-x. 21 501 games 4096 Oct 10 23:46 apr-util-1.6.3 drwxr-xr-x. 2 root root 6 Aug 12 2018 bin drwxr-xr-x. 2 root root 6 Aug 12 2018 etc drwxr-xr-x. 2 root root 6 Aug 12 2018 games drwxr-xr-x. 14 501 games 4096 Oct 10 23:51 httpd-2.4.57 drwxr-xr-x. 2 root root 6 Aug 12 2018 include drwxr-xr-x. 2 root root 6 Aug 12 2018 lib drwxr-xr-x. 2 root root 6 Aug 12 2018 lib64 drwxr-xr-x. 2 root root 6 Aug 12 2018 libexec drwxr-xr-x. 2 root root 6 Aug 12 2018 sbin drwxr-xr-x. 5 root root 49 Jul 20 11:24 share drwxr-xr-x. 2 root root 6 Aug 12 2018 src lrwxrwxrwx. 1 root root 20 Oct 11 00:08 tomcat - apache-tomcat-9.0.80//将tomcat的lib位置存放在/etc/ld.so.conf/d/下面命名一个自身名字的文件方便查找 [roottomcat local]# vim /etc/ld.so.conf.d/tomcat.conf [roottomcat local]# cat /etc/ld.so.conf.d/tomcat.conf /usr/local/tomcat/lib//启动服务使用绝对路径执行/usr/local/tomcat/bin/下面的脚本tomcat不能写进环境变量放置后续更改tomcat版本后环境变量仍是之前的tomcat版本 [roottomcat local]# cd tomcat/bin/ [roottomcat bin]# ./catalina.sh start Using CATALINA_BASE: /usr/local/tomcat Using CATALINA_HOME: /usr/local/tomcat Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar Using CATALINA_OPTS:
Tomcat started. [roottomcat bin]# ss -antl State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 0.0.0.0:22 0.0.0.0:

LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 1 [::ffff:127.0.0.1]:8005 :
LISTEN 0 80 *:3306 :
LISTEN 0 100 *:8080 :
LISTEN 0 128 *:80 *:*访问tomcat的web页面
启用httpd的代理模块 [roottomcat ~]# sed -i /proxy_module/s/#//g /usr/local/apache/conf/httpd.conf [roottomcat ~]# sed -i /proxy_fcgi_module/s/#//g /usr/local/apache/conf/httpd.conf [roottomcat ~]# sed -i /proxy_connect_module/s/#//g /usr/local/apache/conf/httpd.conf [roottomcat ~]# sed -i /proxy_http_module/s/#//g /usr/local/apache/conf/httpd.conf配置虚拟主机 [roottomcat ~]# vim /usr/local/apache/conf/httpd.conf [roottomcat ~]# tail -13 /usr/local/apache/conf/httpd.conf SSLRandomSeed connect builtin /IfModuleVirtualHost :80DocumentRoot /usr/local/apache/htdocsProxyPass / http://192.168.195.133:8080/ProxyPassReverse / http://192.168.195.133:8080/Directory /usr/local/apache/htdocsOptions noneAllowOverride noneRequire all granted/Directory /VirtualHost重启apache [roottomcat ~]# apachectl restart [roottomcat ~]# ss -antl State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 0.0.0.0:22 0.0.0.0:

LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 1 [::ffff:127.0.0.1]:8005 :
LISTEN 0 80 *:3306 :
LISTEN 0 100 *:8080 :
LISTEN 0 128 *:80 *:*通过80端口进行访问