apache php mysql python 环境部署与离线安装deb包

这篇具有很好参考价值的文章主要介绍了apache php mysql python 环境部署与离线安装deb包。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1.背景介绍

使用的系统为ubuntu18.04 server amd64

2. 主要涉及操作

2.1 安装系统:

下载:https://cn.ubuntu.com/download/alternative-downloads
apache php mysql python 环境部署与离线安装deb包,apache,php,mysql
选择查看全部Ubuntu 镜像站
apache php mysql python 环境部署与离线安装deb包,apache,php,mysql
点击可以选择使用国内的源进行下载,速度非常快

2.2 apache mysql php安装

安装顺序为:apache2,mysql,php,在当前的Ubuntu18安装apache2和mysql时,apt会自动将这两个软件加入服务,所以在安装之后可以通过systemctl status apache2/mysql查看两者的状态
apache php mysql python 环境部署与离线安装deb包,apache,php,mysql

2.3 配置

在安装mysql后,默认mysql是没有密码的,所以需要我们手动设置密码:
设置方式可以通过以下命令:

mysql -u root -p #不用输入密码
# plugin是插件的意思,把插件修改为mysql本地的:mysql-native-password
update user set plugin='mysql_native_password' where user='root';
#root的初始authentication_string字段为空,更改密码操作如下:执行下面的SQL语句把root的登录密码改为secpoint@123。
update user set authentication_string=password('secpoint@123') where user='root';

当然也可以把这些设置内容写入到sql脚本中,:

SET FOREIGN_KEY_CHECKS=0;
use `mysql`;
update user set plugin='mysql_native_password' where user='root';
update user set authentication_string=password('secpoint@123') where user='root';

执行方式:

mysql -uroot -psecpoint@123 -e 'source config/modify.sql' 
sudo systemctl restart mysql
或者sudo systemctl restart mysql.service都可以

执行后需要重启mysql生效

2.4 python相关库安装

参看文章:https://blog.csdn.net/LCY133/article/details/128597562?spm=1001.2014.3001.5502
这里的安装与这里的方法完全一致,因为就是我写的文章,今天又重新操作了一遍

3. 操作记录

因为在这里涉及部署环境之后,再将安装包进行离线安装,所以在安装中我也会把deb包下载下来,把安装顺序记录到文件内以便后续的安装。

3.1 软件安装

安装apache:

sudo apt-get install -y apache2 >apacheinstall.txt
cd /var/cache/apt/archives/
mkdir apachepack
mv *.deb apachepack/
cp -Rf apachepack/ ~
cd ~

安装MySQL:

sudo apt-get install -y mysql-server >mysqlinstall.txt
cd /var/cache/apt/archives/
mkdir mysqlpack
mv *.deb mysqlpack/
cp -Rf mysqlpack/ ~
cd ~

安装php:

sudo apt-get install -y  php libapache2-mod-php >phpinstall.txt
cd /var/cache/apt/archives/
mkdir phppack
mv *.deb phppack/
cp -Rf phppack/ ~
cd ~

注:因为 在这里安装旧版的php依旧可以使用,且无需多余配置,在本次使用的是旧版php安装方式,并未执行以上的安装过程

sudo dpkg -i php-common_1%3a35ubuntu6.1_all.deb php7.0-common_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0-json_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0-opcache_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0-readline_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0-cli_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0-fpm_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0_7.0.33-0ubuntu0.16.04.16_all.deb php_1%3a7.0+35ubuntu6.1_all.deb

sudo dpkg -i libapache2-mod-php7.0_7.0.33-0ubuntu0.16.04.16_amd64.deb libapache2-mod-php_1%3a7.0+35ubuntu6.1_all.deb
sudo dpkg -i php7.0-mysql_7.0.33-0ubuntu0.16.04.16_amd64.deb php-mysql_1%3a7.0+35ubuntu6.1_all.deb

python 相关库:

sudo apt-get install -y wget build-essential libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev zlib1g >pythoninstall.txt
cd /var/cache/apt/archives/
mkdir pythoninstall
mv *.deb pythoninstall/
cp -Rf pythoninstall/ ~
cd ~

3.2 读取文件内容后进行文件内容抽取

import os,sys
path1 = os.path.dirname(os.path.abspath(__file__))
path2 = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(path2)
sys.path.append(path1)


#folderList = ["apacheinstall.txt","mysqlinstall.txt"]
folderList = ["pythoninstall.txt"]
for file in folderList:
    debList = []
    with open(file,'rt',encoding='GBK') as f:
        for line in f:
            if line.startswith("Preparing"):
                mid1 = line.split(".../")
                mid2 = mid1[1].split(" ")
                #debList.append(mid2[0])
                if "/" in mid2[0]:
                    mid3 = mid2[0].split("/")
                    index = mid3[1].index("-")
                    deb = mid3[1][index+1:]
                    #print(deb)
                    debList.append(deb)
                else:
                    #debList.append(mid2[0])
                    index = mid2[0].index("-")
                    deb = mid2[0][index + 1:]
                    #print(deb)
                    debList.append(deb)
    # debnewList = []
    # for deb in debList:
    #     index = deb.index("-")
    #     deb_new = deb[index+1]
    #     debnewList.append(deb_new)

    print(debList,len(debList))
    # commandList = []
    # for deb in debList:
    #     command0 = "sudo "
    #     command1 = "dpkg -i "
    #     strCommand = command0 + command1 + deb + "\n"
    #     #print(strCommand)
    #     commandList.append(strCommand)

    #fileCommand = "".join(commandList)
    command1 = " ".join(debList)
    print(command1)
    command2 = "sudo dpkg -i "
    name = file.split(".")
    shname = name[0] + ".sh"
    with open(shname,"wt") as f2:

        f2.write("cd {} \n".format(name[0]))
        f2.write(command2+command1+"\n")
        f2.write("cd .. \n")

安装过程中读到的install.txt文件如下:

Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  apache2-bin apache2-data apache2-utils libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 ssl-cert
Suggested packages:
  www-browser apache2-doc apache2-suexec-pristine | apache2-suexec-custom
  openssl-blacklist
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 ssl-cert
0 upgraded, 10 newly installed, 0 to remove and 42 not upgraded.
Need to get 1,730 kB of archives.
After this operation, 7,000 kB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libapr1 amd64 1.6.3-2 [90.9 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libaprutil1 amd64 1.6.1-2ubuntu0.1 [84.6 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.1-2ubuntu0.1 [10.6 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libaprutil1-ldap amd64 1.6.1-2ubuntu0.1 [8,752 B]
Get:5 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 liblua5.2-0 amd64 5.2.4-1.1build1 [108 kB]
Get:6 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apache2-bin amd64 2.4.29-1ubuntu4.27 [1,071 kB]
Get:7 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apache2-utils amd64 2.4.29-1ubuntu4.27 [83.3 kB]
Get:8 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apache2-data all 2.4.29-1ubuntu4.27 [160 kB]
Get:9 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apache2 amd64 2.4.29-1ubuntu4.27 [95.1 kB]
Get:10 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 ssl-cert all 1.0.39 [17.0 kB]
Preconfiguring packages ...
Fetched 1,730 kB in 9s (184 kB/s)
Selecting previously unselected package libapr1:amd64.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 67524 files and directories currently installed.)
Preparing to unpack .../0-libapr1_1.6.3-2_amd64.deb ...
Unpacking libapr1:amd64 (1.6.3-2) ...
Selecting previously unselected package libaprutil1:amd64.
Preparing to unpack .../1-libaprutil1_1.6.1-2ubuntu0.1_amd64.deb ...
Unpacking libaprutil1:amd64 (1.6.1-2ubuntu0.1) ...
Selecting previously unselected package libaprutil1-dbd-sqlite3:amd64.
Preparing to unpack .../2-libaprutil1-dbd-sqlite3_1.6.1-2ubuntu0.1_amd64.deb ...
Unpacking libaprutil1-dbd-sqlite3:amd64 (1.6.1-2ubuntu0.1) ...
Selecting previously unselected package libaprutil1-ldap:amd64.
Preparing to unpack .../3-libaprutil1-ldap_1.6.1-2ubuntu0.1_amd64.deb ...
Unpacking libaprutil1-ldap:amd64 (1.6.1-2ubuntu0.1) ...
Selecting previously unselected package liblua5.2-0:amd64.
Preparing to unpack .../4-liblua5.2-0_5.2.4-1.1build1_amd64.deb ...
Unpacking liblua5.2-0:amd64 (5.2.4-1.1build1) ...
Selecting previously unselected package apache2-bin.
Preparing to unpack .../5-apache2-bin_2.4.29-1ubuntu4.27_amd64.deb ...
Unpacking apache2-bin (2.4.29-1ubuntu4.27) ...
Selecting previously unselected package apache2-utils.
Preparing to unpack .../6-apache2-utils_2.4.29-1ubuntu4.27_amd64.deb ...
Unpacking apache2-utils (2.4.29-1ubuntu4.27) ...
Selecting previously unselected package apache2-data.
Preparing to unpack .../7-apache2-data_2.4.29-1ubuntu4.27_all.deb ...
Unpacking apache2-data (2.4.29-1ubuntu4.27) ...
Selecting previously unselected package apache2.
Preparing to unpack .../8-apache2_2.4.29-1ubuntu4.27_amd64.deb ...
Unpacking apache2 (2.4.29-1ubuntu4.27) ...
Selecting previously unselected package ssl-cert.
Preparing to unpack .../9-ssl-cert_1.0.39_all.deb ...
Unpacking ssl-cert (1.0.39) ...
Setting up libapr1:amd64 (1.6.3-2) ...
Setting up apache2-data (2.4.29-1ubuntu4.27) ...
Setting up ssl-cert (1.0.39) ...
Setting up libaprutil1:amd64 (1.6.1-2ubuntu0.1) ...
Setting up liblua5.2-0:amd64 (5.2.4-1.1build1) ...
Setting up libaprutil1-ldap:amd64 (1.6.1-2ubuntu0.1) ...
Setting up libaprutil1-dbd-sqlite3:amd64 (1.6.1-2ubuntu0.1) ...
Setting up apache2-utils (2.4.29-1ubuntu4.27) ...
Setting up apache2-bin (2.4.29-1ubuntu4.27) ...
Setting up apache2 (2.4.29-1ubuntu4.27) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.

仅仅写这一个吧,毕竟太长了这个日志
以下为由日志得到的三个安装脚本

cd apachepack
sudo dpkg -i libapr1_1.6.3-2_amd64.deb libaprutil1_1.6.1-2ubuntu0.1_amd64.deb libaprutil1-dbd-sqlite3_1.6.1-2ubuntu0.1_amd64.deb libaprutil1-ldap_1.6.1-2ubuntu0.1_amd64.deb liblua5.2-0_5.2.4-1.1build1_amd64.deb apache2-bin_2.4.29-1ubuntu4.27_amd64.deb apache2-utils_2.4.29-1ubuntu4.27_amd64.deb apache2-data_2.4.29-1ubuntu4.27_all.deb apache2_2.4.29-1ubuntu4.27_amd64.deb ssl-cert_1.0.39_all.deb
cd .. 

cd mysqlpack

sudo dpkg -i mysql-common_5.8+1.0.4_all.deb libaio1_0.3.110-5ubuntu0.1_amd64.deb mysql-client-core-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb mysql-client-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb mysql-server-core-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb libevent-core-2.1-6_2.1.8-stable-4build1_amd64.deb  libhtml-tagset-perl_3.20-3_all.deb liburi-perl_1.73-1_all.deb libhtml-parser-perl_3.72-3build1_amd64.deb libcgi-pm-perl_4.38-1_all.deb libfcgi-perl_0.78-2build1_amd64.deb libcgi-fast-perl_1%3a2.13-1_all.deb libencode-locale-perl_1.05-1_all.deb libhtml-template-perl_2.97-1_all.deb libtimedate-perl_2.3000-2_all.deb libhttp-date-perl_6.02-1_all.deb libio-html-perl_1.001-1_all.deb liblwp-mediatypes-perl_6.02-1_all.deb libhttp-message-perl_6.14-1_all.deb
sudo dpkg -i mysql-server-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb mysql-server_5.7.42-0ubuntu0.18.04.1_all.deb
# sudo dpkg -i mysql-server_5.7.42-0ubuntu0.18.04.1_all.deb
cd .. 

php

sudo dpkg -i php-common_1%3a35ubuntu6.1_all.deb php7.0-common_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0-json_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0-opcache_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0-readline_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0-cli_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0-fpm_7.0.33-0ubuntu0.16.04.16_amd64.deb php7.0_7.0.33-0ubuntu0.16.04.16_all.deb php_1%3a7.0+35ubuntu6.1_all.deb

sudo dpkg -i libapache2-mod-php7.0_7.0.33-0ubuntu0.16.04.16_amd64.deb libapache2-mod-php_1%3a7.0+35ubuntu6.1_all.deb

sudo dpkg -i php7.0-mysql_7.0.33-0ubuntu0.16.04.16_amd64.deb php-mysql_1%3a7.0+35ubuntu6.1_all.deb

pythoninstall:

# about python lib write in 2023.7.15
cd pythoninstall
sudo dpkg -i libc6_2.27-3ubuntu1.6_amd64.deb x11-common_1%3a7.7+19ubuntu7.1_all.deb libice6_2%3a1.0.9-2ubuntu0.18.04.1_amd64.deb libsm6_2%3a1.2.2-1_amd64.deb fonts-dejavu-core_2.37-1_all.deb fontconfig-config_2.12.6-0ubuntu2_all.deb libfontconfig1_2.12.6-0ubuntu2_amd64.deb libxrender1_1%3a0.9.10-1_amd64.deb libxft2_2.3.2-1_amd64.deb libxinerama1_2%3a1.1.3-1_amd64.deb libxss1_1%3a1.2.2-1_amd64.deb libxxf86dga1_2%3a1.1.4-1_amd64.deb libxxf86vm1_1%3a1.1.4-1_amd64.deb binutils-common_2.30-21ubuntu1~18.04.9_amd64.deb libbinutils_2.30-21ubuntu1~18.04.9_amd64.deb binutils-x86-64-linux-gnu_2.30-21ubuntu1~18.04.9_amd64.deb binutils_2.30-21ubuntu1~18.04.9_amd64.deb libc-dev-bin_2.27-3ubuntu1.6_amd64.deb linux-libc-dev_4.15.0-213.224_amd64.deb libc6-dev_2.27-3ubuntu1.6_amd64.deb gcc-7-base_7.5.0-3ubuntu1~18.04_amd64.deb libisl19_0.19-1_amd64.deb libmpc3_1.1.0-1_amd64.deb cpp-7_7.5.0-3ubuntu1~18.04_amd64.deb cpp_4%3a7.4.0-1ubuntu2.3_amd64.deb libcc1-0_8.4.0-1ubuntu1~18.04_amd64.deb libgomp1_8.4.0-1ubuntu1~18.04_amd64.deb libitm1_8.4.0-1ubuntu1~18.04_amd64.deb libatomic1_8.4.0-1ubuntu1~18.04_amd64.deb libasan4_7.5.0-3ubuntu1~18.04_amd64.deb liblsan0_8.4.0-1ubuntu1~18.04_amd64.deb libtsan0_8.4.0-1ubuntu1~18.04_amd64.deb libubsan0_7.5.0-3ubuntu1~18.04_amd64.deb libcilkrts5_7.5.0-3ubuntu1~18.04_amd64.deb libmpx2_8.4.0-1ubuntu1~18.04_amd64.deb libquadmath0_8.4.0-1ubuntu1~18.04_amd64.deb libgcc-7-dev_7.5.0-3ubuntu1~18.04_amd64.deb gcc-7_7.5.0-3ubuntu1~18.04_amd64.deb gcc_4%3a7.4.0-1ubuntu2.3_amd64.deb libstdc++-7-dev_7.5.0-3ubuntu1~18.04_amd64.deb g++-7_7.5.0-3ubuntu1~18.04_amd64.deb g++_4%3a7.4.0-1ubuntu2.3_amd64.deb make_4.1-9.1ubuntu1_amd64.deb libdpkg-perl_1.19.0.5ubuntu2.4_all.deb dpkg-dev_1.19.0.5ubuntu2.4_all.deb build-essential_12.4ubuntu1_amd64.deb bzip2-doc_1.0.6-8.1ubuntu0.2_all.deb libfakeroot_1.22-2ubuntu1_amd64.deb fakeroot_1.22-2ubuntu1_amd64.deb libalgorithm-diff-perl_1.19.03-1_all.deb libalgorithm-diff-xs-perl_0.04-5_amd64.deb libalgorithm-merge-perl_0.08-3_all.deb libbz2-dev_1.0.6-8.1ubuntu0.2_amd64.deb libdrm-amdgpu1_2.4.101-2~18.04.1_amd64.deb libpciaccess0_0.14-1_amd64.deb libdrm-intel1_2.4.101-2~18.04.1_amd64.deb libdrm-nouveau2_2.4.101-2~18.04.1_amd64.deb libdrm-radeon1_2.4.101-2~18.04.1_amd64.deb libexpat1-dev_2.2.5-3ubuntu0.9_amd64.deb libfile-fcntllock-perl_0.22-3build2_amd64.deb zlib1g-dev_1%3a1.2.11.dfsg-0ubuntu2.2_amd64.deb libpng-dev_1.6.34-1ubuntu0.18.04.2_amd64.deb libfreetype6-dev_2.8.1-2ubuntu2.2_amd64.deb pkg-config_0.29.1-0ubuntu2_amd64.deb libfontconfig1-dev_2.12.6-0ubuntu2_amd64.deb libfontenc1_1%3a1.1.3-1_amd64.deb libgdbm-dev_1.14.1-6_amd64.deb libglapi-mesa_20.0.8-0ubuntu1~18.04.1_amd64.deb libllvm10_1%3a10.0.0-4ubuntu1~18.04.2_amd64.deb libsensors4_1%3a3.4.0-4ubuntu0.1_amd64.deb libgl1-mesa-dri_20.0.8-0ubuntu1~18.04.1_amd64.deb libglvnd0_1.0.0-2ubuntu2.3_amd64.deb libx11-xcb1_2%3a1.6.4-3ubuntu0.4_amd64.deb libxcb-dri2-0_1.13-2~ubuntu18.04_amd64.deb libxcb-dri3-0_1.13-2~ubuntu18.04_amd64.deb libxcb-glx0_1.13-2~ubuntu18.04_amd64.deb libxcb-present0_1.13-2~ubuntu18.04_amd64.deb libxcb-sync1_1.13-2~ubuntu18.04_amd64.deb libxdamage1_1%3a1.1.4-3_amd64.deb libxfixes3_1%3a5.0.3-1_amd64.deb libxshmfence1_1.3-1_amd64.deb libglx-mesa0_20.0.8-0ubuntu1~18.04.1_amd64.deb libglx0_1.0.0-2ubuntu2.3_amd64.deb libgl1_1.0.0-2ubuntu2.3_amd64.deb libgl1-mesa-glx_20.0.8-0ubuntu1~18.04.1_amd64.deb xorg-sgml-doctools_1%3a1.11-1_all.deb x11proto-dev_2018.4-4_all.deb x11proto-core-dev_2018.4-4_all.deb libice-dev_2%3a1.0.9-2ubuntu0.18.04.1_amd64.deb libtinfo-dev_6.1-1ubuntu1.18.04.1_amd64.deb libncursesw5-dev_6.1-1ubuntu1.18.04.1_amd64.deb libpng-tools_1.6.34-1ubuntu0.18.04.2_amd64.deb libpthread-stubs0-dev_0.3-4_amd64.deb libreadline-dev_7.0-3_amd64.deb libsm-dev_2%3a1.2.2-1_amd64.deb libsqlite3-dev_3.22.0-1ubuntu0.7_amd64.deb libssl-dev_1.1.1-1ubuntu2.1~18.04.23_amd64.deb libtcl8.6_8.6.8+dfsg-3_amd64.deb libtk8.6_8.6.8-4_amd64.deb libxau-dev_1%3a1.0.8-1ubuntu1_amd64.deb libxdmcp-dev_1%3a1.1.2-3_amd64.deb xtrans-dev_1.3.5-1_all.deb libxcb1-dev_1.13-2~ubuntu18.04_amd64.deb libx11-dev_2%3a1.6.4-3ubuntu0.4_amd64.deb libx11-doc_2%3a1.6.4-3ubuntu0.4_all.deb libxt6_1%3a1.1.5-1_amd64.deb libxmu6_2%3a1.1.2-2_amd64.deb libxpm4_1%3a3.5.12-1ubuntu0.18.04.2_amd64.deb libxaw7_2%3a1.0.13-1_amd64.deb libxcb-shape0_1.13-2~ubuntu18.04_amd64.deb libxcomposite1_1%3a0.4.4-2_amd64.deb x11proto-xext-dev_2018.4-4_all.deb libxext-dev_2%3a1.3.3-1_amd64.deb libxrender-dev_1%3a0.9.10-1_amd64.deb libxft-dev_2.3.2-1_amd64.deb libxi6_2%3a1.7.9-1_amd64.deb libxrandr2_2%3a1.5.1-1_amd64.deb x11proto-scrnsaver-dev_2018.4-4_all.deb libxss-dev_1%3a1.2.2-1_amd64.deb libxt-dev_1%3a1.1.5-1_amd64.deb libxtst6_2%3a1.2.3-1_amd64.deb libxv1_2%3a1.0.11-1_amd64.deb manpages-dev_4.15-1_all.deb tcl8.6_8.6.8+dfsg-3_amd64.deb tcl_8.6.0+9_amd64.deb tcl8.6-dev_8.6.8+dfsg-3_amd64.deb tcl-dev_8.6.0+9_amd64.deb tk8.6_8.6.8-4_amd64.deb tk_8.6.0+9_amd64.deb tk8.6-dev_8.6.8-4_amd64.deb tk-dev_8.6.0+9_amd64.deb x11-utils_7.7+3build1_amd64.deb xbitmaps_1.1.1-2_all.deb xterm_330-1ubuntu2.2_amd64.deb libffi-dev_3.2.1-8_amd64.deb
cd .. 

安装完成之后打包:

3.3 执行以上的sh脚本

通过把sh脚本安装deb包,确认安装过程是否正确,该安装包是不是能够成功安装,以上过程比较繁琐,在安装时需要经过比较多的调试。尤其对于新手需要进行比较多次的尝试。

3.4 所学

在进行以上操作的过程中,需要一个好的虚拟机,在进行每一次操作后最好是要每一个重要的操作后都要打一个快照,要不然就复制一个虚拟机,当然打快照时更好的选择了,因为我们并不知道这个操作是不是会引起比较严重的后果

3.5 打包发送

4. 参考文献

https://blog.csdn.net/IT_Holmes/article/details/115830078
https://www.cnblogs.com/2020javamianshibaodian/p/12912933.html
https://blog.csdn.net/a71468293a/article/details/113603682
mysql 配置文章来源地址https://www.toymoban.com/news/detail-523829.html

到了这里,关于apache php mysql python 环境部署与离线安装deb包的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Linux-现实环境模拟(apache、MySQL、PHP、discuz)

    ♥️ 作者:小刘在C站 ♥️ 个人主页:  小刘主页  ♥️ 努力不一定有回报,但一定会有收获加油!一起努力,共赴美好人生! ♥️ 学习两年总结出的运维经验,以及思科模拟器全套网络实验教程。专栏: 云计算技术 ♥️小刘私信可以随便问,只要会绝不吝啬,感谢CSD

    2024年02月16日
    浏览(43)
  • LAMP(Linux+Apache+MySQL+PHP)环境介绍、配置、搭建

    LAMP是由Linux, Apache, MySQL, PHP组成的,即把Apache、MySQL以及PHP安装在Linux系统上,组成一个环境来运行PHP的脚本语言。Apache是最常用的Web服务软件,而MySQL是比较小型的数据库软件。三个角色可以安装在一台机器上,也可以分开(但httpd和php要在一起的) 为什么需要LAMP? 手动

    2024年04月28日
    浏览(43)
  • 安装Apache mysql php

    目录 一.Apache网站服务 Apache——》静态页面处理——》将静态处理交给PHP Apache简介 安装Apache服务 ​编辑 安装软件思路  二.安装mysql数据库 1. 安装依赖包  2.创建程序用户管理  3.加压安装包  这边就安装完成了​编辑  重点来了 报错了  没有空间  我最后的解决 方法是 

    2024年02月10日
    浏览(41)
  • 麒麟V10离线rpm安装nginx+php+mariadb环境

    1、下载需要的nginx包 如果有有网络服务器:则 首先查询要下载的包 如果没有网:则在以下地址可下载rpm包,类似地址跟多 https://developer.aliyun.com/mirror/ https://mirrors.tuna.tsinghua.edu.cn/ https://rpm.org/ https://pkgs.org/ https://rpmfind.net/ 2、安装nginx、php (1)在各自的包目录下执行命令 rpm

    2024年02月04日
    浏览(60)
  • 安装Apache、MySQL、PHP、论坛实操

    (1)准备源码包 httpd-2.4.29.tar.gz apr-1.6.2.tar.gz apr-util-1.6.0.tar.gz (2)关闭安全机制 systemctl stop firewalld //关闭防火墙 systemctl disable firewalld //防火墙开机不自启 setenforce 0 //关闭selinux (3)安装环境依赖包 依赖包解释: gcc C语言的编译器 gcc-c++ C++的编译器 make 源代码编译器(源代

    2024年02月09日
    浏览(55)
  • 阿里云服务器安装MySQL、Apache、PHP

      节日期间突然想要自己搭建一个个人网站,于是在阿里云申请了一个可以免费使用3个月的服务器,申请的云市场产品Wordpress平台( ALinux3 LNMP PHP7.4)。官方教程使用的CentOs系统,和我申请的ALinux3操作有一些差异,先重置密码,然后单击实例的ID,选择安全组页签,单击安全

    2024年02月19日
    浏览(51)
  • Linux环境下安装部署单机RabbitMQ(离线)

    本文档适用于在Linux系统下部署单体RabbitMQ,是在无网的情况下部署的。涉及的任何操作都是通过手动下载安装包然后上传到服务器上进行安装,因此也遇到一些问题,并在此文档中记录。 实际操作环境:Kylin V10,实际操作的Linux系统是银河麒麟。根据我安装的过程,觉得适用

    2024年02月03日
    浏览(45)
  • Linux离线环境安装部署docker(超详细)

    可以参考菜鸟教程:https://www.runoob.com/docker/centos-docker-install.html 安装插件 添加仓库地址: 安装指定版本的docker-ce和docker-ce-cli: 启动docker,设为开机自启动: docker-Linux下载地址 搭建docker环境准备 在能连网的服务器上下载所需的镜像,例如 上传docker压缩包及镜像上传到需要部署的服

    2024年02月03日
    浏览(58)
  • docker 部署 nginx+php+mysql 环境

    记录一下docker部署web服务器流程。nginx,mysql,php不同的版本配置内容可能会不同。 docker常用命令 目录结构 创建目录 运行PHP容器 php容器内容目录结构如下: PHP5.4升级后,php.ini-dist不见了,出现了php.ini-developmen和php.ini-production。 php.ini-development 对应于 php.ini-dist,适合开发测

    2024年04月24日
    浏览(82)
  • Linux离线arm环境安装部署docker详细教程

    1、下载 通过官网下载docker安装包,找arm环境的安装包,如果是x86环境可以下载对应的安装包 Index of linux/static/stable/aarch64/ 2、上传到服务器上,通过rz命令 上传成功后解压 tar -xvf docker-24.0.6.tgz  3. 复制文件到 /usr/bin cp ./docker/* /usr/bin 4. 创建docker.service vim  /etc/systemd/system/doc

    2024年02月03日
    浏览(46)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包